fix: 修复整理弹窗下拉选项无法点击选择的问题
This commit is contained in:
parent
e30ae019e8
commit
c07c564bbb
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB |
|
|
@ -53,6 +53,7 @@ export class AppComponent implements OnInit {
|
|||
mode: 'downloads' | 'library' = 'downloads';
|
||||
libraryEnabled = false;
|
||||
libraryFolders: LibraryFolder[] = [];
|
||||
libraryFolderNames: string[] = [];
|
||||
libraryFiles: LibraryFile[] = [];
|
||||
libraryFolder = ''; // '' = library root
|
||||
libraryLoading = false;
|
||||
|
|
@ -187,8 +188,11 @@ export class AppComponent implements OnInit {
|
|||
loadLibraryFolders(): void {
|
||||
if (!this.libraryEnabled) return;
|
||||
this.downloads.libraryFolders().subscribe({
|
||||
next: (res) => { this.libraryFolders = res.folders; },
|
||||
error: () => { this.libraryFolders = []; }
|
||||
next: (res) => {
|
||||
this.libraryFolders = res.folders;
|
||||
this.libraryFolderNames = res.folders.map(f => f.name).filter(n => n);
|
||||
},
|
||||
error: () => { this.libraryFolders = []; this.libraryFolderNames = []; }
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -259,10 +263,6 @@ export class AppComponent implements OnInit {
|
|||
this.organizeOpen = false;
|
||||
}
|
||||
|
||||
get libraryFolderNames(): string[] {
|
||||
return this.libraryFolders.map(f => f.name).filter(n => n);
|
||||
}
|
||||
|
||||
private normalizeName(s: string): string {
|
||||
return (s || '').toLowerCase().replace(/[^a-z0-9\u4e00-\u9fff]+/g, ' ').trim();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue