mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 03:52:50 +08:00
feat: complete runtime and KAAK skin updates
This commit is contained in:
1 parent
c994722016
commit
7fd1ea96fe
40 files changed
+3436
-1088
No files matched your search
@@ -1,23 +1,10 @@
|
||||
<template>
|
||||
<div
|
||||
:class="[
|
||||
'desktop-audio-dock',
|
||||
{ 'desktop-audio-dock-room-panel': layout === 'room-panel' },
|
||||
]"
|
||||
class="desktop-audio-dock"
|
||||
data-ws-part="voice.audio-dock"
|
||||
role="toolbar"
|
||||
:aria-label="t('desktopAudioControls')"
|
||||
>
|
||||
<button
|
||||
v-if="layout === 'room-panel'"
|
||||
type="button"
|
||||
class="room-panel-audio-settings"
|
||||
:aria-label="t('voiceSettings')"
|
||||
:title="t('voiceSettings')"
|
||||
aria-haspopup="dialog"
|
||||
@click="emit('settings')"
|
||||
><Icon name="settings" :size="16" /><span>{{ t("voiceSettings") }}</span></button
|
||||
>
|
||||
<div class="desktop-audio-dock-copy"
|
||||
><strong>{{ t("desktopAudioControls") }}</strong
|
||||
><span>{{
|
||||
@@ -25,17 +12,6 @@
|
||||
}}</span></div
|
||||
>
|
||||
<div class="desktop-audio-dock-actions">
|
||||
<button
|
||||
v-if="layout === 'room-panel'"
|
||||
type="button"
|
||||
class="dock-audio-button noise-suppression-toggle"
|
||||
:class="{ active: noiseSuppressionEnabled, inactive: !noiseSuppressionEnabled }"
|
||||
:title="t('noiseSuppression')"
|
||||
:aria-label="t('noiseSuppression')"
|
||||
:aria-pressed="noiseSuppressionEnabled"
|
||||
@click="toggleNoiseSuppression"
|
||||
><Icon name="noise-suppression" :size="20" /></button
|
||||
>
|
||||
<div
|
||||
class="dock-hover-control"
|
||||
data-ws-part="voice.audio-dock.microphone"
|
||||
@@ -73,18 +49,16 @@
|
||||
:aria-label="t('inputVolume')"
|
||||
@input="onInputVolume"
|
||||
/>
|
||||
<template v-if="layout === 'default'">
|
||||
<div class="dock-panel-divider"></div>
|
||||
<label class="dock-switch-row"
|
||||
><span
|
||||
><strong>{{ t("noiseSuppression") }}</strong></span
|
||||
><input
|
||||
type="checkbox"
|
||||
:checked="noiseSuppressionEnabled"
|
||||
:aria-label="t('noiseSuppression')"
|
||||
@change="onNoiseSuppressionToggle"
|
||||
/></label>
|
||||
</template>
|
||||
<div class="dock-panel-divider"></div>
|
||||
<label class="dock-switch-row"
|
||||
><span
|
||||
><strong>{{ t("noiseSuppression") }}</strong></span
|
||||
><input
|
||||
type="checkbox"
|
||||
:checked="noiseSuppressionEnabled"
|
||||
:aria-label="t('noiseSuppression')"
|
||||
@change="onNoiseSuppressionToggle"
|
||||
/></label>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -127,7 +101,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
v-if="layout === 'default'"
|
||||
type="button"
|
||||
class="dock-audio-button"
|
||||
:title="t('audioSettings')"
|
||||
@@ -161,12 +134,10 @@ import type { useWebClientAudioControls } from "../../composables/useWebClientAu
|
||||
const props = defineProps<{
|
||||
model: Pick<ReturnType<typeof useVoiceWebSocket>, "microphoneMuted" | "inputVolume" | "outputVolume" | "outputMuted" | "noiseSuppressionEnabled" | "accompanimentActive">;
|
||||
controls: Pick<ReturnType<typeof useWebClientAudioControls>, "toggleMicrophone" | "toggleNoiseSuppression" | "onInputVolume" | "onOutputVolume" | "onNoiseSuppressionToggle" | "toggleAccompaniment">;
|
||||
layout?: "default" | "room-panel";
|
||||
t: (key: string) => string;
|
||||
rangeStyle: (value: number, max: number) => Record<string, string>;
|
||||
}>();
|
||||
const { microphoneMuted, inputVolume, outputVolume, outputMuted, noiseSuppressionEnabled, accompanimentActive } = props.model;
|
||||
const { toggleMicrophone, toggleNoiseSuppression, onInputVolume, onOutputVolume, onNoiseSuppressionToggle, toggleAccompaniment } = props.controls;
|
||||
const layout = props.layout ?? "default";
|
||||
const { toggleMicrophone, onInputVolume, onOutputVolume, onNoiseSuppressionToggle, toggleAccompaniment } = props.controls;
|
||||
const emit = defineEmits<{ settings: []; outputMute: [] }>();
|
||||
</script>
|
||||
@@ -108,15 +108,7 @@
|
||||
class="member-copy"
|
||||
data-ws-part="voice.member-row.copy"
|
||||
><strong>{{ memberDisplayName(member) }}</strong
|
||||
><span>{{
|
||||
member.away === true
|
||||
? t("away")
|
||||
: isSpeaking(member)
|
||||
? t("speaking")
|
||||
: member.away === false
|
||||
? member.isSelf ? t("yourDevice") : t("memberOnline")
|
||||
: t("statusUnknown")
|
||||
}}</span></div
|
||||
><span>{{ t(memberPresenceKey(member, isSpeaking(member))) }}</span></div
|
||||
>
|
||||
<div
|
||||
class="member-flags"
|
||||
@@ -130,13 +122,7 @@
|
||||
name="clock"
|
||||
:size="13" /></span
|
||||
><span
|
||||
v-if="member.inputMuted === undefined"
|
||||
class="unknown"
|
||||
:title="t('statusUnknown')"
|
||||
:aria-label="t('statusUnknown')"
|
||||
><Icon name="info" :size="13" /></span
|
||||
><span
|
||||
v-else-if="member.inputMuted"
|
||||
v-if="member.inputMuted"
|
||||
:title="t('inputMuted')"
|
||||
:aria-label="t('inputMuted')"
|
||||
><Icon
|
||||
@@ -202,6 +188,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { CSSProperties } from "vue";
|
||||
import Icon from "../Icon.vue";
|
||||
import { memberPresenceKey } from "../../services/member-presence.js";
|
||||
import type { TreeChannel } from "../../composables/useWebClientChannels.js";
|
||||
import type { useWebClientMembers } from "../../composables/useWebClientMembers.js";
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<template>
|
||||
<section
|
||||
:class="['chat-panel', { 'mobile-section-hidden': mobileHidden }]"
|
||||
:data-ws-chat-tab="chatTab"
|
||||
:data-ws-chat-panel-open="panelOpen"
|
||||
data-ws-part="voice.chat"
|
||||
>
|
||||
<div
|
||||
@@ -12,6 +14,7 @@
|
||||
<button
|
||||
type="button"
|
||||
data-ws-part="voice.chat.tab"
|
||||
data-ws-chat-kind="channel"
|
||||
:data-ws-state="chatTab === 'channel' ? 'active' : 'idle'"
|
||||
:class="{ active: chatTab === 'channel' }"
|
||||
@click="chatTab = 'channel'"
|
||||
@@ -24,6 +27,7 @@
|
||||
<button
|
||||
type="button"
|
||||
data-ws-part="voice.chat.tab"
|
||||
data-ws-chat-kind="server"
|
||||
:data-ws-state="chatTab === 'server' ? 'active' : 'idle'"
|
||||
:class="{ active: chatTab === 'server' }"
|
||||
@click="chatTab = 'server'"
|
||||
@@ -38,6 +42,7 @@
|
||||
:key="conversation.key"
|
||||
type="button"
|
||||
data-ws-part="voice.chat.tab"
|
||||
data-ws-chat-kind="private"
|
||||
:data-ws-state="
|
||||
chatTab === 'private' && privateConversationKey === conversation.key ? 'active' : 'idle'
|
||||
"
|
||||
@@ -52,6 +57,7 @@
|
||||
<button
|
||||
type="button"
|
||||
data-ws-part="voice.chat.tab"
|
||||
data-ws-chat-kind="events"
|
||||
:data-ws-state="chatTab === 'events' ? 'active' : 'idle'"
|
||||
:class="{ active: chatTab === 'events' }"
|
||||
@click="chatTab = 'events'"
|
||||
@@ -203,6 +209,7 @@ import type { ChatMessage, ServerEvent } from "../../composables/useVoiceWebSock
|
||||
|
||||
type ChatPanelModel = Pick<ReturnType<typeof useWebClientChat>,
|
||||
| "tab" | "privateConversationKey" | "canSend" | "status" | "messageDraft"
|
||||
| "panelOpen"
|
||||
| "listElement" | "conversations" | "visibleMessages" | "tabLabel" | "title"
|
||||
| "placeholder" | "openConversation" | "submitMessage" | "onScroll"
|
||||
>;
|
||||
@@ -223,6 +230,7 @@ const props = defineProps<{
|
||||
// Keep its list ref attached to the rendered scroller, including unmount cleanup.
|
||||
const {
|
||||
tab: chatTab,
|
||||
panelOpen,
|
||||
privateConversationKey,
|
||||
canSend: canSendChat,
|
||||
status: chatStatus,
|
||||
|
||||
Reference in new issue
Block a user