del: MJPEG /HTTTP 视频模式删除网页连接统计功能

This commit is contained in:
mofeng-git
2026-07-07 22:08:20 +08:00
parent a0ad151fbc
commit 99c051a874
5 changed files with 36 additions and 33 deletions

View File

@@ -171,6 +171,7 @@ function syncMouseModeFromConfig() {
const virtualKeyboardVisible = ref(false)
const virtualKeyboardAttached = ref(true)
const statsSheetOpen = ref(false)
const showConnectionStats = computed(() => videoMode.value !== 'mjpeg')
const virtualKeyboardConsumerEnabled = computed(() => {
const hid = configStore.hid
if (!hid) return true
@@ -207,6 +208,18 @@ const videoStatus = computed<'connected' | 'connecting' | 'disconnected' | 'erro
return 'disconnected'
})
function openStatsSheet() {
if (showConnectionStats.value) {
statsSheetOpen.value = true
}
}
watch(showConnectionStats, (canShow) => {
if (!canShow) {
statsSheetOpen.value = false
}
})
function getResolutionShortName(width: number, height: number): string {
if (height === 2160 || (height === 2160 && width === 4096)) return '4K'
if (height === 1440) return '2K'
@@ -2835,7 +2848,7 @@ onUnmounted(() => {
:show-terminal="showTerminal"
:show-computer-use="showComputerUse"
@toggle-fullscreen="toggleFullscreen"
@toggle-stats="statsSheetOpen = true"
@toggle-stats="openStatsSheet"
@toggle-virtual-keyboard="handleToggleVirtualKeyboard"
@toggle-mouse-mode="handleToggleMouseMode"
@update:video-mode="handleVideoModeChange"
@@ -3086,10 +3099,8 @@ onUnmounted(() => {
:debug-mode="false"
/>
<StatsSheet
v-if="showConnectionStats"
v-model:open="statsSheetOpen"
:video-mode="videoMode"
:mjpeg-fps="backendFps"
:ws-latency="0"
:webrtc-stats="webrtc.stats.value"
/>
<Dialog v-if="showTerminal" v-model:open="showTerminalDialog">