diff --git a/assets/components/common/DropdownMenu.vue b/assets/components/common/DropdownMenu.vue index 11ecb1da..fa943f14 100644 --- a/assets/components/common/DropdownMenu.vue +++ b/assets/components/common/DropdownMenu.vue @@ -1,5 +1,5 @@ diff --git a/assets/stores/settings.ts b/assets/stores/settings.ts index 8ef9abdf..48834182 100644 --- a/assets/stores/settings.ts +++ b/assets/stores/settings.ts @@ -14,7 +14,7 @@ export type Settings = { dateLocale: "auto" | "en-US" | "en-GB" | "de-DE" | "en-CA"; softWrap: boolean; collapseNav: boolean; - automaticRedirect: boolean; + automaticRedirect: "instant" | "delayed" | "none"; locale: string; }; export const DEFAULT_SETTINGS: Settings = { @@ -31,12 +31,20 @@ export const DEFAULT_SETTINGS: Settings = { dateLocale: "auto", softWrap: true, collapseNav: false, - automaticRedirect: true, + automaticRedirect: "delayed", locale: "", }; export const settings = useProfileStorage("settings", DEFAULT_SETTINGS); +// @ts-ignore: automaticRedirect is now a string enum, but might be a boolean in older data +if (settings.value.automaticRedirect === true) { + settings.value.automaticRedirect = "delayed"; + // @ts-ignore: automaticRedirect is now a string enum, but might be a boolean in older data +} else if (settings.value.automaticRedirect === false) { + settings.value.automaticRedirect = "none"; +} + export const { collapseNav, compact, diff --git a/internal/profile/disk.go b/internal/profile/disk.go index de5e2845..a8520dbb 100644 --- a/internal/profile/disk.go +++ b/internal/profile/disk.go @@ -28,7 +28,7 @@ type Settings struct { ShowAllContainers bool `json:"showAllContainers"` SoftWrap bool `json:"softWrap"` CollapseNav bool `json:"collapseNav"` - AutomaticRedirect bool `json:"automaticRedirect"` + AutomaticRedirect string `json:"automaticRedirect"` Size string `json:"size,omitempty"` Compact bool `json:"compact"` LightTheme string `json:"lightTheme,omitempty"`