diff --git a/apps/stage-web/locales/en.yml b/apps/stage-web/locales/en.yml index 3434b16aa..d1f6abfe6 100644 --- a/apps/stage-web/locales/en.yml +++ b/apps/stage-web/locales/en.yml @@ -58,6 +58,8 @@ settings: from-url-confirm: Load from-url-placeholder: Enter Live2D model URL title: Change Model + edit-motion-map: + title: Edit motion map map-motions: play: Play Motion title: Map Motions @@ -273,10 +275,10 @@ settings: description: Traditional Japanese color palette title: Japanese Colors monet: - description: Impressionist palette inspired by Claude Monet\'s works + description: Impressionist palette inspired by Claude Monet's works title: Monet Colors morandi: - description: Soft, muted tones inspired by Giorgio Morandi\'s paintings + description: Soft, muted tones inspired by Giorgio Morandi's paintings title: Morandi Colors nordic: description: Scandinavian minimalist color scheme diff --git a/apps/stage-web/locales/zh-CN.yml b/apps/stage-web/locales/zh-CN.yml index 1f2d89b90..916f98052 100644 --- a/apps/stage-web/locales/zh-CN.yml +++ b/apps/stage-web/locales/zh-CN.yml @@ -140,7 +140,7 @@ settings: fields: field: headers: - description: 添加自定义HTTP标头 + description: 添加自定义 HTTP 标头 key: placeholder: 请求头名字 label: HTTP 请求头 @@ -159,7 +159,7 @@ settings: fields: field: account-id: - description: Cloudflare帐户ID + description: Cloudflare 帐户 ID label: Cloudflare Account ID placeholder: 请输入 Cloudflare Account ID api-key: @@ -261,7 +261,7 @@ settings: monet: title: 莫奈颜色 morandi: - title: Morandi颜色 + title: Morandi 颜色 nordic: title: 北欧颜色 title: 主题预设 diff --git a/apps/stage-web/src/components/Settings/ColorPalette.vue b/apps/stage-web/src/components/Settings/ColorPalette.vue new file mode 100644 index 000000000..cecc7146e --- /dev/null +++ b/apps/stage-web/src/components/Settings/ColorPalette.vue @@ -0,0 +1,37 @@ + + + diff --git a/apps/stage-web/src/components/Settings/Live2DModelControlButton.vue b/apps/stage-web/src/components/Settings/Live2DModelControlButton.vue new file mode 100644 index 000000000..bf0314f6f --- /dev/null +++ b/apps/stage-web/src/components/Settings/Live2DModelControlButton.vue @@ -0,0 +1,22 @@ + + + diff --git a/apps/stage-web/src/components/Settings/Section.vue b/apps/stage-web/src/components/Settings/Section.vue new file mode 100644 index 000000000..ccac2dc94 --- /dev/null +++ b/apps/stage-web/src/components/Settings/Section.vue @@ -0,0 +1,39 @@ + + + diff --git a/apps/stage-web/src/components/Widgets/Live2DSettings.vue b/apps/stage-web/src/components/Widgets/Live2DSettings.vue index 54b74903c..634aa4cfc 100644 --- a/apps/stage-web/src/components/Widgets/Live2DSettings.vue +++ b/apps/stage-web/src/components/Widgets/Live2DSettings.vue @@ -1,20 +1,22 @@ + + diff --git a/apps/stage-web/src/pages/index.vue b/apps/stage-web/src/pages/index.vue index 03d38b19a..f182d4d90 100644 --- a/apps/stage-web/src/pages/index.vue +++ b/apps/stage-web/src/pages/index.vue @@ -24,7 +24,7 @@ function handleSettingsOpen(open: boolean) { ? 'oklch(35% calc(var(--theme-colors-chroma) * 0.6) var(--theme-colors-hue))' : 'color-mix(in srgb, oklch(95% calc(var(--theme-colors-chroma-50) * 0.5) var(--theme-colors-hue)) 80%, oklch(100% 0 360))'" > -
+
diff --git a/apps/stage-web/src/pages/settings/models/index.vue b/apps/stage-web/src/pages/settings/models/index.vue index 5ad418260..8dbfa31f7 100644 --- a/apps/stage-web/src/pages/settings/models/index.vue +++ b/apps/stage-web/src/pages/settings/models/index.vue @@ -28,12 +28,15 @@ async function extractColorsFromModel() { } const frameUrl = URL.createObjectURL(frame) - const vibrant = new Vibrant(frameUrl) + try { + const vibrant = new Vibrant(frameUrl) - const paletteFromVibrant = await vibrant.getPalette() - palette.value = Object.values(paletteFromVibrant).map(color => color?.hex).filter(it => typeof it === 'string') - - URL.revokeObjectURL(frameUrl) + const paletteFromVibrant = await vibrant.getPalette() + palette.value = Object.values(paletteFromVibrant).map(color => color?.hex).filter(it => typeof it === 'string') + } + finally { + URL.revokeObjectURL(frameUrl) + } } @@ -46,14 +49,12 @@ async function extractColorsFromModel() { :leave="{ opacity: 0, x: -10 }" :duration="250" > - -

-
- {{ t('settings.title') }} +