mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 03:52:50 +08:00
fix: consolidate audited dev updates
This commit is contained in:
1 parent
568b8fd8be
commit
0a552f7ee8
58 files changed
+1930
-132
No files matched your search
@@ -109,13 +109,13 @@
|
||||
data-ws-part="voice.member-row.copy"
|
||||
><strong>{{ memberDisplayName(member) }}</strong
|
||||
><span>{{
|
||||
member.away
|
||||
member.away === true
|
||||
? t("away")
|
||||
: isSpeaking(member)
|
||||
? t("speaking")
|
||||
: member.isSelf
|
||||
? t("yourDevice")
|
||||
: t("memberOnline")
|
||||
: member.away === false
|
||||
? member.isSelf ? t("yourDevice") : t("memberOnline")
|
||||
: t("statusUnknown")
|
||||
}}</span></div
|
||||
>
|
||||
<div
|
||||
@@ -130,7 +130,13 @@
|
||||
name="clock"
|
||||
:size="13" /></span
|
||||
><span
|
||||
v-if="member.inputMuted"
|
||||
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"
|
||||
:title="t('inputMuted')"
|
||||
:aria-label="t('inputMuted')"
|
||||
><Icon
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
ref="chatListEl"
|
||||
class="message-list"
|
||||
data-ws-part="voice.chat.messages"
|
||||
@scroll.passive="onScroll"
|
||||
>
|
||||
<div v-if="chatTab === 'events'">
|
||||
<article
|
||||
@@ -160,11 +161,16 @@
|
||||
v-if="chatTab !== 'events'"
|
||||
class="message-composer"
|
||||
data-ws-part="voice.chat.composer"
|
||||
@submit.prevent="submitMessage"
|
||||
@submit.prevent="!composing && submitMessage()"
|
||||
>
|
||||
<input
|
||||
v-model="messageDraft"
|
||||
maxlength="500"
|
||||
enterkeyhint="send"
|
||||
autocomplete="off"
|
||||
@compositionstart="composing = true"
|
||||
@compositionend="composing = false"
|
||||
@keydown.enter="guardComposition"
|
||||
:placeholder="chatPlaceholder"
|
||||
:aria-label="t('send')"
|
||||
/>
|
||||
@@ -173,6 +179,7 @@
|
||||
type="submit"
|
||||
:disabled="!canSendChat || !messageDraft.trim()"
|
||||
:title="t('send')"
|
||||
:aria-label="t('send')"
|
||||
><Icon
|
||||
name="send"
|
||||
:size="18"
|
||||
@@ -189,7 +196,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { CSSProperties } from "vue";
|
||||
import { ref, type CSSProperties } from "vue";
|
||||
import Icon from "../Icon.vue";
|
||||
import type { useWebClientChat } from "../../composables/useWebClientChat.js";
|
||||
import type { ChatMessage, ServerEvent } from "../../composables/useVoiceWebSocket.js";
|
||||
@@ -197,7 +204,7 @@ import type { ChatMessage, ServerEvent } from "../../composables/useVoiceWebSock
|
||||
type ChatPanelModel = Pick<ReturnType<typeof useWebClientChat>,
|
||||
| "tab" | "privateConversationKey" | "canSend" | "status" | "messageDraft"
|
||||
| "listElement" | "conversations" | "visibleMessages" | "tabLabel" | "title"
|
||||
| "placeholder" | "openConversation" | "submitMessage"
|
||||
| "placeholder" | "openConversation" | "submitMessage" | "onScroll"
|
||||
>;
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -228,5 +235,12 @@ const {
|
||||
placeholder: chatPlaceholder,
|
||||
openConversation,
|
||||
submitMessage,
|
||||
onScroll,
|
||||
} = props.model;
|
||||
|
||||
const composing = ref(false);
|
||||
function guardComposition(event: KeyboardEvent): void {
|
||||
// Android IME and Safari can confirm a candidate with Enter; that is not Send.
|
||||
if (composing.value || event.isComposing || event.keyCode === 229) event.preventDefault();
|
||||
}
|
||||
</script>
|
||||
@@ -23,6 +23,11 @@
|
||||
id="server-address"
|
||||
v-model="serverHost"
|
||||
autocomplete="url"
|
||||
inputmode="url"
|
||||
autocapitalize="none"
|
||||
autocorrect="off"
|
||||
:spellcheck="false"
|
||||
enterkeyhint="next"
|
||||
:placeholder="t('serverAddressPlaceholder')" /></div
|
||||
></label>
|
||||
<label
|
||||
@@ -39,6 +44,7 @@
|
||||
id="server-port"
|
||||
v-model="serverPort"
|
||||
inputmode="numeric"
|
||||
enterkeyhint="next"
|
||||
type="text"
|
||||
maxlength="5"
|
||||
:placeholder="t('serverPortPlaceholder')" /></div
|
||||
@@ -157,29 +163,7 @@
|
||||
autocomplete="nickname"
|
||||
maxlength="30"
|
||||
:placeholder="t('nicknamePlaceholder')"
|
||||
autofocus
|
||||
/>
|
||||
</div>
|
||||
|
||||
<label
|
||||
class="field-label"
|
||||
data-ws-part="home.field-label"
|
||||
for="channel"
|
||||
>{{ t("targetChannel") }} <span>{{ t("optional") }}</span></label
|
||||
>
|
||||
<div
|
||||
class="field-wrap"
|
||||
data-ws-part="home.field"
|
||||
>
|
||||
<Icon
|
||||
name="hash"
|
||||
:size="17"
|
||||
/>
|
||||
<input
|
||||
id="channel"
|
||||
v-model="channel"
|
||||
:placeholder="t('emptyDefault')"
|
||||
@keyup.enter="emit('connect')"
|
||||
:autofocus="autofocusNickname"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -187,6 +171,17 @@
|
||||
class="identity-options"
|
||||
data-ws-part="home.identity"
|
||||
><summary>{{ t("identityOptions") }}</summary
|
||||
><label
|
||||
class="field-label"
|
||||
data-ws-part="home.field-label"
|
||||
for="channel"
|
||||
>{{ t("targetChannel") }} <span>{{ t("optional") }}</span></label
|
||||
><div class="field-wrap" data-ws-part="home.field"><Icon name="hash" :size="17" /><input
|
||||
id="channel"
|
||||
v-model="channel"
|
||||
:placeholder="t('emptyDefault')"
|
||||
@keyup.enter="emit('connect')"
|
||||
/></div
|
||||
><div class="identity-controls"
|
||||
><label class="remember-identity"
|
||||
><input
|
||||
@@ -261,6 +256,7 @@ const rememberIdentity = defineModel<boolean>("rememberIdentity", { required: tr
|
||||
const accelerationRelayId = defineModel<string>("accelerationRelayId", { required: true });
|
||||
|
||||
defineProps<{
|
||||
autofocusNickname?: boolean;
|
||||
accessMode: "fixed" | "open";
|
||||
openTargetPrefillBlocked: boolean;
|
||||
accelerationRelays: ReadonlyArray<{ id: string; name: string }>;
|
||||
|
||||
Reference in new issue
Block a user