Files
Homarr/src/tools/types.ts

70 lines
1.2 KiB
TypeScript
Raw Normal View History

import { MantineTheme } from '@mantine/core';
import { OptionValues } from '../components/modules/modules';
2022-05-01 14:46:06 +02:00
export interface Settings {
searchUrl: string;
2022-06-07 07:20:44 +02:00
title?: string;
logo?: string;
favicon?: string;
primaryColor?: MantineTheme['primaryColor'];
secondaryColor?: MantineTheme['primaryColor'];
primaryShade?: MantineTheme['primaryShade'];
background?: string;
appOpacity?: number;
2022-06-12 08:04:20 +02:00
widgetPosition?: string;
2022-05-01 14:46:06 +02:00
}
2022-04-30 21:34:41 +02:00
export interface Config {
name: string;
2022-04-30 21:34:41 +02:00
services: serviceItem[];
2022-05-01 14:46:06 +02:00
settings: Settings;
modules: {
[key: string]: ConfigModule;
};
}
interface ConfigModule {
title: string;
enabled: boolean;
options: {
[key: string]: OptionValues;
};
2022-04-30 21:39:59 +02:00
}
2022-05-01 14:46:06 +02:00
export const ServiceTypeList = [
'Other',
'Emby',
2022-05-26 21:06:17 +02:00
'Deluge',
'Lidarr',
'Plex',
'Radarr',
'Readarr',
'Sonarr',
'qBittorrent',
'Transmission',
];
export type ServiceType =
| 'Other'
| 'Emby'
2022-05-26 21:06:17 +02:00
| 'Deluge'
| 'Lidarr'
| 'Plex'
| 'Radarr'
| 'Readarr'
| 'Sonarr'
| 'qBittorrent'
| 'Transmission';
2022-05-01 14:46:06 +02:00
export interface serviceItem {
2022-05-21 01:26:24 +02:00
id: string;
2022-05-01 14:46:06 +02:00
name: string;
type: string;
url: string;
icon: string;
2022-05-29 10:45:49 +02:00
category?: string;
apiKey?: string;
password?: string;
username?: string;
openedUrl?: string;
2022-05-01 14:46:06 +02:00
}