refactor: move quality/skip/speed controls to bottom bar, sync visibility with top bar

This commit is contained in:
2026-06-12 19:27:32 +08:00
parent 8655e01c23
commit 5ff8e2b669
3 changed files with 59 additions and 31 deletions

View File

@@ -1,7 +1,6 @@
<script setup lang="ts">
import { useGameStore } from '@/stores/gameStore'
import { useI18n } from '@/composables/useI18n'
import { getVideoMode } from '@engine/core/VideoManager'
const store = useGameStore()
const { t, currentLang, setLang } = useI18n()
@@ -13,15 +12,6 @@ const emit = defineEmits<{
const fontSizeOptions = [20, 24, 28, 32]
const bgAlphaOptions = [0, 0.3, 0.5, 0.7, 0.9]
const qualityOptions = [
{ key: '', label: '自动' },
{ key: '超清 (1080P)', label: '超清 (1080P)', speed: '需要 2.5 Mbps' },
{ key: '高清 (720P)', label: '高清 (720P)', speed: '需要 2 Mbps' },
{ key: '标清 (480P)', label: '标清 (480P)', speed: '需要 0.8 Mbps' },
]
const isWeb = getVideoMode() !== 'local'
const langLabels: Record<string, string> = {
zh: '中文',
en: 'English',
@@ -49,15 +39,6 @@ const langLabels: Record<string, string> = {
</select>
</div>
<div class="setting-row" v-if="isWeb">
<span class="setting-label">画质</span>
<select :value="store.preferredQuality" @change="store.setPreferredQuality(($event.target as HTMLSelectElement).value)">
<option v-for="q in qualityOptions" :key="q.key" :value="q.key">
{{ q.label }}{{ q.speed ? '' + q.speed + '' : '' }}
</option>
</select>
</div>
<div class="setting-row">
<span class="setting-label">{{ t('ui.subtitleSize') }}</span>
<select :value="store.subFontSize" @change="store.setSubFontSize(+($event.target as HTMLSelectElement).value)">