Skip to content

Commit 566fc31

Browse files
committed
refactor(settings): 移除界面缩放和深色主题选项
- 移除界面缩放滑块(功能不实用且组件外观不一致) - 移除深色主题选项(暂未做深色主题适配)
1 parent 0fda9db commit 566fc31

4 files changed

Lines changed: 2 additions & 47 deletions

File tree

ChuChartManager/Front/src/locales/en.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,8 @@ settings:
1616
theme: Theme
1717
themeAuto: Auto
1818
themeLight: Light
19-
themeDark: Dark
2019
themeHue: Theme Hue
2120
reset: Reset
22-
zoom: UI Scale
23-
zoomAuto: Auto
2421
gameDirectory: Game Directory
2522
currentPath: Current Path
2623
changeDirectory: Change Directory

ChuChartManager/Front/src/locales/ja.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,8 @@ settings:
1616
theme: テーマ
1717
themeAuto: 自動
1818
themeLight: ライト
19-
themeDark: ダーク
2019
themeHue: テーマ色相
2120
reset: リセット
22-
zoom: UI スケール
23-
zoomAuto: 自動
2421
gameDirectory: ゲームディレクトリ
2522
currentPath: 現在のパス
2623
changeDirectory: ディレクトリ変更

ChuChartManager/Front/src/locales/zh.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,8 @@ settings:
1616
theme: 主题
1717
themeAuto: 自动
1818
themeLight: 浅色
19-
themeDark: 深色
2019
themeHue: 主题色相
2120
reset: 重置
22-
zoom: 界面缩放
23-
zoomAuto: 自动
2421
gameDirectory: 游戏目录
2522
currentPath: 当前路径
2623
changeDirectory: 切换目录

ChuChartManager/Front/src/views/Settings.vue

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<script setup lang="ts">
22
import { ref, computed, onMounted } from 'vue'
33
import { useI18n } from 'vue-i18n'
4-
import { Button, Select, Range } from '@munet/ui'
4+
import { Button, Select } from '@munet/ui'
55
import { selectedThemeHue, selectedThemeName, UIThemes } from '@munet/ui'
66
import type { SelectOption } from '@munet/ui'
7-
import { apiClient, isWebView } from '@/api'
7+
import { apiClient } from '@/api'
88
import { setStatus } from '@/store/status'
99
import { availableLocales, localeLabels, setLocale, locale } from '@/locales'
1010
import type { Locale } from '@/locales'
@@ -16,27 +16,9 @@ const historyPaths = ref<string[]>([])
1616
const switching = ref(false)
1717
const error = ref('')
1818
19-
const uiZoom = ref(0)
20-
const autoZoom = 100
21-
22-
const zoomDisplay = computed({
23-
get: () => uiZoom.value || autoZoom,
24-
set: (v: number) => {
25-
uiZoom.value = v
26-
postZoom(v)
27-
}
28-
})
29-
30-
function postZoom(value: number) {
31-
if (isWebView) {
32-
;(window as any).chrome.webview.postMessage(JSON.stringify({ type: 'setZoom', value }))
33-
}
34-
}
35-
3619
const themeOptions = computed<SelectOption[]>(() => [
3720
{ label: t('settings.themeAuto'), value: UIThemes.Auto },
3821
{ label: t('settings.themeLight'), value: UIThemes.DynamicLight },
39-
{ label: t('settings.themeDark'), value: UIThemes.Dark },
4022
])
4123
4224
const localeOptions = computed(() =>
@@ -55,11 +37,6 @@ function resetHue() {
5537
selectedThemeHue.value = 353
5638
}
5739
58-
function resetZoom() {
59-
uiZoom.value = 0
60-
postZoom(0)
61-
}
62-
6340
async function handleChangeDirectory() {
6441
error.value = ''
6542
try {
@@ -125,19 +102,6 @@ async function deleteHistory(path: string) {
125102
/>
126103
<Button @click="resetHue" class="shrink-0">{{ t('settings.reset') }}</Button>
127104
</div>
128-
<div v-if="isWebView" class="flex items-center gap-2">
129-
<span class="shrink-0 op-60">{{ t('settings.zoom') }}</span>
130-
<input
131-
type="range" min="50" max="250" step="5"
132-
:value="zoomDisplay"
133-
@input="(e: Event) => zoomDisplay = Number((e.target as HTMLInputElement).value)"
134-
class="flex-1"
135-
/>
136-
<span class="ml-auto shrink-0 text-sm op-60 w-12">
137-
{{ uiZoom === 0 ? t('settings.zoomAuto') : `${uiZoom}%` }}
138-
</span>
139-
<Button @click="resetZoom" class="shrink-0">{{ t('settings.reset') }}</Button>
140-
</div>
141105
<div class="flex items-center gap-3">
142106
<span class="shrink-0 op-60">{{ t('settings.language') }}</span>
143107
<Select :options="localeOptions" :value="locale" @change="(v: any) => setLocale(v as Locale)" />

0 commit comments

Comments
 (0)