diff --git a/src/lib/browser-storage.ts b/src/lib/browser-storage.ts index c801f4a..c1767db 100644 --- a/src/lib/browser-storage.ts +++ b/src/lib/browser-storage.ts @@ -1,6 +1,6 @@ -const TOKEN_KEY = "vps_token"; -const USER_KEY = "vps_user"; -const ORGANIZATION_STORAGE_KEY = "vps_active_organization"; +const TOKEN_KEY = "doktainer_token"; +const USER_KEY = "doktainer_user"; +const ORGANIZATION_STORAGE_KEY = "doktainer_active_organization"; type SensitiveStorageKey = | typeof TOKEN_KEY @@ -17,7 +17,9 @@ function getLocalStorage(): Storage | null { } } -export function getSensitiveStorageItem(key: SensitiveStorageKey): string | null { +export function getSensitiveStorageItem( + key: SensitiveStorageKey, +): string | null { return getLocalStorage()?.getItem(key) ?? null; } @@ -36,4 +38,4 @@ export const sensitiveStorageKeys = { token: TOKEN_KEY, user: USER_KEY, organization: ORGANIZATION_STORAGE_KEY, -} as const; \ No newline at end of file +} as const; diff --git a/src/lib/preferences.ts b/src/lib/preferences.ts index f7e047c..b1b2197 100644 --- a/src/lib/preferences.ts +++ b/src/lib/preferences.ts @@ -11,10 +11,10 @@ export { resolveThemePreference, } from "@/lib/theme"; -const SETTINGS_EVENT = "vps:settings-updated"; -const PANEL_NAME_KEY = "vps_panel_name"; -const PANEL_URL_KEY = "vps_panel_url"; -const SESSION_TIMEOUT_KEY = "vps_session_timeout_minutes"; +const SETTINGS_EVENT = "doktainer:settings-updated"; +const PANEL_NAME_KEY = "doktainer_panel_name"; +const PANEL_URL_KEY = "doktainer_panel_url"; +const SESSION_TIMEOUT_KEY = "doktainer_session_timeout_minutes"; const DEFAULT_PANEL_NAME = process.env.NEXT_PUBLIC_PANEL_NAME || "DOKTAINER"; function resolveDefaultPanelUrl() { diff --git a/src/lib/theme.ts b/src/lib/theme.ts index 59375b8..cad1e81 100644 --- a/src/lib/theme.ts +++ b/src/lib/theme.ts @@ -1,6 +1,6 @@ export type ThemePreference = "dark" | "light" | "system"; -export const THEME_STORAGE_KEY = "vps_theme"; +export const THEME_STORAGE_KEY = "doktainer_theme"; export const DEFAULT_THEME: ThemePreference = "dark"; function isThemePreference(value: string | null): value is ThemePreference {