mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-25 14:59:26 +01:00
* feat: implements a toast for alerting errors and other useful information * removes unused code * feat: adds automatic redirect when a new container is found * complete the flow with alerts and settings page * adds more langs and option for once * removes files
49 lines
1.0 KiB
TypeScript
49 lines
1.0 KiB
TypeScript
import { toRefs } from "@vueuse/core";
|
|
const DOZZLE_SETTINGS_KEY = "DOZZLE_SETTINGS";
|
|
|
|
export const DEFAULT_SETTINGS: {
|
|
search: boolean;
|
|
size: "small" | "medium" | "large";
|
|
menuWidth: number;
|
|
smallerScrollbars: boolean;
|
|
showTimestamp: boolean;
|
|
showStd: boolean;
|
|
showAllContainers: boolean;
|
|
lightTheme: "auto" | "dark" | "light";
|
|
hourStyle: "auto" | "24" | "12";
|
|
softWrap: boolean;
|
|
collapseNav: boolean;
|
|
automaticRedirect: boolean;
|
|
} = {
|
|
search: true,
|
|
size: "medium",
|
|
menuWidth: 15,
|
|
smallerScrollbars: false,
|
|
showTimestamp: true,
|
|
showStd: false,
|
|
showAllContainers: false,
|
|
lightTheme: "auto",
|
|
hourStyle: "auto",
|
|
softWrap: true,
|
|
collapseNav: false,
|
|
automaticRedirect: true,
|
|
};
|
|
|
|
export const settings = useStorage(DOZZLE_SETTINGS_KEY, DEFAULT_SETTINGS);
|
|
settings.value = { ...DEFAULT_SETTINGS, ...settings.value };
|
|
|
|
export const {
|
|
collapseNav,
|
|
softWrap,
|
|
hourStyle,
|
|
lightTheme,
|
|
showAllContainers,
|
|
showTimestamp,
|
|
showStd,
|
|
smallerScrollbars,
|
|
menuWidth,
|
|
size,
|
|
search,
|
|
automaticRedirect,
|
|
} = toRefs(settings);
|