mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-03-15 07:26:44 +08:00
fix(web): 调整控制台HID状态卡片内容与弹层对齐
This commit is contained in:
@@ -267,7 +267,6 @@ const hidDetails = computed<StatusDetail[]>(() => {
|
|||||||
{ label: t('statusCard.device'), value: hid.device || '-' },
|
{ label: t('statusCard.device'), value: hid.device || '-' },
|
||||||
{ label: t('statusCard.backend'), value: hid.backend || t('common.unknown') },
|
{ label: t('statusCard.backend'), value: hid.backend || t('common.unknown') },
|
||||||
{ label: t('statusCard.initialized'), value: hid.initialized ? t('statusCard.yes') : t('statusCard.no'), status: hid.initialized ? 'ok' : 'warning' },
|
{ label: t('statusCard.initialized'), value: hid.initialized ? t('statusCard.yes') : t('statusCard.no'), status: hid.initialized ? 'ok' : 'warning' },
|
||||||
{ label: t('statusCard.mouseSupport'), value: hid.supportsAbsoluteMouse ? t('statusCard.absolute') : t('statusCard.relative'), status: hid.available ? 'ok' : undefined },
|
|
||||||
{ label: t('statusCard.currentMode'), value: mouseMode.value === 'absolute' ? t('statusCard.absolute') : t('statusCard.relative'), status: 'ok' },
|
{ label: t('statusCard.currentMode'), value: mouseMode.value === 'absolute' ? t('statusCard.absolute') : t('statusCard.relative'), status: 'ok' },
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -408,6 +407,14 @@ const msdDetails = computed<StatusDetail[]>(() => {
|
|||||||
return details
|
return details
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const showMsdStatusCard = computed(() => {
|
||||||
|
return !!(systemStore.msd?.available && systemStore.hid?.backend !== 'ch9329')
|
||||||
|
})
|
||||||
|
|
||||||
|
const hidHoverAlign = computed<'start' | 'end'>(() => {
|
||||||
|
return showMsdStatusCard.value ? 'start' : 'end'
|
||||||
|
})
|
||||||
|
|
||||||
// Video handling
|
// Video handling
|
||||||
let retryTimeoutId: number | null = null
|
let retryTimeoutId: number | null = null
|
||||||
let retryCount = 0
|
let retryCount = 0
|
||||||
@@ -1941,11 +1948,12 @@ onUnmounted(() => {
|
|||||||
:status="hidStatus"
|
:status="hidStatus"
|
||||||
:quick-info="hidQuickInfo"
|
:quick-info="hidQuickInfo"
|
||||||
:details="hidDetails"
|
:details="hidDetails"
|
||||||
|
:hover-align="hidHoverAlign"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- MSD Status - Hidden when CH9329 backend (no USB gadget support) -->
|
<!-- MSD Status - Hidden when CH9329 backend (no USB gadget support) -->
|
||||||
<StatusCard
|
<StatusCard
|
||||||
v-if="systemStore.msd?.available && systemStore.hid?.backend !== 'ch9329'"
|
v-if="showMsdStatusCard"
|
||||||
:title="t('statusCard.msd')"
|
:title="t('statusCard.msd')"
|
||||||
type="msd"
|
type="msd"
|
||||||
:status="msdStatus"
|
:status="msdStatus"
|
||||||
@@ -2037,11 +2045,12 @@ onUnmounted(() => {
|
|||||||
:status="hidStatus"
|
:status="hidStatus"
|
||||||
:quick-info="hidQuickInfo"
|
:quick-info="hidQuickInfo"
|
||||||
:details="hidDetails"
|
:details="hidDetails"
|
||||||
|
:hover-align="hidHoverAlign"
|
||||||
compact
|
compact
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="systemStore.msd?.available && systemStore.hid?.backend !== 'ch9329'" class="shrink-0">
|
<div v-if="showMsdStatusCard" class="shrink-0">
|
||||||
<StatusCard
|
<StatusCard
|
||||||
:title="t('statusCard.msd')"
|
:title="t('statusCard.msd')"
|
||||||
type="msd"
|
type="msd"
|
||||||
|
|||||||
Reference in New Issue
Block a user