* 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.
39 lines
953 B
TypeScript
39 lines
953 B
TypeScript
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>>;
|
|
|
|
export const defaultServerSettings = {
|
|
analytics: {
|
|
enableGeneral: true,
|
|
enableWidgetData: false,
|
|
enableIntegrationData: false,
|
|
enableUserData: false,
|
|
},
|
|
crawlingAndIndexing: {
|
|
noIndex: true,
|
|
noFollow: true,
|
|
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;
|