mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 03:52:50 +08:00
feat: refine KAAK navigation and join experience
This commit is contained in:
1 parent
319a16f384
commit
458f95c2dc
21 files changed
+2017
-996
No files matched your search
@@ -89,8 +89,9 @@
|
||||
<path d="M12 2v2m0 16v2M4.93 4.93l1.42 1.42m11.3 11.3 1.42 1.42M2 12h2m16 0h2M4.93 19.07l1.42-1.42m11.3-11.3 1.42-1.42" />
|
||||
</template>
|
||||
<path v-else-if="name === 'moon'" d="M20.4 15.2A8.5 8.5 0 0 1 8.8 3.6 8.5 8.5 0 1 0 20.4 15.2Z" />
|
||||
<path v-else-if="name === 'monitor'" d="M4 4h16v12H4zM8 20h8M12 16v4" />
|
||||
<path v-else-if="name === 'fullscreen'" d="M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5" />
|
||||
<path v-else-if="name === 'monitor'" d="M4 4h16v12H4zM8 20h8M12 16v4" />
|
||||
<path v-else-if="name === 'translate'" fill="currentColor" stroke="none" d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.99-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.14 8.44 10 10.47 8 12.1c-1.31-1.08-2.39-2.39-3.2-3.91H2.8c.93 2.07 2.26 3.9 4.05 5.41l-3.74 3.71L4.5 18.7 8 15.2l2.18 2.18.69-2.31zm4.63-6.07h-2L11 22h2l1.12-3h4.75L20 22h2l-4.5-13zm-2.62 8 1.62-4.33L18.12 17h-3.24z" />
|
||||
<path v-else-if="name === 'fullscreen'" d="M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5" />
|
||||
<path v-else-if="name === 'fullscreen-exit'" d="M9 4v5H4M20 9h-5V4M15 20v-5h5M4 15h5v5" />
|
||||
<path v-else-if="name === 'github'" fill="currentColor" stroke="none" d="M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91.58.11.79-.25.79-.56 0-.28-.01-1.02-.02-2-3.2.7-3.88-1.54-3.88-1.54-.53-1.33-1.28-1.68-1.28-1.68-1.04-.71.08-.7.08-.7 1.15.08 1.75 1.18 1.75 1.18 1.02 1.75 2.68 1.24 3.33.95.1-.74.4-1.24.73-1.52-2.55-.29-5.23-1.28-5.23-5.68 0-1.25.45-2.27 1.18-3.07-.12-.29-.51-1.45.11-3.03 0 0 .96-.31 3.15 1.17.91-.25 1.88-.38 2.85-.38.97 0 1.94.13 2.85.38 2.19-1.48 3.15-1.17 3.15-1.17.62 1.58.23 2.74.11 3.03.73.8 1.18 1.82 1.18 3.07 0 4.41-2.69 5.38-5.25 5.67.41.35.78 1.04.78 2.1 0 1.52-.01 2.75-.01 3.12 0 .3.21.67.8.56C20.71 21.39 24 17.08 24 12 24 5.65 18.35.5 12 .5Z" />
|
||||
<template v-else-if="name === 'qq'">
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
:aria-controls="menuId"
|
||||
@click.stop="toggle"
|
||||
>
|
||||
<Icon class="language-current-icon" name="translate" :size="24" />
|
||||
<span class="language-current-flag" aria-hidden="true">{{ currentLanguage.flag }}</span>
|
||||
<span class="language-current-code">{{ currentLanguage.code }}</span>
|
||||
<Icon name="chevron-down" :size="13" />
|
||||
@@ -130,12 +131,12 @@ onUnmounted(() => document.removeEventListener("pointerdown", onDocumentPointerD
|
||||
box-shadow: 0 7px 16px rgba(0, 106, 100, .16);
|
||||
}
|
||||
|
||||
.language-trigger .ui-icon {
|
||||
.language-trigger > .ui-icon:last-child {
|
||||
margin-left: auto;
|
||||
transition: transform .16s;
|
||||
}
|
||||
|
||||
.language-switcher.open .language-trigger .ui-icon {
|
||||
.language-switcher.open .language-trigger > .ui-icon:last-child {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
@@ -145,6 +146,10 @@ onUnmounted(() => document.removeEventListener("pointerdown", onDocumentPointerD
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.language-current-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.language-current-flag {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
@@ -169,21 +169,26 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<details
|
||||
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
|
||||
<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>
|
||||
|
||||
<details
|
||||
class="identity-options"
|
||||
data-ws-part="home.identity"
|
||||
><summary>{{ t("identityOptions") }}</summary
|
||||
><div class="identity-controls"
|
||||
><label class="remember-identity"
|
||||
><input
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
<div
|
||||
class="modal-backdrop channel-password-backdrop"
|
||||
data-ws-part="auth.password.backdrop"
|
||||
data-ws-state="server-password"
|
||||
@click.self="emit('cancel')"
|
||||
>
|
||||
<section
|
||||
class="channel-password-modal server-password-modal"
|
||||
data-ws-part="auth.password.dialog"
|
||||
data-ws-state="server-password"
|
||||
ref="dialog"
|
||||
tabindex="-1"
|
||||
@keydown="onDialogKeydown"
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
:avatar-style="avatarStyle"
|
||||
:avatar-initial="avatarInitial"
|
||||
:is-speaking="isSpeaking"
|
||||
:is-screen-sharing="isScreenSharing"
|
||||
:show-member-actions="showMemberActions"
|
||||
:member-drag-drop="memberDragDrop"
|
||||
:dragged-member-id="draggedMemberId"
|
||||
@@ -58,6 +59,7 @@ const props = defineProps<{
|
||||
avatarStyle: (name: string, isSelf?: boolean, avatar?: string) => CSSProperties;
|
||||
avatarInitial: (name: string) => string;
|
||||
isSpeaking: (member: ChannelMember) => boolean;
|
||||
isScreenSharing?: (member: ChannelMember) => boolean;
|
||||
showMemberActions?: boolean;
|
||||
memberDragDrop?: boolean;
|
||||
draggedMemberId?: number | null;
|
||||
|
||||
@@ -89,6 +89,14 @@
|
||||
:size="13"
|
||||
:title="t('microphoneActive')"
|
||||
/>
|
||||
<span
|
||||
v-if="isScreenSharing?.(member)"
|
||||
class="ws-voice-channel-member-screen-share"
|
||||
data-ws-part="voice.channel-tree.member-screen-share"
|
||||
role="img"
|
||||
:aria-label="t('screenShare')"
|
||||
:title="t('screenShare')"
|
||||
><Icon name="monitor" :size="12" /></span>
|
||||
</li>
|
||||
</ul>
|
||||
<div
|
||||
@@ -110,6 +118,7 @@
|
||||
:avatar-style="avatarStyle"
|
||||
:avatar-initial="avatarInitial"
|
||||
:is-speaking="isSpeaking"
|
||||
:is-screen-sharing="isScreenSharing"
|
||||
:show-member-actions="showMemberActions"
|
||||
:member-drag-drop="memberDragDrop"
|
||||
:dragged-member-id="draggedMemberId"
|
||||
@@ -176,6 +185,14 @@
|
||||
aria-hidden="true"
|
||||
></span>
|
||||
<span v-if="member.away" class="ws-voice-channel-member-away" data-ws-part="voice.channel-tree.member-away" aria-hidden="true">·</span>
|
||||
<span
|
||||
v-if="isScreenSharing?.(member)"
|
||||
class="ws-voice-channel-member-screen-share"
|
||||
data-ws-part="voice.channel-tree.member-screen-share"
|
||||
role="img"
|
||||
:aria-label="t('screenShare')"
|
||||
:title="t('screenShare')"
|
||||
><Icon name="monitor" :size="12" /></span>
|
||||
</li>
|
||||
<VoiceChannelTreeItem
|
||||
v-for="child in node.children"
|
||||
@@ -189,6 +206,7 @@
|
||||
:avatar-style="avatarStyle"
|
||||
:avatar-initial="avatarInitial"
|
||||
:is-speaking="isSpeaking"
|
||||
:is-screen-sharing="isScreenSharing"
|
||||
:show-member-actions="showMemberActions"
|
||||
:member-drag-drop="memberDragDrop"
|
||||
:dragged-member-id="draggedMemberId"
|
||||
@@ -228,6 +246,7 @@ const props = defineProps<{
|
||||
avatarStyle: (name: string, isSelf?: boolean, avatar?: string) => CSSProperties;
|
||||
avatarInitial: (name: string) => string;
|
||||
isSpeaking: (member: ChannelMember) => boolean;
|
||||
isScreenSharing?: (member: ChannelMember) => boolean;
|
||||
showMemberActions?: boolean;
|
||||
memberDragDrop?: boolean;
|
||||
draggedMemberId?: number | null;
|
||||
@@ -282,3 +301,18 @@ function handleChannelDrop(event: DragEvent): void {
|
||||
if (props.memberDragDrop) emit("channelDrop", { channel: props.node.channel, event });
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.ws-voice-channel-member-screen-share {
|
||||
display: inline-grid;
|
||||
box-sizing: border-box;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
flex: 0 0 18px;
|
||||
place-items: center;
|
||||
border-radius: 5px;
|
||||
color: #fff;
|
||||
background: #72c800;
|
||||
line-height: 0;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user