mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-09-13 02:54:26 +08:00
feat: 完善按配置隐藏控制台菜单选项
This commit is contained in:
@@ -190,6 +190,7 @@ const featureVisibility = useFeatureVisibility()
|
||||
const terminalAvailable = computed(() => ttydStatus.value?.available !== false)
|
||||
const showTerminal = computed(() => terminalAvailable.value && featureVisibility.value.webTerminal)
|
||||
const showComputerUse = computed(() => featureVisibility.value.computerUse)
|
||||
const showPasteText = computed(() => featureVisibility.value.pasteText)
|
||||
|
||||
const isDark = ref(document.documentElement.classList.contains('dark'))
|
||||
|
||||
@@ -2838,6 +2839,7 @@ onUnmounted(() => {
|
||||
:ttyd-running="ttydStatus?.running"
|
||||
:show-terminal="showTerminal"
|
||||
:show-computer-use="showComputerUse"
|
||||
:show-paste-text="showPasteText"
|
||||
@toggle-fullscreen="toggleFullscreen"
|
||||
@toggle-stats="openStatsSheet"
|
||||
@toggle-virtual-keyboard="handleToggleVirtualKeyboard"
|
||||
|
||||
@@ -117,6 +117,7 @@ import {
|
||||
Loader2,
|
||||
AlertTriangle,
|
||||
Bot,
|
||||
ClipboardPaste,
|
||||
TimerReset,
|
||||
} from 'lucide-vue-next'
|
||||
|
||||
@@ -2851,6 +2852,13 @@ watch(isWindows, () => {
|
||||
</Label>
|
||||
<Switch id="feature-computer-use" v-model="featureVisibility.computerUse" />
|
||||
</div>
|
||||
<div class="flex items-center justify-between gap-4 px-3 py-3">
|
||||
<Label for="feature-paste-text" class="flex min-w-0 items-center gap-2 font-normal">
|
||||
<ClipboardPaste class="h-4 w-4 shrink-0 text-muted-foreground" />
|
||||
<span class="truncate">{{ t('settings.pasteText') }}</span>
|
||||
</Label>
|
||||
<Switch id="feature-paste-text" v-model="featureVisibility.pasteText" />
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user