TeaWeb/shared/js/events/GlobalEvents.ts

39 lines
992 B
TypeScript
Raw Normal View History

import {ConnectionHandler} from "../ConnectionHandler";
import {Registry} from "../events";
2020-04-06 16:29:40 +02:00
export interface ClientGlobalControlEvents {
/* open a basic window */
2020-04-06 16:29:40 +02:00
action_open_window: {
window:
2020-09-07 12:42:00 +02:00
"settings" | /* use action_open_window_settings! */
2020-09-17 23:06:02 +02:00
"settings-registry" |
"css-variable-editor" |
"bookmark-manage" |
"query-manage" |
"query-create" |
"ban-list" |
"permissions" |
"token-list" |
2020-09-07 12:42:00 +02:00
"token-use",
2020-04-06 16:29:40 +02:00
connection?: ConnectionHandler
},
2020-08-08 15:20:32 +02:00
action_w2g: {
following: number,
handlerId: string
} | {
videoUrl: string,
handlerId: string
}
/* some more specific window openings */
action_open_window_connect: {
2020-09-07 12:42:00 +02:00
newTab: boolean
}
action_open_window_settings: {
defaultCategory?: string
2020-04-06 16:29:40 +02:00
}
}
export const global_client_actions = new Registry<ClientGlobalControlEvents>();