You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
91 lines
2.0 KiB
TypeScript
91 lines
2.0 KiB
TypeScript
export interface AppSettings {
|
|
zoom: number;
|
|
currentTheme: string;
|
|
username: string;
|
|
desktop: string;
|
|
defaultColor: string;
|
|
bodyClass: Record<string, boolean>;
|
|
themes: AppTheme[];
|
|
hotkeysEnabled?: boolean;
|
|
showTime?: boolean;
|
|
timeFormat?: string;
|
|
}
|
|
|
|
export interface AppTheme {
|
|
component: string;
|
|
settings?: AppInputTheme[];
|
|
snapshots?: AppThemeSnapshot[];
|
|
name: string;
|
|
color: {
|
|
background: string;
|
|
};
|
|
}
|
|
|
|
export interface AppThemeSnapshot {
|
|
title: string;
|
|
values: Record<string, AppInputThemeValue>;
|
|
}
|
|
|
|
export type AppInputTheme = AppInputThemeGeneral | AppInputThemeSlider | AppInputButton | AppInputThemePalette | AppInputThemeSelector
|
|
export type AppInputThemeType = 'color' | 'slider' | 'checkbox' | 'palette' | 'button' | 'selector'
|
|
export type AppInputThemeValue = string | boolean | string[] | number
|
|
|
|
export interface AppInputThemeGeneral {
|
|
name: string;
|
|
value: AppInputThemeValue;
|
|
label: string;
|
|
type: AppInputThemeType;
|
|
options?: AppInputThemeOptions;
|
|
callback?: (value: AppInputThemeValue) => void;
|
|
}
|
|
|
|
export interface AppInputThemeSlider extends AppInputThemeGeneral {
|
|
type: 'slider';
|
|
icon?: string;
|
|
options: AppInputThemeOptionsSlider;
|
|
}
|
|
|
|
export interface AppInputThemeSelector extends AppInputThemeGeneral {
|
|
type: 'selector';
|
|
values: Readonly<string[]>;
|
|
}
|
|
|
|
export interface AppInputThemePalette extends AppInputThemeGeneral {
|
|
type: 'palette';
|
|
values: string[][];
|
|
}
|
|
|
|
export interface AppInputButton {
|
|
// TODO: "name" and "value" useless property, need to delete them
|
|
name: 'button';
|
|
value: 'button';
|
|
label: string;
|
|
icon?: string;
|
|
type: 'button';
|
|
callback?: () => void;
|
|
}
|
|
|
|
export interface AppInputThemeOptions {
|
|
class?: string;
|
|
changeOnUpdate?: boolean;
|
|
}
|
|
|
|
export interface AppInputThemeOptionsSlider extends AppInputThemeOptions {
|
|
value?: number;
|
|
icon?: string;
|
|
min: number;
|
|
max: number;
|
|
step: number;
|
|
}
|
|
|
|
export interface AppInputColor {
|
|
a: string;
|
|
hex: string;
|
|
hex8: string;
|
|
hsl: string;
|
|
hsv: string;
|
|
oldHue: string;
|
|
rgba: string;
|
|
source: string;
|
|
}
|