TeaWeb/shared/js/events/GlobalEvents.ts

33 lines
823 B
TypeScript
Raw Normal View History

2020-04-06 14:29:40 +00:00
import {ConnectionHandler} from "tc-shared/ConnectionHandler";
import {Registry} from "tc-shared/events";
2020-04-06 14:29:40 +00:00
export interface ClientGlobalControlEvents {
/* open a basic window */
2020-04-06 14:29:40 +00:00
action_open_window: {
window:
"bookmark-manage" |
"query-manage" |
"query-create" |
"ban-list" |
"permissions" |
"token-list" |
"token-use" |
"settings",
2020-04-06 14:29:40 +00:00
connection?: ConnectionHandler
},
2020-08-08 13:20:32 +00:00
action_w2g: {
following: number,
handlerId: string
} | {
videoUrl: string,
handlerId: string
}
/* some more specific window openings */
action_open_window_connect: {
new_tab: boolean
2020-04-06 14:29:40 +00:00
}
}
export const global_client_actions = new Registry<ClientGlobalControlEvents>();