2021-01-05 18:16:23 +00:00
|
|
|
declare interface Modal {
|
|
|
|
modal: HTMLElement;
|
|
|
|
closeButton: HTMLSpanElement
|
|
|
|
show: () => void;
|
|
|
|
close: (event?: Event) => void;
|
|
|
|
toggle: () => void;
|
2020-10-22 16:50:40 +00:00
|
|
|
}
|
|
|
|
|
2021-01-05 18:16:23 +00:00
|
|
|
interface ArrayConstructor {
|
|
|
|
from(arrayLike: any, mapFn?, thisArg?): Array<any>;
|
2020-10-22 16:50:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
declare interface Window {
|
2020-11-22 16:36:43 +00:00
|
|
|
URLBase: string;
|
2021-01-05 18:16:23 +00:00
|
|
|
modals: Modals;
|
2020-10-22 16:50:40 +00:00
|
|
|
cssFile: string;
|
2021-01-05 18:16:23 +00:00
|
|
|
availableProfiles: string[];
|
2020-10-22 16:50:40 +00:00
|
|
|
jfUsers: Array<Object>;
|
2021-01-05 18:16:23 +00:00
|
|
|
notificationsEnabled: boolean;
|
|
|
|
emailEnabled: boolean;
|
|
|
|
ombiEnabled: boolean;
|
|
|
|
usernameEnabled: boolean;
|
2020-10-22 16:50:40 +00:00
|
|
|
token: string;
|
|
|
|
buttonWidth: number;
|
2021-01-05 18:16:23 +00:00
|
|
|
transitionEvent: string;
|
|
|
|
animationEvent: string;
|
|
|
|
tabs: Tabs;
|
|
|
|
invites: inviteList;
|
|
|
|
notifications: NotificationBox;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare interface NotificationBox {
|
|
|
|
connectionError: () => void;
|
|
|
|
customError: (type: string, message: string) => void;
|
|
|
|
customPositive: (type: string, bold: string, message: string) => void;
|
2020-10-22 16:50:40 +00:00
|
|
|
}
|
|
|
|
|
2021-01-05 18:16:23 +00:00
|
|
|
declare interface Tabs {
|
|
|
|
current: string;
|
|
|
|
tabs: Array<Tab>;
|
|
|
|
addTab: (tabID: string, preFunc?: () => void, postFunc?: () => void) => void;
|
|
|
|
switch: (tabID: string, noRun?: boolean) => void;
|
2020-10-22 16:50:40 +00:00
|
|
|
}
|
|
|
|
|
2021-01-05 18:16:23 +00:00
|
|
|
declare interface Tab {
|
|
|
|
tabID: string;
|
|
|
|
tabEl: HTMLDivElement;
|
|
|
|
buttonEl: HTMLSpanElement;
|
|
|
|
preFunc?: () => void;
|
|
|
|
postFunc?: () => void;
|
2020-10-22 16:50:40 +00:00
|
|
|
}
|
|
|
|
|
2021-01-05 18:16:23 +00:00
|
|
|
|
|
|
|
declare interface Modals {
|
|
|
|
about: Modal;
|
|
|
|
login: Modal;
|
|
|
|
addUser: Modal;
|
|
|
|
modifyUser: Modal;
|
|
|
|
deleteUser: Modal;
|
|
|
|
settingsRestart: Modal;
|
|
|
|
settingsRefresh: Modal;
|
|
|
|
ombiDefaults?: Modal;
|
|
|
|
profiles: Modal;
|
|
|
|
addProfile: Modal;
|
2020-10-22 16:50:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
interface Invite {
|
|
|
|
code?: string;
|
|
|
|
expiresIn?: string;
|
|
|
|
remainingUses?: string;
|
|
|
|
email?: string;
|
2021-01-05 18:16:23 +00:00
|
|
|
usedBy?: string[][];
|
2020-10-22 16:50:40 +00:00
|
|
|
created?: string;
|
|
|
|
notifyExpiry?: boolean;
|
|
|
|
notifyCreation?: boolean;
|
|
|
|
profile?: string;
|
|
|
|
}
|
|
|
|
|
2021-01-05 18:16:23 +00:00
|
|
|
interface inviteList {
|
|
|
|
empty: boolean;
|
|
|
|
invites: { [code: string]: Invite }
|
|
|
|
add: (invite: Invite) => void;
|
|
|
|
reload: () => void;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare interface SubmitEvent extends Event {
|
|
|
|
submitter: HTMLInputElement;
|
|
|
|
}
|
|
|
|
|
2020-10-22 16:50:40 +00:00
|
|
|
declare var config: Object;
|
|
|
|
declare var modifiedConfig: Object;
|