mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-14 09:25:47 +01:00
✨ Add new config format
This commit is contained in:
61
src/types/settings.ts
Normal file
61
src/types/settings.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import { MantineTheme } from '@mantine/core';
|
||||
|
||||
export interface SettingsType {
|
||||
common: CommonSettingsType;
|
||||
customization: CustomizationSettingsType;
|
||||
}
|
||||
|
||||
export interface CommonSettingsType {
|
||||
searchEngine: SearchEngineCommonSettingsType;
|
||||
defaultConfig: string;
|
||||
}
|
||||
|
||||
export type SearchEngineCommonSettingsType =
|
||||
| CommonSearchEngineCommonSettingsType
|
||||
| CustomSearchEngineCommonSettingsType;
|
||||
|
||||
export interface CommonSearchEngineCommonSettingsType extends BaseSearchEngineType {
|
||||
type: 'google' | 'duckDuckGo' | 'bing';
|
||||
}
|
||||
|
||||
interface CustomSearchEngineCommonSettingsType extends BaseSearchEngineType {
|
||||
type: 'custom';
|
||||
properties: {
|
||||
template: string;
|
||||
openInNewTab: boolean;
|
||||
enabled: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
interface BaseSearchEngineType {
|
||||
properties: {
|
||||
openInNewTab: boolean;
|
||||
enabled: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface CustomizationSettingsType {
|
||||
layout: LayoutCustomizationSettingsType;
|
||||
pageTitle?: string;
|
||||
metaTitle?: string;
|
||||
logoImageUrl?: string;
|
||||
faviconUrl?: string;
|
||||
backgroundImageUrl?: string;
|
||||
customCss?: string;
|
||||
colors: ColorsCustomizationSettingsType;
|
||||
appOpacity?: number;
|
||||
}
|
||||
|
||||
interface LayoutCustomizationSettingsType {
|
||||
enabledLeftSidebar: boolean;
|
||||
enabledRightSidebar: boolean;
|
||||
enabledDocker: boolean;
|
||||
enabledPing: boolean;
|
||||
enabledSearchbar: boolean;
|
||||
}
|
||||
|
||||
interface ColorsCustomizationSettingsType {
|
||||
primary?: MantineTheme['primaryColor'];
|
||||
secondary?: MantineTheme['primaryColor'];
|
||||
shade?: MantineTheme['primaryShade'];
|
||||
}
|
||||
Reference in New Issue
Block a user