Fixed compile errors
This commit is contained in:
parent
fb5487c756
commit
2f5c0f6143
6 changed files with 15 additions and 20 deletions
|
@ -1,6 +1,5 @@
|
||||||
import {ConnectionHandler, DisconnectReason} from "./ConnectionHandler";
|
import {ConnectionHandler, DisconnectReason} from "./ConnectionHandler";
|
||||||
import {Registry} from "./events";
|
import {Registry} from "./events";
|
||||||
import * as top_menu from "./ui/frames/MenuBarOld";
|
|
||||||
import * as loader from "tc-loader";
|
import * as loader from "tc-loader";
|
||||||
import {Stage} from "tc-loader";
|
import {Stage} from "tc-loader";
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import {guid} from "./crypto/uid";
|
||||||
import {createErrorModal, createInfoModal, createInputModal} from "./ui/elements/Modal";
|
import {createErrorModal, createInfoModal, createInputModal} from "./ui/elements/Modal";
|
||||||
import {defaultConnectProfile, findConnectProfile} from "./profiles/ConnectionProfile";
|
import {defaultConnectProfile, findConnectProfile} from "./profiles/ConnectionProfile";
|
||||||
import {spawnConnectModal} from "./ui/modal/ModalConnect";
|
import {spawnConnectModal} from "./ui/modal/ModalConnect";
|
||||||
import * as top_menu from "./ui/frames/MenuBarOld";
|
|
||||||
import {ConnectionHandler} from "./ConnectionHandler";
|
import {ConnectionHandler} from "./ConnectionHandler";
|
||||||
import {server_connections} from "tc-shared/ConnectionManager";
|
import {server_connections} from "tc-shared/ConnectionManager";
|
||||||
import {Registry} from "tc-shared/events";
|
import {Registry} from "tc-shared/events";
|
||||||
|
|
|
@ -13,7 +13,6 @@ import * as stats from "./stats";
|
||||||
import * as fidentity from "./profiles/identities/TeaForumIdentity";
|
import * as fidentity from "./profiles/identities/TeaForumIdentity";
|
||||||
import {defaultRecorder, RecorderProfile, setDefaultRecorder} from "tc-shared/voice/RecorderProfile";
|
import {defaultRecorder, RecorderProfile, setDefaultRecorder} from "tc-shared/voice/RecorderProfile";
|
||||||
import {spawnConnectModal} from "tc-shared/ui/modal/ModalConnect";
|
import {spawnConnectModal} from "tc-shared/ui/modal/ModalConnect";
|
||||||
import * as top_menu from "./ui/frames/MenuBarOld";
|
|
||||||
import {spawnYesNo} from "tc-shared/ui/modal/ModalYesNo";
|
import {spawnYesNo} from "tc-shared/ui/modal/ModalYesNo";
|
||||||
import {formatMessage} from "tc-shared/ui/frames/chat";
|
import {formatMessage} from "tc-shared/ui/frames/chat";
|
||||||
import {openModalNewcomer} from "tc-shared/ui/modal/ModalNewcomer";
|
import {openModalNewcomer} from "tc-shared/ui/modal/ModalNewcomer";
|
||||||
|
|
|
@ -11,7 +11,6 @@ import {createServerModal} from "../ui/modal/ModalServerEdit";
|
||||||
import {spawnIconSelect} from "../ui/modal/ModalIconSelect";
|
import {spawnIconSelect} from "../ui/modal/ModalIconSelect";
|
||||||
import {spawnAvatarList} from "../ui/modal/ModalAvatarList";
|
import {spawnAvatarList} from "../ui/modal/ModalAvatarList";
|
||||||
import {connection_log} from "../ui/modal/ModalConnect";
|
import {connection_log} from "../ui/modal/ModalConnect";
|
||||||
import * as top_menu from "../ui/frames/MenuBarOld";
|
|
||||||
import {Registry} from "../events";
|
import {Registry} from "../events";
|
||||||
import {ChannelTreeEntry, ChannelTreeEntryEvents} from "./ChannelTreeEntry";
|
import {ChannelTreeEntry, ChannelTreeEntryEvents} from "./ChannelTreeEntry";
|
||||||
|
|
||||||
|
@ -281,7 +280,7 @@ export class ServerEntry extends ChannelTreeEntry<ServerEvents> {
|
||||||
log.table(LogType.DEBUG, LogCategory.PERMISSIONS, "Server update properties", entries);
|
log.table(LogType.DEBUG, LogCategory.PERMISSIONS, "Server update properties", entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
let update_bannner = false, update_button = false, update_bookmarks = false;
|
let update_bannner = false, update_bookmarks = false;
|
||||||
for(let variable of variables) {
|
for(let variable of variables) {
|
||||||
JSON.map_field_to(this.properties, variable.value, variable.key);
|
JSON.map_field_to(this.properties, variable.value, variable.key);
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,11 @@ export type MenuEntryClickable = {
|
||||||
visible?: boolean;
|
visible?: boolean;
|
||||||
|
|
||||||
click?: () => void;
|
click?: () => void;
|
||||||
|
icon?: RemoteIcon | ClientIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ContextMenuEntryNormal = {
|
export type ContextMenuEntryNormal = {
|
||||||
type: "normal",
|
type: "normal",
|
||||||
icon?: RemoteIcon | ClientIcon,
|
|
||||||
subMenu?: ContextMenuEntry[],
|
subMenu?: ContextMenuEntry[],
|
||||||
} & MenuEntryClickable;
|
} & MenuEntryClickable;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ import * as log from "../../log";
|
||||||
import {LogCategory} from "../../log";
|
import {LogCategory} from "../../log";
|
||||||
import * as i18nc from "../../i18n/country";
|
import * as i18nc from "../../i18n/country";
|
||||||
import {formatMessage} from "../../ui/frames/chat";
|
import {formatMessage} from "../../ui/frames/chat";
|
||||||
import * as top_menu from "../frames/MenuBarOld";
|
|
||||||
import {generateIconJQueryTag, getIconManager} from "tc-shared/file/Icons";
|
import {generateIconJQueryTag, getIconManager} from "tc-shared/file/Icons";
|
||||||
|
|
||||||
export function spawnBookmarkModal() {
|
export function spawnBookmarkModal() {
|
||||||
|
@ -167,7 +166,7 @@ export function spawnBookmarkModal() {
|
||||||
);
|
);
|
||||||
|
|
||||||
container.appendTo(container_bookmarks);
|
container.appendTo(container_bookmarks);
|
||||||
container.on('click', event => {
|
container.on('click', () => {
|
||||||
if (selected_bookmark === entry)
|
if (selected_bookmark === entry)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -213,7 +212,7 @@ export function spawnBookmarkModal() {
|
||||||
|
|
||||||
/* buttons */
|
/* buttons */
|
||||||
{
|
{
|
||||||
button_delete.on('click', event => {
|
button_delete.on('click', () => {
|
||||||
if (!selected_bookmark) return;
|
if (!selected_bookmark) return;
|
||||||
|
|
||||||
if (selected_bookmark.type === BookmarkType.DIRECTORY && (selected_bookmark as DirectoryBookmark).content.length > 0) {
|
if (selected_bookmark.type === BookmarkType.DIRECTORY && (selected_bookmark as DirectoryBookmark).content.length > 0) {
|
||||||
|
@ -231,8 +230,8 @@ export function spawnBookmarkModal() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
button_add_folder.on('click', event => {
|
button_add_folder.on('click', () => {
|
||||||
createInputModal(tr("Enter a folder name"), tr("Enter the folder name"), text => {
|
createInputModal(tr("Enter a folder name"), tr("Enter the folder name"), () => {
|
||||||
return true;
|
return true;
|
||||||
}, result => {
|
}, result => {
|
||||||
if (result) {
|
if (result) {
|
||||||
|
@ -250,8 +249,8 @@ export function spawnBookmarkModal() {
|
||||||
}).open();
|
}).open();
|
||||||
});
|
});
|
||||||
|
|
||||||
button_add_bookmark.on('click', event => {
|
button_add_bookmark.on('click', () => {
|
||||||
createInputModal(tr("Enter a bookmark name"), tr("Enter the bookmark name"), text => {
|
createInputModal(tr("Enter a bookmark name"), tr("Enter the bookmark name"), () => {
|
||||||
return true;
|
return true;
|
||||||
}, result => {
|
}, result => {
|
||||||
if (result) {
|
if (result) {
|
||||||
|
@ -272,17 +271,17 @@ export function spawnBookmarkModal() {
|
||||||
}).open();
|
}).open();
|
||||||
});
|
});
|
||||||
|
|
||||||
button_connect_tab.on('click', event => {
|
button_connect_tab.on('click', () => {
|
||||||
boorkmak_connect(selected_bookmark as Bookmark, true);
|
boorkmak_connect(selected_bookmark as Bookmark, true);
|
||||||
modal.close();
|
modal.close();
|
||||||
}).toggle(!settings.static_global(Settings.KEY_DISABLE_MULTI_SESSION));
|
}).toggle(!settings.static_global(Settings.KEY_DISABLE_MULTI_SESSION));
|
||||||
|
|
||||||
button_connect.on('click', event => {
|
button_connect.on('click', () => {
|
||||||
boorkmak_connect(selected_bookmark as Bookmark, false);
|
boorkmak_connect(selected_bookmark as Bookmark, false);
|
||||||
modal.close();
|
modal.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
button_duplicate.on('click', event => {
|
button_duplicate.on('click', () => {
|
||||||
createInputModal(tr("Enter a bookmark name"), tr("Enter the bookmark name for the duplicate"), text => text.length > 0, result => {
|
createInputModal(tr("Enter a bookmark name"), tr("Enter the bookmark name for the duplicate"), text => text.length > 0, result => {
|
||||||
if (result) {
|
if (result) {
|
||||||
if (!selected_bookmark) return;
|
if (!selected_bookmark) return;
|
||||||
|
@ -313,7 +312,7 @@ export function spawnBookmarkModal() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
input_server_address.on('change keydown', event => {
|
input_server_address.on('change keydown', () => {
|
||||||
const address = input_server_address.val() as string;
|
const address = input_server_address.val() as string;
|
||||||
const valid = !!address.match(Regex.IP_V4) || !!address.match(Regex.IP_V6) || !!address.match(Regex.DOMAIN);
|
const valid = !!address.match(Regex.IP_V4) || !!address.match(Regex.IP_V6) || !!address.match(Regex.DOMAIN);
|
||||||
input_server_address.firstParent(".input-boxed").toggleClass("is-invalid", !valid);
|
input_server_address.firstParent(".input-boxed").toggleClass("is-invalid", !valid);
|
||||||
|
@ -336,13 +335,13 @@ export function spawnBookmarkModal() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
input_server_password.on("change keydown", event => {
|
input_server_password.on("change keydown", () => {
|
||||||
const password = input_server_password.val() as string;
|
const password = input_server_password.val() as string;
|
||||||
(selected_bookmark as Bookmark).server_properties.server_password = password;
|
(selected_bookmark as Bookmark).server_properties.server_password = password;
|
||||||
save_bookmark(selected_bookmark);
|
save_bookmark(selected_bookmark);
|
||||||
});
|
});
|
||||||
|
|
||||||
input_connect_profile.on('change', event => {
|
input_connect_profile.on('change', () => {
|
||||||
const id = input_connect_profile.val() as string;
|
const id = input_connect_profile.val() as string;
|
||||||
const profile = availableConnectProfiles().find(e => e.id === id);
|
const profile = availableConnectProfiles().find(e => e.id === id);
|
||||||
if (profile) {
|
if (profile) {
|
||||||
|
@ -394,7 +393,7 @@ export function spawnBookmarkModal() {
|
||||||
update_bookmark_list(undefined);
|
update_bookmark_list(undefined);
|
||||||
update_buttons();
|
update_buttons();
|
||||||
|
|
||||||
template.find(".button-close").on('click', event => modal.close());
|
template.find(".button-close").on('click', () => modal.close());
|
||||||
return template.children();
|
return template.children();
|
||||||
},
|
},
|
||||||
footer: undefined,
|
footer: undefined,
|
||||||
|
|
Loading…
Add table
Reference in a new issue