diff --git a/js/FileManager.ts b/js/FileManager.ts index 6a58f041..e810a223 100644 --- a/js/FileManager.ts +++ b/js/FileManager.ts @@ -311,7 +311,7 @@ class IconManager { if(id == 0) return $("
"); else if(id < 1000) - return $("
"); + return $("
"); let tag = $.spawn("div"); tag.addClass("icon_empty"); @@ -342,7 +342,7 @@ class IconManager { }); }).catch(reason => { console.error("Could not load icon " + id + ". Reason: " + reason); - loader.removeClass("icon_loading").addClass("icon client-warning").attr("tag", "Could not load icon " + id); + loader.removeClass("icon_loading").addClass("icon manager-warning").attr("tag", "Could not load icon " + id); }); } @@ -447,7 +447,7 @@ class AvatarManager { }).catch(reason => { console.error("Could not load avatar for " + client.clientNickName() + ". Reason: " + reason); //TODO Broken image - loader.addClass("icon client-warning").attr("tag", "Could not load avatar " + client.clientNickName()); + loader.addClass("icon manager-warning").attr("tag", "Could not load avatar " + client.clientNickName()); }); } diff --git a/js/InfoBar.ts b/js/InfoBar.ts index c9392eb9..cbad5cde 100644 --- a/js/InfoBar.ts +++ b/js/InfoBar.ts @@ -162,7 +162,7 @@ class InfoBar { .css("display", "flex") .css("margin-top", "5px") .css("align-items", "center"); - $.spawn("div").addClass("icon client-permission_server_groups").appendTo(header); + $.spawn("div").addClass("icon manager-permission_server_groups").appendTo(header); $.spawn("div").text("Server groups:").css("margin-left", "3px").css("font-weight", "bold").appendTo(header); header.appendTo(serverGroups); @@ -196,7 +196,7 @@ class InfoBar { .css("display", "flex") .css("margin-top", "10px") .css("align-items", "center"); - $.spawn("div").addClass("icon client-permission_channel").appendTo(header); + $.spawn("div").addClass("icon manager-permission_channel").appendTo(header); $.spawn("div").text("Channel group:").css("margin-left", "3px").css("font-weight", "bold").appendTo(header); header.appendTo(channelGroup); @@ -227,7 +227,7 @@ class InfoBar { { let spawnTag = (type: string, description: string) : JQuery => { return $.spawn("div").css("display", "inline-flex") - .append($.spawn("div").addClass("icon_x32 client-" + type).css("margin-right", "5px")) + .append($.spawn("div").addClass("icon_x32 manager-" + type).css("margin-right", "5px")) .append($.spawn("a").text(description).css("align-self", "center")); }; diff --git a/js/chat.ts b/js/chat.ts index 6d884fb2..59631f89 100644 --- a/js/chat.ts +++ b/js/chat.ts @@ -184,7 +184,7 @@ class ChatEntry { tag.append("" + this._name + ""); let closeTag = $.spawn("div"); - closeTag.addClass("btn_close icon client-tab_close_button"); + closeTag.addClass("btn_close icon manager-tab_close_button"); if(!this._closeable) closeTag.hide(); tag.append(closeTag); @@ -208,7 +208,7 @@ class ChatEntry { if(_this.closeable) { actions.push({ type: MenuEntryType.ENTRY, - icon: "client-tab_close_button", + icon: "manager-tab_close_button", name: "Close", callback: () => { chat.deleteChat(_this); @@ -218,7 +218,7 @@ class ChatEntry { actions.push({ type: MenuEntryType.ENTRY, - icon: "client-tab_close_button", + icon: "manager-tab_close_button", name: "Close all private tabs", callback: () => { //TODO Implement this? @@ -266,18 +266,18 @@ class ChatEntry { if(this._unread) { switch (this.type) { case ChatType.CLIENT: - return "client-new_chat"; + return "manager-new_chat"; } } switch (this.type) { case ChatType.SERVER: - return "client-server_log"; + return "manager-server_log"; case ChatType.CHANNEL: - return "client-channel_chat"; + return "manager-channel_chat"; case ChatType.CLIENT: - return "client-player_chat"; + return "manager-player_chat"; case ChatType.GENERAL: - return "client-channel_chat"; + return "manager-channel_chat"; } return ""; } diff --git a/js/connection.ts b/js/connection.ts index f055a05b..bcfa93b1 100644 --- a/js/connection.ts +++ b/js/connection.ts @@ -515,7 +515,7 @@ class ConnectionCommandHandler { let tree = this.connection._client.channelTree; let client = tree.findClient(json["clid"]); if(!client) { - console.error("Unknown client left!"); + console.error("Unknown manager left!"); return 0; } if(client == this.connection._client.getClient()) { @@ -558,7 +558,7 @@ class ConnectionCommandHandler { json["reasonmsg"] ); } else { - console.error("Unknown client left reason!"); + console.error("Unknown manager left reason!"); } tree.deleteClient(client); @@ -572,16 +572,16 @@ class ConnectionCommandHandler { let channel_from = tree.findChannel(json["cfid"]); if(!client) { - console.error("Unknown client move (Client)!"); + console.error("Unknown manager move (Client)!"); return 0; } if(!channel_to) { - console.error("Unknown client move (Channel to)!"); + console.error("Unknown manager move (Channel to)!"); return 0; } if(!channel_from) //Not critical - console.error("Unknown client move (Channel from)!"); + console.error("Unknown manager move (Channel from)!"); let self = client instanceof LocalClientEntry; if(self) { @@ -669,11 +669,11 @@ class ConnectionCommandHandler { let invoker = this.connection._client.channelTree.findClient(json["invokerid"]); let target = this.connection._client.channelTree.findClient(json["target"]); if(!invoker) { //TODO spawn chat (Client is may invisible) - console.error("Got private message from invalid client!"); + console.error("Got private message from invalid manager!"); return; } if(!target) { //TODO spawn chat (Client is may invisible) - console.error("Got private message from invalid client!"); + console.error("Got private message from invalid manager!"); return; } if(invoker == this.connection._client.getClient()) { @@ -693,7 +693,7 @@ class ConnectionCommandHandler { let client = this.connection._client.channelTree.findClient(json["clid"]); if(!client) { - console.error("Tried to update an non existing client"); + console.error("Tried to update an non existing manager"); return; } diff --git a/js/load.ts b/js/load.ts index 79e52670..f2921677 100644 --- a/js/load.ts +++ b/js/load.ts @@ -113,7 +113,7 @@ function loadRelease() { awaitLoad(loadScripts([ //Load general API's ["js/assembly/TeaWeb-Identity.js"], - ["js/client.min.js", "js/client.js", "generated/js/client.min.js", "generated/js/client.js"] + ["js/manager.min.js", "js/manager.js", "generated/js/manager.min.js", "generated/js/manager.js"] ])).then(() => { console.log("Loaded successfully all scripts!"); app.callbackApp(); @@ -147,7 +147,7 @@ function loadDebug() { "js/ui/modal/ModalChangeVolume.js", "js/ui/modal/ModalBanClient.js", "js/ui/channel.js", - "js/ui/client.js", + "js/ui/manager.js", "js/ui/MusicClient.js", "js/ui/server.js", "js/ui/view.js", @@ -173,7 +173,7 @@ function loadDebug() { "js/contextMenu.js", "js/connection.js", "js/FileManager.js", - "js/client.js", + "js/manager.js", "js/chat.js", "js/InfoBar.js", "js/Identity.js" diff --git a/js/ui/ControlBar.ts b/js/ui/ControlBar.ts index a7f31d22..f8e01e71 100644 --- a/js/ui/ControlBar.ts +++ b/js/ui/ControlBar.ts @@ -61,11 +61,11 @@ class ControlBar { if(flag) { if(!tag.hasClass("activated")) tag.addClass("activated"); - tag.find(".icon_x32").attr("class", "icon_x32 client-input_muted"); + tag.find(".icon_x32").attr("class", "icon_x32 manager-input_muted"); } else { if(tag.hasClass("activated")) tag.removeClass("activated"); - tag.find(".icon_x32").attr("class", "icon_x32 client-capture"); + tag.find(".icon_x32").attr("class", "icon_x32 manager-capture"); } @@ -87,11 +87,11 @@ class ControlBar { if(flag) { if(!tag.hasClass("activated")) tag.addClass("activated"); - tag.find(".icon_x32").attr("class", "icon_x32 client-output_muted"); + tag.find(".icon_x32").attr("class", "icon_x32 manager-output_muted"); } else { if(tag.hasClass("activated")) tag.removeClass("activated"); - tag.find(".icon_x32").attr("class", "icon_x32 client-volume"); + tag.find(".icon_x32").attr("class", "icon_x32 manager-volume"); } if(this.handle.serverConnection.connected) diff --git a/js/ui/MusicClient.ts b/js/ui/MusicClient.ts index a61c985c..32a04786 100644 --- a/js/ui/MusicClient.ts +++ b/js/ui/MusicClient.ts @@ -18,19 +18,19 @@ class MusicClientEntry extends ClientEntry { spawnMenu(x, y, { name: "Change bot name", - icon: "client-change_nickname", + icon: "manager-change_nickname", disabled: true, callback: () => {}, type: MenuEntryType.ENTRY }, { name: "Change bot description", - icon: "client-edit", + icon: "manager-edit", disabled: true, callback: () => {}, type: MenuEntryType.ENTRY }, { name: "Open music panel", - icon: "client-edit", + icon: "manager-edit", disabled: true, callback: () => {}, type: MenuEntryType.ENTRY @@ -38,7 +38,7 @@ class MusicClientEntry extends ClientEntry { MenuEntry.HR(), { name: "Delete bot", - icon: "client-delete", + icon: "manager-delete", disabled: true, callback: () => {}, type: MenuEntryType.ENTRY diff --git a/js/ui/channel.ts b/js/ui/channel.ts index d8868209..c62a9b09 100644 --- a/js/ui/channel.ts +++ b/js/ui/channel.ts @@ -143,7 +143,7 @@ class ChannelEntry { this._tag_channel.addClass(this._channelAlign); //For left let channelType = $.spawn("div"); - channelType.addClass("channel_only_normal channel_type icon client-channel_green_subscribed"); + channelType.addClass("channel_only_normal channel_type icon manager-channel_green_subscribed"); this._tag_channel.append(channelType); this._tag_channel.append($.spawn("div").addClass("channel_name_container").append($.spawn("a").addClass("channel_name").text(this.channelName()))); @@ -153,16 +153,16 @@ class ChannelEntry { iconTag.appendTo(this._tag_channel); //Default icon (4) - iconTag.append($.spawn("div").addClass("channel_only_normal").append($.spawn("div").addClass("icon_entry icon_default icon client-channel_default").attr("title", "Default channel"))); + iconTag.append($.spawn("div").addClass("channel_only_normal").append($.spawn("div").addClass("icon_entry icon_default icon manager-channel_default").attr("title", "Default channel"))); //Password icon (3) - iconTag.append($.spawn("div").addClass("channel_only_normal").append($.spawn("div").addClass("icon_entry icon_password icon client-register").attr("title", "The channel is password protected"))); + iconTag.append($.spawn("div").addClass("channel_only_normal").append($.spawn("div").addClass("icon_entry icon_password icon manager-register").attr("title", "The channel is password protected"))); //Music icon (2) - iconTag.append($.spawn("div").addClass("channel_only_normal").append($.spawn("div").addClass("icon_entry icon_music icon client-music").attr("title", "Music quality"))); + iconTag.append($.spawn("div").addClass("channel_only_normal").append($.spawn("div").addClass("icon_entry icon_music icon manager-music").attr("title", "Music quality"))); //Channel Icon (1) iconTag.append($.spawn("div").addClass("channel_only_normal").addClass("icon_entry channel_icon").attr("title", "Channel icon")); //Default no sound (0) let container = $.spawn("div"); - let noSound = $.spawn("div").addClass("icon_entry icon_no_sound icon client-conflict-icon").attr("title", "You don't support the channel codec"); + let noSound = $.spawn("div").addClass("icon_entry icon_no_sound icon manager-conflict-icon").attr("title", "You don't support the channel codec"); let bg = $.spawn("div") .width(10) .height(14) @@ -290,7 +290,7 @@ class ChannelEntry { spawnMenu(x, y, { type: MenuEntryType.ENTRY, - icon: "client-channel_switch", + icon: "manager-channel_switch", name: "Switch to channel", callback: () => { this.joinChannel(); @@ -299,7 +299,7 @@ class ChannelEntry { MenuEntry.HR(), { type: MenuEntryType.ENTRY, - icon: "client-channel_edit", + icon: "manager-channel_edit", name: "Edit channel", invalidPermission: !channelModify, callback: () => { @@ -312,7 +312,7 @@ class ChannelEntry { }, { type: MenuEntryType.ENTRY, - icon: "client-channel_delete", + icon: "manager-channel_delete", name: "Delete channel", invalidPermission: !flagDelete, callback: () => this.channelTree.client.serverConnection.sendCommand("channeldelete", {cid: this.channelId}) @@ -320,13 +320,13 @@ class ChannelEntry { MenuEntry.HR(), { type: MenuEntryType.ENTRY, - icon: "client-channel_create_sub", + icon: "manager-channel_create_sub", name: "Create sub channel", invalidPermission: !(channelCreate && this.channelTree.client.permissions.neededPermission(PermissionType.B_CHANNEL_CREATE_CHILD).granted(1)), callback: () => this.channelTree.spawnCreateChannel(this) }, { type: MenuEntryType.ENTRY, - icon: "client-channel_create", + icon: "manager-channel_create", name: "Create channel", invalidPermission: !channelCreate, callback: () => this.channelTree.spawnCreateChannel() @@ -441,7 +441,7 @@ class ChannelEntry { else type = "green"; - tag.addClass("client-channel_" + type + "_subscribed"); + tag.addClass("manager-channel_" + type + "_subscribed"); } createChatTag(braces: boolean = false) : JQuery { diff --git a/js/ui/client.ts b/js/ui/client.ts index 74d7235a..5832016f 100644 --- a/js/ui/client.ts +++ b/js/ui/client.ts @@ -108,7 +108,7 @@ class ClientEntry { spawnMenu(x, y, { type: MenuEntryType.ENTRY, - icon: "client-change_nickname", + icon: "manager-change_nickname", name: "Open text chat", callback: function () { chat.activeChat = _this.chat(true); @@ -116,12 +116,12 @@ class ClientEntry { } }, { type: MenuEntryType.ENTRY, - icon: "client-poke", - name: "Poke client", + icon: "manager-poke", + name: "Poke manager", callback: function () { - createInputModal("Poke client", "Poke message:
", text => true, result => { + createInputModal("Poke manager", "Poke message:
", text => true, result => { if(result) { - console.log("Poking client " + _this.clientNickName() + " with message " + result); + console.log("Poking manager " + _this.clientNickName() + " with message " + result); _this.channelTree.client.serverConnection.sendCommand("clientpoke", { clid: _this.clientId(), msg: result @@ -132,10 +132,10 @@ class ClientEntry { } }, { type: MenuEntryType.ENTRY, - icon: "client-edit", + icon: "manager-edit", name: "Change description", callback: function () { - createInputModal("Change client description", "New description:
", text => true, result => { + createInputModal("Change manager description", "New description:
", text => true, result => { if(result) { console.log("Changing " + _this.clientNickName() + "'s description to " + result); _this.channelTree.client.serverConnection.sendCommand("clientedit", { @@ -149,8 +149,8 @@ class ClientEntry { }, MenuEntry.HR(), { type: MenuEntryType.ENTRY, - icon: "client-move_client_to_own_channel", - name: "Move client to your channel", + icon: "manager-move_client_to_own_channel", + name: "Move manager to your channel", callback: () => { this.channelTree.client.serverConnection.sendCommand("clientmove", { clid: this.clientId(), @@ -159,12 +159,12 @@ class ClientEntry { } }, { type: MenuEntryType.ENTRY, - icon: "client-kick_channel", - name: "Kick client from channel", + icon: "manager-kick_channel", + name: "Kick manager from channel", callback: function () { - createInputModal("Kick client from channel", "Kick reason:
", text => true, result => { + createInputModal("Kick manager from channel", "Kick reason:
", text => true, result => { if(result) { - console.log("Kicking client " + _this.clientNickName() + " from channel with reason " + result); + console.log("Kicking manager " + _this.clientNickName() + " from channel with reason " + result); _this.channelTree.client.serverConnection.sendCommand("clientkick", { clid: _this.clientId(), reasonid: ViewReasonId.VREASON_CHANNEL_KICK, @@ -176,12 +176,12 @@ class ClientEntry { } }, { type: MenuEntryType.ENTRY, - icon: "client-kick_server", - name: "Kick client fom server", + icon: "manager-kick_server", + name: "Kick manager fom server", callback: function () { - createInputModal("Kick client from server", "Kick reason:
", text => true, result => { + createInputModal("Kick manager from server", "Kick reason:
", text => true, result => { if(result) { - console.log("Kicking client " + _this.clientNickName() + " from server with reason " + result); + console.log("Kicking manager " + _this.clientNickName() + " from server with reason " + result); _this.channelTree.client.serverConnection.sendCommand("clientkick", { clid: _this.clientId(), reasonid: ViewReasonId.VREASON_SERVER_KICK, @@ -193,8 +193,8 @@ class ClientEntry { } }, { type: MenuEntryType.ENTRY, - icon: "client-ban_client", - name: "Ban client", + icon: "manager-ban_client", + name: "Ban manager", invalidPermission: !this.channelTree.client.permissions.neededPermission(PermissionType.I_CLIENT_BAN_MAX_BANTIME).granted(1), callback: () => { Modals.spawnBanClient(this.properties.client_nickname, (duration, reason) => { @@ -209,7 +209,7 @@ class ClientEntry { MenuEntry.HR(), { type: MenuEntryType.ENTRY, - icon: "client-volume", + icon: "manager-volume", name: "Change Volume", callback: () => { Modals.spawnChangeVolume(this.audioController.volume, volume => { @@ -287,13 +287,13 @@ class ClientEntry { let icon: string = ""; let clicon: string = ""; if(this.properties.client_away) { - icon = "client-away"; + icon = "manager-away"; } else if(this.properties.client_output_muted) { - icon = "client-hardware_output_muted"; + icon = "manager-hardware_output_muted"; } else if(!this.properties.client_input_hardware) { - icon = "client-hardware_input_muted"; + icon = "manager-hardware_input_muted"; } else if(this.properties.client_input_muted) { - icon = "client-input_muted"; + icon = "manager-input_muted"; } else { if(this._speaking) { if(this.properties.client_is_channel_commander) @@ -335,7 +335,7 @@ class ClientEntry { this.properties[variable.key] = parseInt(variable.value); else this.properties[variable.key] = variable.value; - group.log("Updating client " + this.clientId() + ". Key " + variable.key + " Value: '" + variable.value + "' (" + typeof (this.properties[variable.key]) + ")"); + group.log("Updating manager " + this.clientId() + ". Key " + variable.key + " Value: '" + variable.value + "' (" + typeof (this.properties[variable.key]) + ")"); if(variable.key == "client_nickname") { this.tag.find(".name").text(variable.value); let chat = this.chat(false); @@ -464,7 +464,7 @@ class LocalClientEntry extends ClientEntry { private renaming: boolean; constructor(handle: TSClient) { - super(0, "local client"); + super(0, "local manager"); this.handle = handle; } @@ -474,12 +474,12 @@ class LocalClientEntry extends ClientEntry { spawnMenu(x, y, { name: "Change name", - icon: "client-change_nickname", + icon: "manager-change_nickname", callback: () =>_self.openRename(), type: MenuEntryType.ENTRY }, { name: "Change description", - icon: "client-edit", + icon: "manager-edit", callback: () => { createInputModal("Change own description", "New description:
", text => true, result => { if(result) { diff --git a/js/ui/modal/ModalBanClient.ts b/js/ui/modal/ModalBanClient.ts index 99c83671..c8884f37 100644 --- a/js/ui/modal/ModalBanClient.ts +++ b/js/ui/modal/ModalBanClient.ts @@ -6,7 +6,7 @@ namespace Modals { export function spawnBanClient(name: string, callback: (length: number, reason: string) => void) { const connectModal = createModal({ header: function() { - return "Ban client"; + return "Ban manager"; }, body: function () { let tag = $("#tmpl_client_ban").tmpl({ diff --git a/js/ui/server.ts b/js/ui/server.ts index 98746314..9538fdef 100644 --- a/js/ui/server.ts +++ b/js/ui/server.ts @@ -32,7 +32,7 @@ class ServerEntry { tag.attr("id", "server"); tag.addClass("server"); - tag.append($.spawn("div").addClass("server_type icon client-server_green")); + tag.append($.spawn("div").addClass("server_type icon manager-server_green")); tag.append($.spawn("a").addClass("name").text(this.properties.virtualserver_name)); const serverIcon = $(""); diff --git a/js/ui/view.ts b/js/ui/view.ts index 1ba013db..4ffd39ac 100644 --- a/js/ui/view.ts +++ b/js/ui/view.ts @@ -39,7 +39,7 @@ class ChannelTree { spawnMenu(x, y, { type: MenuEntryType.ENTRY, - icon: "client-channel_create", + icon: "manager-channel_create", name: "Create channel", invalidPermission: !channelCreate, callback: () => this.spawnCreateChannel() @@ -167,7 +167,7 @@ class ChannelTree { insertClient(client: ClientEntry, channel: ChannelEntry) : ClientEntry { let newClient = this.findClient(client.clientId()); - if(newClient) client = newClient; //Got new client :) + if(newClient) client = newClient; //Got new manager :) else this.clients.push(client); client.channelTree = this; diff --git a/js/voice/VoiceHandler.ts b/js/voice/VoiceHandler.ts index 7bce9eaa..e898395f 100644 --- a/js/voice/VoiceHandler.ts +++ b/js/voice/VoiceHandler.ts @@ -240,7 +240,7 @@ class VoiceConnection { //console.log("Client id " + clientId + " PacketID " + packetId + " Codec: " + codec); let client = this.client.channelTree.findClient(clientId); if(!client) { - console.error("Having voice from unknown client? (ClientID: " + clientId + ")"); + console.error("Having voice from unknown manager? (ClientID: " + clientId + ")"); return; } @@ -262,7 +262,7 @@ class VoiceConnection { codecPool.ownCodec(clientId) .then(decoder => decoder.decodeSamples(client.getAudioController().codecCache(codec), encodedData)) .then(buffer => client.getAudioController().playBuffer(buffer)).catch(error => { - console.error("Could not playback client's (" + clientId + ") audio (" + error + ")"); + console.error("Could not playback manager's (" + clientId + ") audio (" + error + ")"); }); } } @@ -280,7 +280,7 @@ class VoiceConnection { //TODO Use channel codec! this.codecPool[4].ownCodec(this.client.getClientId()) .then(encoder => encoder.encodeSamples(this.client.getClient().getAudioController().codecCache(4),data)); - //this.client.getClient().getAudioController().play(data); + //this.manager.getClient().getAudioController().play(data); } private handleVoiceEnded() {