diff --git a/docs/examples/illusia-voice.wskin b/docs/examples/illusia-voice.wskin index c07bf3f..9379f1b 100644 Binary files a/docs/examples/illusia-voice.wskin and b/docs/examples/illusia-voice.wskin differ diff --git a/docs/examples/illusia-voice/skin.css b/docs/examples/illusia-voice/skin.css index e1b6cdd..d9ce0e9 100644 --- a/docs/examples/illusia-voice/skin.css +++ b/docs/examples/illusia-voice/skin.css @@ -86,15 +86,11 @@ [data-ws-part="skin.option"][data-ws-skin-id="community.illusia-voice"][role="option"] { color: #075e68; border-color: rgba(82, 195, 204, .46); - background-color: rgba(232, 252, 253, .94); - background-image: - url("assets/visitor-avatar.webp"), - linear-gradient(105deg, rgba(245, 255, 255, .96), rgba(196, 244, 246, .82)); - background-position: right 2px center, center; - background-repeat: no-repeat; - background-size: 42px 42px, 100% 100%; + background-image: linear-gradient(112deg, rgba(255, 255, 255, .96), rgba(225, 250, 249, .96), rgba(188, 241, 237, .94), rgba(255, 255, 255, .96)); + background-position: 0% 50%; + background-size: 240% 100%; box-shadow: 0 4px 14px rgba(30, 170, 184, .17), inset 0 0 0 1px rgba(255, 255, 255, .86); - animation: illusia-option-shimmer 5s ease-in-out infinite alternate; + animation: illusia-option-gradient 8s ease-in-out infinite alternate; } [data-ws-part="skin.option"][data-ws-skin-id="community.illusia-voice"][role="option"] > :first-child { @@ -107,15 +103,14 @@ [data-ws-part="skin.option"][data-ws-skin-id="community.illusia-voice"][role="option"][aria-selected="true"] { color: #056e76; border-color: rgba(44, 186, 197, .7); - background-image: - url("assets/visitor-avatar.webp"), - linear-gradient(105deg, rgba(250, 255, 255, .98), rgba(170, 236, 241, .9)); + background-image: linear-gradient(112deg, #faffff 0%, #c8f5f1 36%, #82e2dc 70%, #d9fbf8 100%); + background-position: 100% 50%; box-shadow: 0 5px 18px rgba(30, 170, 184, .23), inset 0 0 0 1px rgba(255, 255, 255, .94); } -@keyframes illusia-option-shimmer { - from { background-position: right 2px center, center; } - to { background-position: right 7px center, center; } +@keyframes illusia-option-gradient { + from { background-position: 0% 50%; } + to { background-position: 100% 50%; } } [data-ws-part="language.trigger"][aria-haspopup="listbox"] { diff --git a/web/public/skins/illusia-voice.wskin b/web/public/skins/illusia-voice.wskin index c07bf3f..9379f1b 100644 Binary files a/web/public/skins/illusia-voice.wskin and b/web/public/skins/illusia-voice.wskin differ diff --git a/web/src/components/SkinSwitcher.vue b/web/src/components/SkinSwitcher.vue index 38d4a82..fcc6c09 100644 --- a/web/src/components/SkinSwitcher.vue +++ b/web/src/components/SkinSwitcher.vue @@ -142,24 +142,46 @@ onUnmounted(() => document.removeEventListener("pointerdown", onDocumentPointerD min-height: 36px; padding: 0 9px; color: #123849; - background: rgba(255, 255, 255, .62); - border: 1px solid rgba(255, 255, 255, .5); + background: linear-gradient(112deg, rgba(255, 255, 255, .96), rgba(225, 250, 249, .96), rgba(188, 241, 237, .94), rgba(255, 255, 255, .96)); + background-size: 240% 100%; + border: 1px solid rgba(139, 218, 216, .46); border-radius: 7px; font: inherit; font-size: 11px; text-align: left; cursor: pointer; + animation: skin-option-gradient 8s ease-in-out infinite alternate; + transition: color .18s, border-color .18s, box-shadow .18s, background-position .4s ease; } .skin-option > .ui-icon:first-child { color: #64858a; } .skin-option > .ui-icon:last-child { margin-left: auto; color: #087e86; } .skin-option:hover, -.skin-option:focus-visible, -.skin-option.selected { +.skin-option:focus-visible { color: #087e86; - background: rgba(211, 245, 248, .92); - border-color: rgba(71, 201, 212, .42); - box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .82); + border-color: rgba(57, 195, 193, .74); + background-position: 100% 50%; + box-shadow: 0 4px 13px rgba(43, 179, 181, .16), inset 0 0 0 1px rgba(255, 255, 255, .84); +} + +.skin-option.selected { + color: #056f73; + border-color: rgba(44, 183, 181, .78); + background-image: linear-gradient(112deg, #faffff 0%, #c8f5f1 36%, #82e2dc 70%, #d9fbf8 100%); + background-position: 100% 50%; + box-shadow: 0 5px 16px rgba(37, 170, 171, .22), inset 0 0 0 1px rgba(255, 255, 255, .94), inset 0 -1px 0 rgba(31, 164, 163, .12); +} + +.skin-option.selected > .ui-icon:first-child, +.skin-option.selected > .ui-icon:last-child { color: #087e86; } + +@keyframes skin-option-gradient { + from { background-position: 0% 50%; } + to { background-position: 100% 50%; } +} + +@media (prefers-reduced-motion: reduce) { + .skin-option { animation: none; } } @media (max-width: 520px) { diff --git a/web/src/i18n/web-client.ts b/web/src/i18n/web-client.ts index f5eb5b4..4b957a8 100644 --- a/web/src/i18n/web-client.ts +++ b/web/src/i18n/web-client.ts @@ -8,6 +8,7 @@ export const webClientTranslations: Record> = { skinSelector: "皮肤", skinDay: "日间模式", skinNight: "夜间模式", + skinIllusia: "ILLUSIA 风", switchToLightTheme: "切换到浅色主题", switchToDarkTheme: "切换到深色主题", browserWorkspace: "浏览器语音工作台", @@ -339,6 +340,7 @@ export const webClientTranslations: Record> = { skinSelector: "Skin", skinDay: "Day mode", skinNight: "Night mode", + skinIllusia: "ILLUSIA style", switchToLightTheme: "Switch to light theme", switchToDarkTheme: "Switch to dark theme", browserWorkspace: "Browser voice workspace", @@ -673,6 +675,7 @@ webClientTranslations.de = { skinSelector: "Design", skinDay: "Tagesmodus", skinNight: "Nachtmodus", + skinIllusia: "ILLUSIA-Stil", switchToLightTheme: "Zum hellen Design wechseln", switchToDarkTheme: "Zum dunklen Design wechseln", browserWorkspace: "Sprachbereich im Browser", @@ -997,6 +1000,7 @@ webClientTranslations.ru = { skinSelector: "Оформление", skinDay: "Дневной режим", skinNight: "Ночной режим", + skinIllusia: "Стиль ILLUSIA", switchToLightTheme: "Включить светлую тему", switchToDarkTheme: "Включить тёмную тему", browserWorkspace: "Голосовое пространство в браузере", @@ -1115,6 +1119,7 @@ webClientTranslations.ja = { skinSelector: "スキン", skinDay: "昼モード", skinNight: "夜モード", + skinIllusia: "ILLUSIA スタイル", switchToLightTheme: "ライトテーマに切り替え", switchToDarkTheme: "ダークテーマに切り替え", browserWorkspace: "ブラウザ音声ワークスペース", diff --git a/web/src/views/DemoView.vue b/web/src/views/DemoView.vue index 2033548..5b1d20e 100644 --- a/web/src/views/DemoView.vue +++ b/web/src/views/DemoView.vue @@ -37,12 +37,13 @@ import Icon from "../components/Icon.vue"; import LanguageSwitcher from "../components/LanguageSwitcher.vue"; import SkinSwitcher, { type SkinOption } from "../components/SkinSwitcher.vue"; import { listInstalledSkins, loadLocalPreferences, saveLocalPreferences } from "../services/local-persistence.js"; -import { getPublicDefaultSkinId, isPublicSkinEnabled, listPublicSkins, type SkinCatalogEntry } from "../services/skin-catalog.js"; +import { BUILTIN_ILLUSIA_SKIN_ID, getPublicDefaultSkinId, isPublicSkinEnabled, listPublicSkins, type SkinCatalogEntry } from "../services/skin-catalog.js"; import { activateSkin, BUILTIN_DARK_SKIN, BUILTIN_LIGHT_SKIN, getStoredSkinId } from "../services/skin-runtime.js"; import type { InstalledSkin } from "../services/skin-pack.js"; import { getStoredTheme, isDarkTheme } from "../services/theme.js"; type Language = "zh" | "en" | "de" | "ru" | "ja"; +const illusiaSkinLabels: Record = { zh: "ILLUSIA 风", en: "ILLUSIA style", de: "ILLUSIA-Stil", ru: "Стиль ILLUSIA", ja: "ILLUSIA スタイル" }; interface DemoMessage { id: number; author: string; time: string; text: string; zhText?: string; enText?: string; ruText?: string; jaText?: string; mine: boolean } type Tab = "channel" | "server"; const storedLanguage = localStorage.getItem("webspeak:language"); @@ -57,7 +58,7 @@ const catalogSkins = ref([]); const skinOptions = computed(() => [ ...catalogSkins.value.map((skin) => ({ value: skin.id, - label: skin.id === BUILTIN_LIGHT_SKIN ? copy.value.skinDay : skin.id === BUILTIN_DARK_SKIN ? copy.value.skinNight : skin.name, + label: skin.id === BUILTIN_LIGHT_SKIN ? copy.value.skinDay : skin.id === BUILTIN_DARK_SKIN ? copy.value.skinNight : skin.id === BUILTIN_ILLUSIA_SKIN_ID ? illusiaSkinLabels[language.value] : skin.name, icon: skin.id === BUILTIN_LIGHT_SKIN ? "sun" : skin.id === BUILTIN_DARK_SKIN ? "moon" : "compass", })), ...installedSkins.value.filter((skin) => !catalogSkins.value.some((item) => item.id === skin.id) && isPublicSkinEnabled(skin.id)).map((skin) => ({ value: skin.id, label: skin.name, icon: "compass" })), diff --git a/web/src/views/WebClient.vue b/web/src/views/WebClient.vue index e20c8b3..21a7dea 100644 --- a/web/src/views/WebClient.vue +++ b/web/src/views/WebClient.vue @@ -558,7 +558,7 @@ const catalogSkins = ref([]); const skinOptions = computed(() => [ ...catalogSkins.value.map((skin) => ({ value: skin.id, - label: skin.id === BUILTIN_LIGHT_SKIN ? t("skinDay") : skin.id === BUILTIN_DARK_SKIN ? t("skinNight") : skin.name, + label: skin.id === BUILTIN_LIGHT_SKIN ? t("skinDay") : skin.id === BUILTIN_DARK_SKIN ? t("skinNight") : skin.id === "community.illusia-voice" ? t("skinIllusia") : skin.name, icon: skin.id === BUILTIN_LIGHT_SKIN ? "sun" : skin.id === BUILTIN_DARK_SKIN ? "moon" : "compass", })), ...installedSkins.value.filter((skin) => !catalogSkins.value.some((item) => item.id === skin.id) && isPublicSkinEnabled(skin.id)).map((skin) => ({ value: skin.id, label: skin.name, icon: "compass" })),