mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-07-30 19:41:44 +08:00
feat: 初步增加 Windows 支持
This commit is contained in:
@@ -63,6 +63,7 @@ const props = defineProps<{
|
||||
mouseMode?: 'absolute' | 'relative'
|
||||
videoMode?: VideoMode
|
||||
ttydRunning?: boolean
|
||||
showTerminal?: boolean
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -194,6 +195,7 @@ const RIGHT_FIXED_PX = 120
|
||||
const collapsibleItems = computed(() => {
|
||||
const items = ITEM_SPECS.slice(3).filter(item => {
|
||||
if (item.id === 'msd' && !showMsd.value) return false
|
||||
if (item.id === 'extension' && props.showTerminal === false) return false
|
||||
return true
|
||||
})
|
||||
return items
|
||||
@@ -339,7 +341,7 @@ const hasOverflow = computed(() => {
|
||||
</div>
|
||||
|
||||
<!-- Extension Menu - Adaptive -->
|
||||
<div v-if="isVisible('extension')">
|
||||
<div v-if="props.showTerminal !== false && isVisible('extension')">
|
||||
<Popover v-model:open="extensionOpen">
|
||||
<PopoverTrigger as-child>
|
||||
<Button variant="ghost" size="sm" class="h-8 gap-1.5 text-xs">
|
||||
@@ -449,7 +451,7 @@ const hasOverflow = computed(() => {
|
||||
{{ t('actionbar.paste') }}
|
||||
</DropdownMenuItem>
|
||||
|
||||
<DropdownMenuSeparator v-if="(!isVisible('msd') || !isVisible('atx') || !isVisible('paste')) && (!isVisible('stats') || !isVisible('extension') || !isVisible('settings'))" />
|
||||
<DropdownMenuSeparator v-if="(!isVisible('msd') || !isVisible('atx') || !isVisible('paste')) && (!isVisible('stats') || (props.showTerminal !== false && !isVisible('extension')) || !isVisible('settings'))" />
|
||||
|
||||
<!-- Stats -->
|
||||
<DropdownMenuItem v-if="!isVisible('stats')" @click="openFromOverflow(() => emit('toggleStats'))">
|
||||
@@ -459,7 +461,7 @@ const hasOverflow = computed(() => {
|
||||
|
||||
<!-- Extension -->
|
||||
<DropdownMenuItem
|
||||
v-if="!isVisible('extension')"
|
||||
v-if="props.showTerminal !== false && !isVisible('extension')"
|
||||
:disabled="!props.ttydRunning"
|
||||
@click="openFromOverflow(() => emit('openTerminal'))"
|
||||
>
|
||||
|
||||
@@ -29,6 +29,7 @@ import {
|
||||
} from '@/api'
|
||||
import { getVideoFormatState, isVideoFormatSelectable } from '@/lib/video-format-support'
|
||||
import { formatFpsLabel, toConfigFps } from '@/lib/fps'
|
||||
import { formatVideoDeviceLabel } from '@/lib/video-device-label'
|
||||
import { useConfigStore } from '@/stores/config'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
@@ -782,7 +783,7 @@ watch(
|
||||
:value="device.path"
|
||||
class="text-xs"
|
||||
>
|
||||
{{ device.name }} ({{ device.path }})
|
||||
{{ formatVideoDeviceLabel(device) }}
|
||||
</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
|
||||
Reference in New Issue
Block a user