2018-08-22 20:04:41 +00:00
|
|
|
export interface PluginDescription {
|
2019-10-06 00:28:36 +00:00
|
|
|
key: string;
|
|
|
|
name: string;
|
2018-08-22 20:04:41 +00:00
|
|
|
}
|
2018-08-19 20:37:53 +00:00
|
|
|
|
2018-08-22 20:04:41 +00:00
|
|
|
export class State {
|
2019-10-06 00:28:36 +00:00
|
|
|
isAuthorized: boolean;
|
|
|
|
version: number;
|
|
|
|
slide: number;
|
|
|
|
display: boolean;
|
|
|
|
isSecure: boolean;
|
|
|
|
blank: boolean;
|
|
|
|
twelve: boolean;
|
|
|
|
theme: boolean;
|
2023-02-08 21:40:40 +00:00
|
|
|
item: string;
|
2018-08-22 20:04:41 +00:00
|
|
|
|
2019-10-06 00:28:36 +00:00
|
|
|
live = () => !(this.blank || this.display || this.theme);
|
2022-12-21 16:27:47 +00:00
|
|
|
|
|
|
|
get displayMode() {
|
|
|
|
if (this.blank) {
|
|
|
|
return DisplayMode.Blank;
|
|
|
|
} else if (this.display) {
|
|
|
|
return DisplayMode.Desktop;
|
|
|
|
} else if (this.theme) {
|
|
|
|
return DisplayMode.Theme;
|
|
|
|
} else {
|
|
|
|
return DisplayMode.Presentation;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export enum DisplayMode {
|
|
|
|
Blank,
|
|
|
|
Theme,
|
|
|
|
Desktop,
|
|
|
|
Presentation
|
2018-08-19 20:37:53 +00:00
|
|
|
}
|
|
|
|
|
2018-08-22 20:04:41 +00:00
|
|
|
export interface Slide {
|
2019-10-06 00:28:36 +00:00
|
|
|
selected: boolean;
|
|
|
|
html: string;
|
|
|
|
tag: string;
|
|
|
|
text: string;
|
2020-05-09 07:02:05 +00:00
|
|
|
chords: string;
|
2019-10-06 00:28:36 +00:00
|
|
|
lines: string[];
|
2019-10-08 05:43:49 +00:00
|
|
|
first_slide_of_tag: boolean;
|
2021-06-28 04:52:51 +00:00
|
|
|
img: string;
|
2018-08-20 00:00:32 +00:00
|
|
|
}
|
|
|
|
|
2018-08-22 20:04:41 +00:00
|
|
|
export interface ServiceItem {
|
2020-05-20 17:04:52 +00:00
|
|
|
id: string;
|
|
|
|
notes: string;
|
|
|
|
plugin: string;
|
|
|
|
selected: boolean;
|
|
|
|
title: string;
|
|
|
|
is_valid: boolean;
|
2020-07-21 23:26:34 +00:00
|
|
|
slides: object[];
|
2019-10-08 05:43:49 +00:00
|
|
|
}
|
|
|
|
|
2020-01-23 20:10:11 +00:00
|
|
|
export interface Theme {
|
2020-05-20 17:04:52 +00:00
|
|
|
selected: boolean;
|
|
|
|
name: string;
|
2020-01-23 20:10:11 +00:00
|
|
|
}
|
|
|
|
|
2019-10-08 05:43:49 +00:00
|
|
|
export interface MainView {
|
|
|
|
binary_image: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface SystemInformation {
|
|
|
|
websocket_port: number;
|
|
|
|
login_required: boolean;
|
2023-02-08 21:40:40 +00:00
|
|
|
api_version?: number;
|
|
|
|
api_revision?: number;
|
2019-10-08 05:43:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface Credentials {
|
|
|
|
username: string;
|
|
|
|
password: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface AuthToken {
|
|
|
|
token: string;
|
2019-10-06 00:28:36 +00:00
|
|
|
}
|
2023-05-19 16:28:12 +00:00
|
|
|
|
|
|
|
export class Message<T extends MessageType> {
|
|
|
|
plugin: T['plugin'];
|
|
|
|
key: T['key'];
|
|
|
|
value: T['value'];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface MessageType {
|
|
|
|
plugin: string;
|
|
|
|
key: string;
|
|
|
|
value: any;
|
|
|
|
}
|