store item display preferences

This commit is contained in:
Hayden 2023-01-27 14:11:09 -09:00
parent 1c845f442e
commit 1aeab60045
No known key found for this signature in database
GPG key ID: 17CF79474E257545

View file

@ -1,10 +1,13 @@
import { Ref } from "vue"; import { Ref } from "vue";
import { DaisyTheme } from "~~/lib/data/themes"; import { DaisyTheme } from "~~/lib/data/themes";
export type ViewType = "table" | "card" | "tree";
export type LocationViewPreferences = { export type LocationViewPreferences = {
showDetails: boolean; showDetails: boolean;
showEmpty: boolean; showEmpty: boolean;
editorAdvancedView: boolean; editorAdvancedView: boolean;
itemDisplayView: ViewType;
theme: DaisyTheme; theme: DaisyTheme;
}; };
@ -19,6 +22,7 @@ export function useViewPreferences(): Ref<LocationViewPreferences> {
showDetails: true, showDetails: true,
showEmpty: true, showEmpty: true,
editorAdvancedView: false, editorAdvancedView: false,
itemDisplayView: "card",
theme: "homebox", theme: "homebox",
}, },
{ mergeDefaults: true } { mergeDefaults: true }