2020-12-28 18:15:52 +00:00
|
|
|
declare interface Modal {
|
|
|
|
modal: HTMLElement;
|
|
|
|
closeButton: HTMLSpanElement
|
|
|
|
show: () => void;
|
|
|
|
close: (event?: Event) => void;
|
|
|
|
toggle: () => void;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ArrayConstructor {
|
|
|
|
from(arrayLike: any, mapFn?, thisArg?): Array<any>;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare interface Window {
|
|
|
|
URLBase: string;
|
|
|
|
modals: Modals;
|
|
|
|
cssFile: string;
|
|
|
|
availableProfiles: Array<any>;
|
|
|
|
jfUsers: Array<Object>;
|
|
|
|
notifications_enabled: boolean;
|
|
|
|
token: string;
|
|
|
|
buttonWidth: number;
|
|
|
|
transitionEvent: string;
|
|
|
|
animationEvent: string;
|
2020-12-30 15:32:44 +00:00
|
|
|
tabs: Tabs;
|
|
|
|
invites: inviteList;
|
2020-12-30 18:31:38 +00:00
|
|
|
notifications: NotificationBox;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare interface NotificationBox {
|
|
|
|
connectionError: (timeout: number) => void;
|
2020-12-28 18:15:52 +00:00
|
|
|
}
|
|
|
|
|
2020-12-29 18:42:26 +00:00
|
|
|
declare interface Tabs {
|
|
|
|
tabs: Array<Tab>;
|
|
|
|
addTab: (tabID: string, preFunc?: () => void, postFunc?: () => void) => void;
|
|
|
|
switch: (tabID: string) => void;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare interface Tab {
|
|
|
|
tabID: string;
|
|
|
|
tabEl: HTMLDivElement;
|
|
|
|
buttonEl: HTMLSpanElement;
|
|
|
|
preFunc?: () => void;
|
|
|
|
postFunc?: () => void;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-28 18:15:52 +00:00
|
|
|
declare interface Modals {
|
|
|
|
about: Modal;
|
|
|
|
login: Modal;
|
|
|
|
addUser: Modal;
|
|
|
|
modifyUser: Modal;
|
|
|
|
deleteUser: Modal;
|
|
|
|
settingsRestart: Modal;
|
|
|
|
settingsRefresh: Modal;
|
|
|
|
ombiDefaults?: Modal;
|
|
|
|
newAccountSuccess?: Modal;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Invite {
|
|
|
|
code?: string;
|
|
|
|
expiresIn?: string;
|
|
|
|
remainingUses?: string;
|
|
|
|
email?: string;
|
2020-12-30 15:32:44 +00:00
|
|
|
usedBy?: string[][];
|
2020-12-28 18:15:52 +00:00
|
|
|
created?: string;
|
|
|
|
notifyExpiry?: boolean;
|
|
|
|
notifyCreation?: boolean;
|
|
|
|
profile?: string;
|
|
|
|
}
|
|
|
|
|
2020-12-30 15:32:44 +00:00
|
|
|
interface inviteList {
|
|
|
|
empty: boolean;
|
|
|
|
invites: { [code: string]: Invite }
|
|
|
|
add: (invite: Invite) => void;
|
|
|
|
reload: () => void;
|
|
|
|
}
|
|
|
|
|
2020-12-28 18:15:52 +00:00
|
|
|
declare var config: Object;
|
|
|
|
declare var modifiedConfig: Object;
|