TeaSpeak-Client/imports/shared-app/ui/modal/connect/Definitions.d.ts
2021-02-20 18:55:36 +01:00

62 lines
1.6 KiB
TypeScript

import { RemoteIconInfo } from "tc-shared/file/Icons";
export declare const kUnknownHistoryServerUniqueId = "unknown";
export declare type ConnectProfileEntry = {
id: string;
name: string;
valid: boolean;
};
export declare type ConnectHistoryEntry = {
id: number;
targetAddress: string;
uniqueServerId: string | typeof kUnknownHistoryServerUniqueId;
};
export declare type ConnectHistoryServerInfo = {
icon: RemoteIconInfo;
name: string;
password: boolean;
country: string;
clients: number | -1;
maxClients: number | -1;
};
export interface ConnectUiVariables {
"server_address": {
currentAddress: string;
defaultAddress?: string;
};
readonly "server_address_valid": boolean;
"nickname": {
currentNickname: string | undefined;
defaultNickname?: string;
};
readonly "nickname_valid": boolean;
"password": {
password: string;
hashed: boolean;
} | undefined;
"profiles": {
profiles?: ConnectProfileEntry[];
selected: string;
};
readonly "profile_valid": boolean;
"historyShown": boolean;
readonly "history": {
history: ConnectHistoryEntry[];
selected: number | -1;
};
readonly "history_entry": ConnectHistoryServerInfo;
readonly "history_connections": number;
}
export interface ConnectUiEvents {
action_manage_profiles: {};
action_select_history: {
id: number;
};
action_connect: {
newTab: boolean;
};
action_delete_history: {
target: string;
targetType: "address" | "server-unique-id";
};
}