Chore: Port over Extensions & Search

This commit is contained in:
Youwes09
2026-05-31 00:30:36 -05:00
parent 6de5207ce7
commit 13f2a483ca
47 changed files with 6086 additions and 1016 deletions
+7
View File
@@ -1,6 +1,7 @@
import type { Manga } from "$lib/types";
import type { MangaStatus } from "$lib/server-adapters/types";
import type { Category } from "$lib/types";
import { settingsState, updateSettings } from "$lib/state/settings.svelte";
export type LibrarySortOption =
| "alphabetical"
@@ -203,6 +204,12 @@ class LibraryState {
this.tabFilters = { ...this.tabFilters, [tab]: {} };
}
syncFromSettings(s: { hiddenLibraryTabs?: string[]; libraryPinnedTabOrder?: string[]; defaultLibraryCategoryId?: number | null }) {
if (s.hiddenLibraryTabs) this.hiddenTabs = new Set(s.hiddenLibraryTabs);
if (s.libraryPinnedTabOrder) this.pinnedTabOrder = s.libraryPinnedTabOrder;
if (s.defaultLibraryCategoryId !== undefined) this.defaultCategoryId = s.defaultLibraryCategoryId ?? null;
}
setCategories(cats: Category[]) {
this.categories = cats;
}