2022-05-22 20:42:10 +02:00
|
|
|
import { OptionValues } from '../components/modules/modules';
|
2022-06-08 15:36:54 +00:00
|
|
|
import { MantineTheme } from '@mantine/core';
|
2022-05-22 20:42:10 +02:00
|
|
|
|
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;
|
2022-06-08 15:36:54 +00:00
|
|
|
primaryColor?: MantineTheme['primaryColor'];
|
|
|
|
|
secondaryColor?: MantineTheme['primaryColor'];
|
|
|
|
|
primaryShade?: MantineTheme['primaryShade'];
|
2022-06-07 17:36:05 +00:00
|
|
|
background?: string;
|
2022-05-01 14:46:06 +02:00
|
|
|
}
|
2022-04-30 21:34:41 +02:00
|
|
|
|
|
|
|
|
export interface Config {
|
2022-05-12 19:28:10 +02:00
|
|
|
name: string;
|
2022-04-30 21:34:41 +02:00
|
|
|
services: serviceItem[];
|
2022-05-01 14:46:06 +02:00
|
|
|
settings: Settings;
|
2022-05-22 20:42:10 +02:00
|
|
|
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
|
|
|
|
2022-05-02 15:11:28 +02:00
|
|
|
export const ServiceTypeList = [
|
|
|
|
|
'Other',
|
2022-05-22 20:42:10 +02:00
|
|
|
'Emby',
|
2022-05-26 21:06:17 +02:00
|
|
|
'Deluge',
|
2022-05-02 15:11:28 +02:00
|
|
|
'Lidarr',
|
|
|
|
|
'Plex',
|
2022-05-22 20:42:10 +02:00
|
|
|
'Radarr',
|
2022-05-25 10:50:57 +02:00
|
|
|
'Readarr',
|
2022-05-22 20:42:10 +02:00
|
|
|
'Sonarr',
|
|
|
|
|
'qBittorrent',
|
2022-06-06 21:38:50 +02:00
|
|
|
'Transmission',
|
2022-05-02 15:11:28 +02:00
|
|
|
];
|
|
|
|
|
export type ServiceType =
|
|
|
|
|
| 'Other'
|
2022-05-22 20:42:10 +02:00
|
|
|
| 'Emby'
|
2022-05-26 21:06:17 +02:00
|
|
|
| 'Deluge'
|
2022-05-02 15:11:28 +02:00
|
|
|
| 'Lidarr'
|
|
|
|
|
| 'Plex'
|
2022-05-22 20:42:10 +02:00
|
|
|
| 'Radarr'
|
2022-05-25 10:50:57 +02:00
|
|
|
| 'Readarr'
|
2022-05-22 20:42:10 +02:00
|
|
|
| 'Sonarr'
|
2022-06-06 21:38:50 +02:00
|
|
|
| '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;
|
2022-05-21 01:02:45 +02:00
|
|
|
apiKey?: string;
|
2022-05-26 18:16:00 +02:00
|
|
|
password?: string;
|
|
|
|
|
username?: string;
|
2022-06-06 18:26:29 +02:00
|
|
|
openedUrl?: string;
|
2022-05-01 14:46:06 +02:00
|
|
|
}
|