diff --git a/ChangeLog.md b/ChangeLog.md index 7347a177..7165537d 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,4 +1,8 @@ # Changelog: +* **20.02.21** + - Improved the browser IPC module + - Added support for client invite links + * **15.02.21** - Fixed critical bug within the event registry class - Added a dropdown for the microphone control button to quickly change microphones diff --git a/shared/js/clientservice/index.ts b/shared/js/clientservice/index.ts index 375b8bb8..220b33db 100644 --- a/shared/js/clientservice/index.ts +++ b/shared/js/clientservice/index.ts @@ -14,7 +14,7 @@ loader.register_task(Stage.JAVASCRIPT_INITIALIZING, { function: async () => { clientServices = new ClientServices(new class implements ClientServiceConfig { getServiceHost(): string { - return "localhost:1244"; + //return "localhost:1244"; return "client-services.teaspeak.de:27791"; } diff --git a/shared/js/text/bbcode/InviteController.ts b/shared/js/text/bbcode/InviteController.ts index bb69756b..3482c7f0 100644 --- a/shared/js/text/bbcode/InviteController.ts +++ b/shared/js/text/bbcode/InviteController.ts @@ -78,7 +78,7 @@ async function executePendingInvites() { while(pendingInviteQueries.length > 0) { const invite = pendingInviteQueries.pop_front(); await invite(); - await new Promise(resolve => setTimeout(resolve, 3000)); + await new Promise(resolve => setTimeout(resolve, 500)); } executingPendingInvites = false; diff --git a/shared/js/text/bbcode/InviteRenderer.tsx b/shared/js/text/bbcode/InviteRenderer.tsx index 2b960450..df5f20f1 100644 --- a/shared/js/text/bbcode/InviteRenderer.tsx +++ b/shared/js/text/bbcode/InviteRenderer.tsx @@ -216,7 +216,6 @@ loader.register_task(loader.Stage.JAVASCRIPT_INITIALIZING, { function handleIpcMessage(remoteId: string, broadcast: boolean, message: ChannelMessage) { - console.error(message); if(message.type === "query-result") { if(!localInviteCache[message.data.linkId]) { return; diff --git a/shared/js/ui/frames/side/PopoutConversationRenderer.tsx b/shared/js/ui/frames/side/PopoutConversationRenderer.tsx index fe17eca0..b98b92ef 100644 --- a/shared/js/ui/frames/side/PopoutConversationRenderer.tsx +++ b/shared/js/ui/frames/side/PopoutConversationRenderer.tsx @@ -1,4 +1,4 @@ -import {Registry, RegistryMap} from "tc-shared/events"; +import {IpcRegistryDescription, Registry} from "tc-shared/events"; import {AbstractConversationUiEvents} from "./AbstractConversationDefinitions"; import {ConversationPanel} from "./AbstractConversationRenderer"; import * as React from "react"; @@ -8,11 +8,11 @@ class PopoutConversationRenderer extends AbstractModal { private readonly events: Registry; private readonly userData: any; - constructor(registryMap: RegistryMap, userData: any) { + constructor(events: IpcRegistryDescription, userData: any) { super(); this.userData = userData; - this.events = registryMap["default"] as any; + this.events = Registry.fromIpcDescription(events); } renderBody() { diff --git a/shared/tsconfig/tsconfig.declarations.json b/shared/tsconfig/tsconfig.declarations.json index 8b42e72e..38ad8aa7 100644 --- a/shared/tsconfig/tsconfig.declarations.json +++ b/shared/tsconfig/tsconfig.declarations.json @@ -13,7 +13,9 @@ "tc-backend/*": ["shared/backend.d/*"], "tc-loader": ["loader/exports/loader.d.ts"], "svg-sprites/*": ["shared/svg-sprites/*"], - "vendor/xbbcode/*": ["vendor/xbbcode/src/*"] + "vendor/xbbcode/*": ["vendor/xbbcode/src/*"], + "tc-events": ["vendor/TeaEventBus/src/index.ts"], + "tc-services": ["vendor/TeaClientServices/src/index.ts"] } }, "exclude": [ @@ -24,6 +26,8 @@ "../js/main.tsx", "../backend.d", "../js/**/*.ts", - "../../webpack/build-definitions.d.ts" + "../../webpack/build-definitions.d.ts", + "../../vendor/TeaEventBus/src/**/*.ts", + "../../vendor/TeaClientServices/src/**/*.ts" ] } \ No newline at end of file diff --git a/web/app/ExternalModalFactory.ts b/web/app/ExternalModalFactory.ts index bf5595e0..f7873d89 100644 --- a/web/app/ExternalModalFactory.ts +++ b/web/app/ExternalModalFactory.ts @@ -1,7 +1,6 @@ import {AbstractExternalModalController} from "tc-shared/ui/react-elements/external-modal/Controller"; import {spawnYesNo} from "tc-shared/ui/modal/ModalYesNo"; -import * as ipc from "tc-shared/ipc/BrowserIPC"; -import {ChannelMessage} from "tc-shared/ipc/BrowserIPC"; +import {ChannelMessage, getIpcInstance} from "tc-shared/ipc/BrowserIPC"; import {LogCategory, logDebug, logWarn} from "tc-shared/log"; import {Popout2ControllerMessages, PopoutIPCMessage} from "tc-shared/ui/react-elements/external-modal/IPCMessage"; import {tr, tra} from "tc-shared/i18n/localize"; @@ -91,8 +90,8 @@ export class ExternalModalController extends AbstractExternalModalController { "chunk": "modal-external", "modal-target": this.modalType, "modal-identify": this.ipcAuthenticationCode, - "ipc-address": ipc.getIpcInstance().getApplicationChannelId(), - "ipc-core-peer": ipc.getIpcInstance().getLocalPeerId(), + "ipc-address": getIpcInstance().getApplicationChannelId(), + "ipc-core-peer": getIpcInstance().getLocalPeerId(), "disableGlobalContextMenu": __build.mode === "debug" ? 1 : 0, "loader-abort": __build.mode === "debug" ? 1 : 0, };