mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-02 19:42:51 +08:00
feat: support TeamSpeak server nickname connections
This commit is contained in:
1 parent
35dde81cc2
commit
60d3cfd569
21 files changed
+644
-87
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { computed, nextTick, watch, type Ref } from "vue";
|
||||
import type { WebClientChatTab } from "./useWebClientChat.js";
|
||||
import type { TreeChannel } from "./useWebClientChannels.js";
|
||||
import { combineTeamSpeakTarget, isValidTeamSpeakPort } from "../services/teamspeak-target.js";
|
||||
import { combineTeamSpeakTarget, isValidTeamSpeakPort, suggestedTeamSpeakPort } from "../services/teamspeak-target.js";
|
||||
|
||||
interface ChannelPasswordDialogState {
|
||||
open: boolean;
|
||||
@@ -86,6 +86,10 @@ export function useWebClientConnection({
|
||||
&& (accessMode.value === "fixed" || (serverHost.value.trim() && isValidTeamSpeakPort(serverPort.value))),
|
||||
));
|
||||
|
||||
watch(serverHost, (address, previousAddress) => {
|
||||
serverPort.value = suggestedTeamSpeakPort(previousAddress, address, serverPort.value);
|
||||
}, { flush: "sync" });
|
||||
|
||||
function currentServerTarget(): string {
|
||||
return combineTeamSpeakTarget(serverHost.value, serverPort.value);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user