mirror of
https://github.com/moku-project/Moku.git
synced 2026-06-13 09:19:56 -05:00
Chore: Port over Extensions & Search
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user