mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 12:02:50 +08:00
feat(kaak): refine voice dock visuals
This commit is contained in:
1 parent
16df12e4b2
commit
13f4ddac4d
19 files changed
+4573
-3971
No files matched your search
@@ -1,10 +1,23 @@
|
||||
<template>
|
||||
<div
|
||||
class="desktop-audio-dock"
|
||||
:class="[
|
||||
'desktop-audio-dock',
|
||||
{ 'desktop-audio-dock-room-panel': layout === 'room-panel' },
|
||||
]"
|
||||
data-ws-part="voice.audio-dock"
|
||||
role="toolbar"
|
||||
:aria-label="t('desktopAudioControls')"
|
||||
>
|
||||
<button
|
||||
v-if="layout === 'room-panel'"
|
||||
type="button"
|
||||
class="room-panel-voice-sensitivity"
|
||||
:aria-label="t('voiceActivity')"
|
||||
:title="t('voiceActivity')"
|
||||
aria-haspopup="dialog"
|
||||
@click="emit('settings')"
|
||||
><Icon name="activity" :size="16" /><span>{{ t("voiceActivity") }}</span></button
|
||||
>
|
||||
<div class="desktop-audio-dock-copy"
|
||||
><strong>{{ t("desktopAudioControls") }}</strong
|
||||
><span>{{
|
||||
@@ -12,6 +25,17 @@
|
||||
}}</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 }"
|
||||
: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"
|
||||
@@ -49,16 +73,18 @@
|
||||
:aria-label="t('inputVolume')"
|
||||
@input="onInputVolume"
|
||||
/>
|
||||
<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 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>
|
||||
</div>
|
||||
<div
|
||||
@@ -101,6 +127,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
v-if="layout === 'default'"
|
||||
type="button"
|
||||
class="dock-audio-button"
|
||||
:title="t('audioSettings')"
|
||||
@@ -133,11 +160,13 @@ 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" | "onInputVolume" | "onOutputVolume" | "onNoiseSuppressionToggle" | "toggleAccompaniment">;
|
||||
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, onInputVolume, onOutputVolume, onNoiseSuppressionToggle, toggleAccompaniment } = props.controls;
|
||||
const { toggleMicrophone, toggleNoiseSuppression, onInputVolume, onOutputVolume, onNoiseSuppressionToggle, toggleAccompaniment } = props.controls;
|
||||
const layout = props.layout ?? "default";
|
||||
const emit = defineEmits<{ settings: []; outputMute: [] }>();
|
||||
</script>
|
||||
Reference in new issue
Block a user