2022-06-08 15:36:54 +00:00
|
|
|
import { MantineTheme } from '@mantine/core';
|
2022-06-08 16:03:06 +00:00
|
|
|
import { OptionValues } from '../components/modules/modules';
|
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-06-08 16:03:06 +00:00
|
|
|
appOpacity?: number;
|
2022-06-12 08:04:20 +02:00
|
|
|
widgetPosition?: string;
|
2022-06-14 17:45:22 +00:00
|
|
|
appCardWidth?: number;
|
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-06-16 17:07:29 -04:00
|
|
|
export const StatusCodes = [
|
2022-06-21 16:21:40 +02:00
|
|
|
{ value: '200', label: '200 - OK', group: 'Sucessful responses' },
|
|
|
|
|
{ value: '204', label: '204 - No Content', group: 'Sucessful responses' },
|
|
|
|
|
{ value: '301', label: '301 - Moved Permanently', group: 'Redirection responses' },
|
|
|
|
|
{ value: '302', label: '302 - Found / Moved Temporarily', group: 'Redirection responses' },
|
|
|
|
|
{ value: '304', label: '304 - Not Modified', group: 'Redirection responses' },
|
|
|
|
|
{ value: '307', label: '307 - Temporary Redirect', group: 'Redirection responses' },
|
|
|
|
|
{ value: '308', label: '308 - Permanent Redirect', group: 'Redirection responses' },
|
|
|
|
|
{ value: '400', label: '400 - Bad Request', group: 'Client error responses' },
|
|
|
|
|
{ value: '401', label: '401 - Unauthorized', group: 'Client error responses' },
|
|
|
|
|
{ value: '403', label: '403 - Forbidden', group: 'Client error responses' },
|
|
|
|
|
{ value: '404', label: '404 - Not Found', group: 'Client error responses' },
|
|
|
|
|
{ value: '408', label: '408 - Request Timeout', group: 'Client error responses' },
|
|
|
|
|
{ value: '410', label: '410 - Gone', group: 'Client error responses' },
|
|
|
|
|
{ value: '429', label: '429 - Too Many Requests', group: 'Client error responses' },
|
|
|
|
|
{ value: '500', label: '500 - Internal Server Error', group: 'Server error responses' },
|
|
|
|
|
{ value: '502', label: '502 - Bad Gateway', group: 'Server error responses' },
|
|
|
|
|
{ value: '503', label: '503 - Service Unavailable', group: 'Server error responses' },
|
|
|
|
|
{ value: '054', label: '504 - Gateway Timeout Error', group: 'Server error responses' },
|
|
|
|
|
];
|
2022-06-16 15:38:50 -04:00
|
|
|
|
2022-06-16 17:07:29 -04:00
|
|
|
export const Targets = [
|
2022-06-21 16:21:40 +02:00
|
|
|
{ value: '_blank', label: 'New Tab' },
|
|
|
|
|
{ value: '_top', label: 'Same Window' },
|
|
|
|
|
];
|
2022-06-16 15:38:50 -04: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-06-20 09:52:05 +02:00
|
|
|
newTab?: boolean;
|
|
|
|
|
status?: string[];
|
2022-05-01 14:46:06 +02:00
|
|
|
}
|