mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 03:52:50 +08:00
fix: preserve accompaniment levels and channel password retry
This commit is contained in:
1 parent
52ff0560d1
commit
335d93a8b8
5 files changed
+140
-22
No files matched your search
Generated
+2
-2
@@ -10,7 +10,7 @@
|
||||
"license": "AGPL-3.0-only",
|
||||
"dependencies": {
|
||||
"@discordjs/opus": "^0.10.0",
|
||||
"@echosixhiya/teamspeak-client": "git+https://github.com/EchoSixHIYA/teamspeak-js.git#4e9edf7",
|
||||
"@echosixhiya/teamspeak-client": "git+https://github.com/EchoSixHIYA/teamspeak-js.git#8d91c30",
|
||||
"express": "^5.2.1",
|
||||
"pino": "^10.3.1",
|
||||
"werift": "0.24.4",
|
||||
@@ -63,7 +63,7 @@
|
||||
},
|
||||
"node_modules/@echosixhiya/teamspeak-client": {
|
||||
"version": "0.2.4",
|
||||
"resolved": "git+https://github.com/EchoSixHIYA/teamspeak-js.git#4e9edf7198418d8a0a0eff97e05aa2b3369c2fe0",
|
||||
"resolved": "git+https://github.com/EchoSixHIYA/teamspeak-js.git#8d91c300438b45c2f5e96638daabbc68277f378b",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@noble/curves": "^2.0.1"
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@discordjs/opus": "^0.10.0",
|
||||
"@echosixhiya/teamspeak-client": "git+https://github.com/EchoSixHIYA/teamspeak-js.git#4e9edf7",
|
||||
"@echosixhiya/teamspeak-client": "git+https://github.com/EchoSixHIYA/teamspeak-js.git#8d91c30",
|
||||
"express": "^5.2.1",
|
||||
"pino": "^10.3.1",
|
||||
"werift": "0.24.4",
|
||||
|
||||
@@ -184,17 +184,21 @@ export class WebRtcAudioSession {
|
||||
if (!this.opusPayloadTypes.has(rtp.header.payloadType)) return;
|
||||
const payload = Buffer.from(rtp.payload);
|
||||
// The track is a browser-side mix of microphone and accompaniment.
|
||||
// Decode it once to reject malformed RTP. A normal microphone still
|
||||
// uses the low-level comfort-noise gate, while accompaniment must not
|
||||
// be treated as speech: quiet music frames are valid audio and are
|
||||
// forwarded with TeamSpeak's music codec marker.
|
||||
// Accompaniment is already a complete Opus stream. Forward it as-is:
|
||||
// do not decode it for RMS analysis or pass it through any speech
|
||||
// gate, because either step can discard valid quiet music frames.
|
||||
if (this.accompanimentActive) {
|
||||
this.onVoiceFrame(payload, 5);
|
||||
return;
|
||||
}
|
||||
// A normal microphone still uses the low-level comfort-noise gate.
|
||||
const rms = this.getIngressRms(payload);
|
||||
if (rms === null) return;
|
||||
if (!this.accompanimentActive && rms < MIN_FORWARD_RMS) {
|
||||
if (rms < MIN_FORWARD_RMS) {
|
||||
this.stats.webrtcIngressQuietFrames++;
|
||||
return;
|
||||
}
|
||||
this.onVoiceFrame(payload, this.accompanimentActive ? 5 : 4);
|
||||
this.onVoiceFrame(payload, 4);
|
||||
});
|
||||
void audio.sender.replaceTrack(this.outgoingTrack).catch((error: unknown) => {
|
||||
this.logger.warn({ err: error instanceof Error ? error.message : String(error) }, "Could not attach WebRTC output track");
|
||||
|
||||
@@ -12,6 +12,7 @@ export interface VoiceState {
|
||||
tsClientId: number;
|
||||
error: string;
|
||||
errorCode: string;
|
||||
channelSwitchedChannelId: string;
|
||||
}
|
||||
|
||||
export interface ChannelMember {
|
||||
@@ -78,7 +79,7 @@ export interface ServerEvent {
|
||||
|
||||
export function useVoiceWebSocket() {
|
||||
const ws = ref<WebSocket | null>(null);
|
||||
const state = reactive<VoiceState>({ connected: false, connecting: false, reconnecting: false, reconnectAttempt: 0, reconnectFailed: false, tsClientId: 0, error: "", errorCode: "" });
|
||||
const state = reactive<VoiceState>({ connected: false, connecting: false, reconnecting: false, reconnectAttempt: 0, reconnectFailed: false, tsClientId: 0, error: "", errorCode: "", channelSwitchedChannelId: "" });
|
||||
const members = reactive<ChannelMember[]>([]);
|
||||
const channels = reactive<ChannelInfo[]>([]);
|
||||
const chatMessages = reactive<ChatMessage[]>([]);
|
||||
@@ -117,7 +118,6 @@ export function useVoiceWebSocket() {
|
||||
let webrtcMixMicSource: MediaStreamAudioSourceNode | null = null;
|
||||
let webrtcMixMicGain: GainNode | null = null;
|
||||
let webrtcMixAccompanimentSource: MediaStreamAudioSourceNode | null = null;
|
||||
let webrtcMixAccompanimentGain: GainNode | null = null;
|
||||
let webrtcMicMonitorSource: MediaStreamAudioSourceNode | null = null;
|
||||
let webrtcMicMonitorAnalyser: AnalyserNode | null = null;
|
||||
let webrtcMicMonitorGain: GainNode | null = null;
|
||||
@@ -486,12 +486,10 @@ export function useVoiceWebSocket() {
|
||||
|
||||
function stopWebRtcMix(): void {
|
||||
webrtcMixAccompanimentSource?.disconnect();
|
||||
webrtcMixAccompanimentGain?.disconnect();
|
||||
webrtcMixMicSource?.disconnect();
|
||||
webrtcMixMicGain?.disconnect();
|
||||
webrtcMixDestination?.disconnect();
|
||||
webrtcMixAccompanimentSource = null;
|
||||
webrtcMixAccompanimentGain = null;
|
||||
webrtcMixMicSource = null;
|
||||
webrtcMixMicGain = null;
|
||||
webrtcMixDestination = null;
|
||||
@@ -523,12 +521,11 @@ export function useVoiceWebSocket() {
|
||||
const accompanimentTrack = accompanimentStream?.getAudioTracks()[0];
|
||||
if (accompanimentTrack) {
|
||||
const accompanimentSource = ctx.createMediaStreamSource(accompanimentStream!);
|
||||
const accompanimentGain = ctx.createGain();
|
||||
accompanimentGain.gain.value = 0.78;
|
||||
accompanimentSource.connect(accompanimentGain);
|
||||
accompanimentGain.connect(destination);
|
||||
// Keep the captured application audio at its source level. Do not add
|
||||
// a fixed attenuation/gain node: it makes music sound quieter than the
|
||||
// source and encourages later "compensation" steps to pump its volume.
|
||||
accompanimentSource.connect(destination);
|
||||
webrtcMixAccompanimentSource = accompanimentSource;
|
||||
webrtcMixAccompanimentGain = accompanimentGain;
|
||||
}
|
||||
return destination.stream;
|
||||
}
|
||||
@@ -554,7 +551,16 @@ export function useVoiceWebSocket() {
|
||||
throw new Error("伴奏功能需要启用 WebRTC");
|
||||
}
|
||||
|
||||
const audioConstraints = {} as MediaTrackConstraints & { restrictOwnAudio?: boolean };
|
||||
const captureProcessingConstraints: MediaTrackConstraints = {
|
||||
// Display/application audio must not pass through browser voice
|
||||
// processing. Those processors are designed for speech and can change
|
||||
// music level from frame to frame (AGC), suppress quiet passages, or
|
||||
// cancel sustained tones.
|
||||
autoGainControl: false,
|
||||
echoCancellation: false,
|
||||
noiseSuppression: false,
|
||||
};
|
||||
const audioConstraints = { ...captureProcessingConstraints } as MediaTrackConstraints & { restrictOwnAudio?: boolean };
|
||||
const supportedConstraints = navigator.mediaDevices.getSupportedConstraints?.() as Record<string, boolean> | undefined;
|
||||
if (supportedConstraints?.restrictOwnAudio) audioConstraints.restrictOwnAudio = true;
|
||||
const options = {
|
||||
@@ -581,6 +587,18 @@ export function useVoiceWebSocket() {
|
||||
throw new Error("所选来源没有可共享音频");
|
||||
}
|
||||
|
||||
try {
|
||||
// Do not pass the Chromium-only restrictOwnAudio hint to
|
||||
// applyConstraints: rejecting an unknown key could otherwise cause the
|
||||
// browser to discard all three standard processing-off constraints.
|
||||
await audioTrack.applyConstraints(captureProcessingConstraints);
|
||||
} catch {
|
||||
// Some browsers expose display audio but reject one or more optional
|
||||
// processing constraints. The capture can still proceed without
|
||||
// introducing a WebSpeak-side gain stage.
|
||||
}
|
||||
if ("contentHint" in audioTrack) audioTrack.contentHint = "music";
|
||||
|
||||
accompanimentStream?.getTracks().forEach((track) => track.stop());
|
||||
accompanimentStream = nextStream;
|
||||
accompanimentActive.value = true;
|
||||
@@ -1158,6 +1176,7 @@ export function useVoiceWebSocket() {
|
||||
state.reconnectFailed = false;
|
||||
state.tsClientId = 0;
|
||||
state.errorCode = "";
|
||||
state.channelSwitchedChannelId = "";
|
||||
if (!keepRememberedIdentity) identityMaterial.value = "";
|
||||
members.length = 0;
|
||||
channels.length = 0;
|
||||
@@ -1185,6 +1204,7 @@ export function useVoiceWebSocket() {
|
||||
state.reconnectFailed = false;
|
||||
state.error = "";
|
||||
state.errorCode = "";
|
||||
state.channelSwitchedChannelId = "";
|
||||
state.tsClientId = Number(msg.tsClientId) || 0;
|
||||
applyWhisperState(msg.whisperTargetIds, msg.whisperActive);
|
||||
if (Array.isArray(msg.members)) {
|
||||
@@ -1271,6 +1291,9 @@ export function useVoiceWebSocket() {
|
||||
});
|
||||
break;
|
||||
case "channelSwitched":
|
||||
state.channelSwitchedChannelId = typeof msg.channelId === "string" || typeof msg.channelId === "number" ? String(msg.channelId) : "";
|
||||
state.error = "";
|
||||
state.errorCode = "";
|
||||
break;
|
||||
case "disconnected":
|
||||
state.connected = false;
|
||||
@@ -1349,6 +1372,7 @@ export function useVoiceWebSocket() {
|
||||
function switchChannel(channelId: string, password = ""): void {
|
||||
state.error = "";
|
||||
state.errorCode = "";
|
||||
state.channelSwitchedChannelId = "";
|
||||
sendCmd("switchChannel", { channelId, ...(password ? { password } : {}) });
|
||||
}
|
||||
|
||||
|
||||
@@ -247,6 +247,23 @@
|
||||
<button type="button" @click="copyMemberName(memberMenu.member); memberMenu = null"><Icon name="copy" :size="15" /> {{ t('copyNickname') }}</button>
|
||||
</div>
|
||||
|
||||
<!-- Protected channel password modal -->
|
||||
<div v-if="channelPasswordDialog.open" class="modal-backdrop channel-password-backdrop" @click.self="cancelChannelPassword">
|
||||
<section class="channel-password-modal" role="dialog" aria-modal="true" :aria-labelledby="'channel-password-title'" @click.stop>
|
||||
<button type="button" class="qq-modal-close" :aria-label="t('close')" :title="t('close')" @click="cancelChannelPassword"><Icon name="close" :size="19" /></button>
|
||||
<div class="channel-password-icon"><Icon name="lock" :size="22" /></div>
|
||||
<span class="card-kicker">{{ t('channelPasswordPrompt') }}</span>
|
||||
<h2 id="channel-password-title">{{ t('channelPasswordTitle') }}</h2>
|
||||
<p>{{ t('channelPasswordLead') }}</p>
|
||||
<form class="channel-password-form" @submit.prevent="submitChannelPassword">
|
||||
<label class="field-label" for="channel-password-input">{{ t('channelPasswordPrompt') }}</label>
|
||||
<div class="field-wrap"><Icon name="lock" :size="17" /><input id="channel-password-input" v-model="channelPasswordDialog.password" type="password" autocomplete="current-password" :placeholder="t('channelPasswordPlaceholder')" :disabled="channelPasswordDialog.submitting" autofocus /></div>
|
||||
<div v-if="channelPasswordDialog.error" class="notice error-notice channel-password-error"><span class="notice-symbol">!</span><span>{{ channelPasswordDialog.error }}</span></div>
|
||||
<div class="channel-password-actions"><button type="button" class="text-button" :disabled="channelPasswordDialog.submitting" @click="cancelChannelPassword">{{ t('channelPasswordCancel') }}</button><button type="submit" class="primary-button channel-password-submit" :disabled="channelPasswordDialog.submitting || !channelPasswordDialog.password"><span v-if="channelPasswordDialog.submitting" class="button-spinner"></span><span>{{ t('channelPasswordSubmit') }}</span><Icon v-if="!channelPasswordDialog.submitting" name="chevron-right" :size="17" /></button></div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!-- Audio settings modal -->
|
||||
<div v-if="settingsOpen" class="modal-backdrop" @click.self="settingsOpen = false">
|
||||
<section class="settings-modal" role="dialog" aria-modal="true" :aria-labelledby="'settings-title'">
|
||||
@@ -262,7 +279,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, onMounted, onUnmounted, ref, watch } from "vue";
|
||||
import { computed, nextTick, onMounted, onUnmounted, reactive, ref, watch } from "vue";
|
||||
import Icon from "../components/Icon.vue";
|
||||
import { useVoiceWebSocket, type ChannelInfo, type ChannelMember } from "../composables/useVoiceWebSocket.js";
|
||||
import { clearLocalData as clearStoredLocalData, isLocalPersistenceAvailable, listFavorites, listRecentServers, loadLocalPreferences, loadStoredIdentity, recordRecentServer, removeFavorite, removeStoredIdentity, saveFavorite, saveLocalPreferences, saveStoredIdentity, type FavoriteServer, type RecentServer } from "../services/local-persistence.js";
|
||||
@@ -357,6 +374,7 @@ const memberQuery = ref("");
|
||||
const messageDraft = ref("");
|
||||
const selectedChannelId = ref("");
|
||||
const settingsOpen = ref(false);
|
||||
const channelPasswordDialog = reactive({ open: false, channelId: "", password: "", error: "", submitting: false });
|
||||
const qqModalOpen = ref(false);
|
||||
const qqJoinUrl = "http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=yhumUMDD9PmyYFWdXWUb_x7hM5trFQY8&authKey=Pw3HBGT7GwMinTQnuFGfnpf0aRSzXOJKcAiujVP1%2BXMpjheAKrncTRivicBJxpjV&noverify=0&group_code=869500475";
|
||||
const audioSettingsError = ref("");
|
||||
@@ -511,6 +529,12 @@ const translations: Record<string, Record<string, string>> = {
|
||||
privateMessagePlaceholder: "发送私聊消息…",
|
||||
serverMessagePlaceholder: "发送服务器消息…",
|
||||
channelPasswordPrompt: "请输入频道密码",
|
||||
channelPasswordTitle: "进入加密频道",
|
||||
channelPasswordLead: "该频道需要密码才能进入。",
|
||||
channelPasswordPlaceholder: "输入频道密码",
|
||||
channelPasswordSubmit: "进入频道",
|
||||
channelPasswordCancel: "取消",
|
||||
channelPasswordRetry: "密码不正确,请重试。",
|
||||
privateChatStart: "这是私聊的开始",
|
||||
privateChatStartLead: "发送一条私聊消息。",
|
||||
eventLog: "事件日志",
|
||||
@@ -747,6 +771,12 @@ const translations: Record<string, Record<string, string>> = {
|
||||
privateMessagePlaceholder: "Message privately…",
|
||||
serverMessagePlaceholder: "Message the server…",
|
||||
channelPasswordPrompt: "Enter the channel password",
|
||||
channelPasswordTitle: "Enter protected channel",
|
||||
channelPasswordLead: "This channel requires a password to join.",
|
||||
channelPasswordPlaceholder: "Channel password",
|
||||
channelPasswordSubmit: "Enter channel",
|
||||
channelPasswordCancel: "Cancel",
|
||||
channelPasswordRetry: "That password was not accepted. Try again.",
|
||||
privateChatStart: "This is the beginning of the private chat",
|
||||
privateChatStartLead: "Send a private message.",
|
||||
eventLog: "Event log",
|
||||
@@ -986,6 +1016,12 @@ translations.de = {
|
||||
privateMessagePlaceholder: "Private Nachricht senden…",
|
||||
serverMessagePlaceholder: "Nachricht an den Server senden…",
|
||||
channelPasswordPrompt: "Kanalpasswort eingeben",
|
||||
channelPasswordTitle: "Geschützten Kanal betreten",
|
||||
channelPasswordLead: "Für diesen Kanal ist ein Passwort erforderlich.",
|
||||
channelPasswordPlaceholder: "Kanalpasswort",
|
||||
channelPasswordSubmit: "Kanal betreten",
|
||||
channelPasswordCancel: "Abbrechen",
|
||||
channelPasswordRetry: "Das Passwort wurde abgelehnt. Bitte erneut versuchen.",
|
||||
privateChatStart: "Dies ist der Anfang des privaten Chats",
|
||||
privateChatStartLead: "Sende eine private Nachricht.",
|
||||
eventLog: "Ereignisprotokoll",
|
||||
@@ -1266,8 +1302,21 @@ watch(() => chatMessages.length, (length, previousLength) => {
|
||||
});
|
||||
watch(() => voiceState.errorCode, (code) => {
|
||||
if (code !== "CHANNEL_PASSWORD_REQUIRED" || !selectedChannelId.value) return;
|
||||
const password = window.prompt(t("channelPasswordPrompt"), "");
|
||||
if (password !== null) switchChannel(selectedChannelId.value, password);
|
||||
channelPasswordDialog.open = true;
|
||||
channelPasswordDialog.channelId = selectedChannelId.value;
|
||||
channelPasswordDialog.password = "";
|
||||
channelPasswordDialog.error = t("channelPasswordRetry");
|
||||
channelPasswordDialog.submitting = false;
|
||||
clearError();
|
||||
void nextTick(() => document.getElementById("channel-password-input")?.focus());
|
||||
});
|
||||
watch(() => voiceState.channelSwitchedChannelId, (channelId) => {
|
||||
if (!channelPasswordDialog.open || !channelId || channelId !== channelPasswordDialog.channelId) return;
|
||||
channelPasswordDialog.open = false;
|
||||
channelPasswordDialog.channelId = "";
|
||||
channelPasswordDialog.password = "";
|
||||
channelPasswordDialog.error = "";
|
||||
channelPasswordDialog.submitting = false;
|
||||
});
|
||||
watch(() => pokeNotifications.length, (length, previousLength) => {
|
||||
const latest = pokeNotifications[length - 1];
|
||||
@@ -1390,6 +1439,24 @@ function selectChannel(item: TreeChannel) {
|
||||
switchChannel(item.id);
|
||||
}
|
||||
|
||||
function submitChannelPassword() {
|
||||
if (!channelPasswordDialog.open || !channelPasswordDialog.channelId || !channelPasswordDialog.password) return;
|
||||
channelPasswordDialog.error = "";
|
||||
channelPasswordDialog.submitting = true;
|
||||
switchChannel(channelPasswordDialog.channelId, channelPasswordDialog.password);
|
||||
}
|
||||
|
||||
function cancelChannelPassword() {
|
||||
const ownChannel = channelTree.value.find((item) => item.members.some((member) => member.id === voiceState.tsClientId));
|
||||
if (ownChannel) selectedChannelId.value = ownChannel.id;
|
||||
channelPasswordDialog.open = false;
|
||||
channelPasswordDialog.channelId = "";
|
||||
channelPasswordDialog.password = "";
|
||||
channelPasswordDialog.error = "";
|
||||
channelPasswordDialog.submitting = false;
|
||||
clearError();
|
||||
}
|
||||
|
||||
function selectChannelById() {
|
||||
const item = channelTree.value.find((candidate) => candidate.id === selectedChannelId.value);
|
||||
if (item) selectChannel(item);
|
||||
@@ -1814,6 +1881,29 @@ function stopWhisperTalk(): void {
|
||||
|
||||
.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 28px; background: rgba(25, 33, 31, .42); backdrop-filter: blur(5px); }.settings-modal { display: flex; width: min(920px, 100%); max-height: min(760px, calc(100dvh - 56px)); overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 20px 60px rgba(16,40,35,.2); }.settings-nav { display: flex; flex-direction: column; width: 215px; flex: 0 0 auto; padding: 28px 12px 20px; background: #f8faf9; border-right: 1px solid #e6ecea; }.settings-title { padding: 0 13px 20px; color: #25322e; font-size: 19px; font-weight: 700; }.settings-nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 13px; color: #65736f; background: transparent; border-left: 3px solid transparent; border-radius: 8px; font-size: 11px; text-align: left; cursor: pointer; }.settings-nav-item.active { color: #006a64; background: #e2efec; border-left-color: #006a64; font-weight: 700; }.settings-version { margin-top: auto; padding: 20px 13px 0; color: #98a5a0; border-top: 1px solid #e4ebe8; font-size: 10px; line-height: 1.7; }.settings-version span { color: #b0bbb7; }.settings-main { display: flex; min-width: 0; flex: 1; flex-direction: column; }.settings-header { display: flex; align-items: center; justify-content: space-between; min-height: 75px; padding: 0 28px; border-bottom: 1px solid #edf1ef; }.settings-header h2 { margin: 0; color: #202c29; font-size: 22px; letter-spacing: -.045em; }.settings-content { flex: 1; overflow-y: auto; padding: 28px 40px; }.settings-section { max-width: 620px; margin: 0 auto; }.settings-section h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 21px; color: #293631; font-size: 16px; }.settings-section h3 .ui-icon { color: #006a64; }.settings-label { display: block; margin-bottom: 8px; color: #5e6d67; font-size: 10px; font-weight: 500; }.select-like { display: flex; align-items: center; justify-content: space-between; min-height: 39px; margin-bottom: 19px; padding: 0 13px; color: #394742; background: #f4f7f6; border-radius: 8px; font-size: 11px; }.select-like .ui-icon { color: #677671; }.settings-range-row { display: flex; align-items: center; justify-content: space-between; }.settings-range-row .settings-label { margin: 0; }.settings-range-row strong { color: #006a64; font-size: 10px; }.settings-range { width: 100%; height: 6px; margin: 11px 0 20px; appearance: none; border-radius: 999px; outline: none; cursor: pointer; }.settings-range::-webkit-slider-thumb { width: 19px; height: 19px; }.settings-range::-moz-range-thumb { width: 19px; height: 19px; }.mic-test { padding: 15px; border: 1px solid #e5ece9; border-radius: 11px; background: #fafcfb; }.mic-test-header { display: flex; align-items: center; justify-content: space-between; }.mic-test-header strong { color: #36453f; font-size: 11px; }.mic-test-header button { padding: 6px 9px; color: #006a64; background: #e0f1ee; border-radius: 5px; font-size: 10px; cursor: pointer; }.meter { display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; height: 39px; margin-top: 12px; padding: 0 4px 4px; border-bottom: 1px solid #dce6e2; }.meter i { width: 5px; min-height: 4px; border-radius: 3px 3px 0 0; background: #dfe6e3; }.meter i.active { background: #81ed8b; box-shadow: 0 0 7px rgba(129,237,139,.45); animation: meter 1s ease-in-out infinite alternate; }.meter-labels { display: flex; justify-content: space-between; margin-top: 6px; color: #9ba6a2; font-size: 8px; }.settings-separator { max-width: 620px; margin: 32px auto; border-top: 1px solid #edf1ef; }.mode-note { display: flex; align-items: flex-start; gap: 8px; padding: 12px; color: #66817a; background: #eef7f4; border-radius: 8px; font-size: 10px; line-height: 1.5; }.mode-note .ui-icon { color: #4f9c91; }.settings-footer { display: flex; justify-content: flex-end; gap: 16px; min-height: 67px; padding: 15px 28px; border-top: 1px solid #edf1ef; }.text-button { padding: 0 6px; color: #63716c; background: transparent; font-size: 11px; font-weight: 600; cursor: pointer; }.save-button { padding: 0 23px; }.qq-modal-card { position: relative; width: min(460px, 100%); max-height: min(90dvh, 720px); overflow-y: auto; padding: 30px; color: #263431; border: 1px solid #d9e7e3; border-radius: 20px; background: #fff; box-shadow: 0 20px 60px rgba(16,40,35,.22); text-align: center; }.qq-modal-heading { padding: 0 24px 18px; }.qq-modal-heading h2 { margin: 8px 0 0; color: #1d2d29; font-size: 25px; letter-spacing: -.04em; }.qq-modal-close { position: absolute; top: 13px; right: 13px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: #6d7d78; background: #f1f6f4; border: 1px solid #e1ebe8; border-radius: 50%; cursor: pointer; }.qq-modal-close:hover { color: #006a64; background: #e2f2ef; border-color: #c8e6e1; }.qq-qr-image { display: block; width: min(100%, 360px); max-height: min(55vh, 520px); margin: 0 auto; object-fit: contain; border-radius: 1Line truncated
|
||||
|
||||
.channel-password-modal { position: relative; width: min(420px, 100%); padding: 31px 32px 28px; color: #263431; border: 1px solid #d9e7e3; border-radius: 18px; background: #fff; box-shadow: 0 20px 60px rgba(16,40,35,.22); }
|
||||
.channel-password-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 17px; color: #006a64; background: #e4f4f0; border-radius: 14px; }
|
||||
.channel-password-modal h2 { margin: 7px 0 8px; color: #1d2d29; font-size: 24px; letter-spacing: -.04em; }
|
||||
.channel-password-modal > p { margin: 0 0 23px; color: #70817b; font-size: 12px; line-height: 1.6; }
|
||||
.channel-password-form .field-label { margin-bottom: 8px; }
|
||||
.channel-password-form .field-wrap { margin-bottom: 12px; }
|
||||
.channel-password-error { margin: 0 0 14px; }
|
||||
.channel-password-actions { display: flex; align-items: center; justify-content: flex-end; gap: 15px; margin-top: 21px; }
|
||||
.channel-password-submit { min-height: 40px; padding: 0 16px; }
|
||||
.channel-password-submit .button-spinner { width: 14px; height: 14px; }
|
||||
.channel-password-submit:disabled { cursor: wait; opacity: .7; }
|
||||
|
||||
@media (max-width: 740px) {
|
||||
.channel-password-backdrop { align-items: flex-end; padding: 0; }
|
||||
.channel-password-modal { width: 100%; padding: 27px 22px calc(23px + env(safe-area-inset-bottom, 0px)); border-radius: 20px 20px 0 0; }
|
||||
.channel-password-modal h2 { font-size: 22px; }
|
||||
}
|
||||
|
||||
:global(html[data-theme="dark"] .channel-password-modal) { color: var(--text-primary); border-color: var(--border); background: var(--surface-1); box-shadow: 0 20px 60px color-mix(in srgb, var(--text-primary) 18%, transparent); }
|
||||
:global(html[data-theme="dark"] .channel-password-modal h2) { color: var(--text-primary); }
|
||||
:global(html[data-theme="dark"] .channel-password-modal > p) { color: var(--text-muted); }
|
||||
:global(html[data-theme="dark"] .channel-password-icon) { color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, var(--surface-2)); }
|
||||
|
||||
@keyframes spin { to { transform: rotate(360deg); } } @keyframes wave { from { transform: scaleY(.68); opacity: .65; } to { transform: scaleY(1.08); opacity: 1; } } @keyframes meter { from { transform: scaleY(.65); } to { transform: scaleY(1); } } @keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
|
||||
|
||||
@keyframes join-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
|
||||
|
||||
Reference in new issue
Block a user