feat: add server settings for default board, default color scheme and default locale (#1373)

* feat: add server settings for default board, default color scheme and default locale

* chore: address pull request feedback

* test: adjust unit tests to match requirements

* fix: deepsource issue

* chore: add deepsource as dependency to translation library

* refactor: restructure language-combobox, adjust default locale for next-intl

* chore: change cookie keys prefix from homarr- to homarr.
This commit is contained in:
Meier Lukas
2024-11-02 21:15:46 +01:00
committed by GitHub
parent 49c0ebea6d
commit 326b769c23
42 changed files with 599 additions and 214 deletions

View File

@@ -1,4 +1,13 @@
export const defaultServerSettingsKeys = ["analytics", "crawlingAndIndexing"] as const;
import type { ColorScheme } from "@homarr/definitions";
import type { SupportedLanguage } from "@homarr/translation";
export const defaultServerSettingsKeys = [
"analytics",
"crawlingAndIndexing",
"board",
"appearance",
"culture",
] as const;
export type ServerSettingsRecord = Record<(typeof defaultServerSettingsKeys)[number], Record<string, unknown>>;
@@ -15,6 +24,15 @@ export const defaultServerSettings = {
noTranslate: true,
noSiteLinksSearchBox: false,
},
board: {
defaultBoardId: null as string | null,
},
appearance: {
defaultColorScheme: "light" as ColorScheme,
},
culture: {
defaultLocale: "en" as SupportedLanguage,
},
} satisfies ServerSettingsRecord;
export type ServerSettings = typeof defaultServerSettings;