refactor: unify video mode detection into getVideoMode()

This commit is contained in:
2026-06-12 19:10:51 +08:00
parent 32f7e34130
commit 8655e01c23
3 changed files with 133 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
<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()
@@ -19,7 +20,7 @@ const qualityOptions = [
{ key: '标清 (480P)', label: '标清 (480P)', speed: '需要 0.8 Mbps' },
]
const isWeb = typeof window !== 'undefined' && !(window as any).__ELECTRON__
const isWeb = getVideoMode() !== 'local'
const langLabels: Record<string, string> = {
zh: '中文',