refactor: 前端界面微调

This commit is contained in:
mofeng-git
2026-06-15 23:36:17 +08:00
parent e2c19d550c
commit f1e362a820
14 changed files with 141 additions and 95 deletions

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>

Before

Width:  |  Height:  |  Size: 496 B

View File

@@ -5,9 +5,9 @@ import { useRouter } from 'vue-router'
import { useSystemStore } from '@/stores/system'
import { Button } from '@/components/ui/button'
import {
Popover,
PopoverContent,
PopoverTrigger,
Popover,
} from '@/components/ui/popover'
import {
Tooltip,
@@ -32,7 +32,6 @@ import {
ClipboardPaste,
HardDrive,
Keyboard,
Cable,
Settings,
Maximize,
Power,
@@ -65,6 +64,7 @@ const props = defineProps<{
videoMode?: VideoMode
ttydRunning?: boolean
showTerminal?: boolean
showComputerUse?: boolean
}>()
const emit = defineEmits<{
@@ -87,7 +87,6 @@ const videoPopoverOpen = ref(false)
const hidPopoverOpen = ref(false)
const audioPopoverOpen = ref(false)
const msdDialogOpen = ref(false)
const extensionOpen = ref(false)
const mobileAtxOpen = ref(false)
const mobilePasteOpen = ref(false)
@@ -126,7 +125,7 @@ let resizeObserver: ResizeObserver | null = null
type CollapsibleItem =
| 'video' | 'audio' | 'hid'
| 'msd' | 'atx' | 'paste'
| 'stats' | 'extension' | 'settings'
| 'stats' | 'terminal' | 'settings'
interface ItemSpec {
id: CollapsibleItem
@@ -141,7 +140,7 @@ const ITEM_SPECS: ItemSpec[] = [
{ id: 'atx', side: 'left' },
{ id: 'paste', side: 'left' },
{ id: 'stats', side: 'right' },
{ id: 'extension', side: 'right' },
{ id: 'terminal', side: 'right' },
{ id: 'settings', side: 'right' },
]
@@ -197,7 +196,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
if (item.id === 'terminal' && props.showTerminal === false) return false
return true
})
return items
@@ -342,30 +341,27 @@ const hasOverflow = computed(() => {
</TooltipProvider>
</div>
<!-- Extension Menu - Adaptive -->
<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">
<Cable class="h-4 w-4" />
<span v-if="visibleSet.get('extension') === 'label'">{{ t('actionbar.extension') }}</span>
</Button>
</PopoverTrigger>
<PopoverContent class="w-48 p-1" align="start">
<div class="space-y-0.5">
<!-- Web Terminal - Adaptive -->
<div v-if="props.showTerminal !== false && isVisible('terminal')">
<TooltipProvider>
<Tooltip>
<TooltipTrigger as-child>
<Button
variant="ghost"
size="sm"
class="w-full justify-start gap-2 h-8"
class="h-8 gap-1.5 text-xs"
:disabled="!props.ttydRunning"
@click="extensionOpen = false; emit('openTerminal')"
@click="emit('openTerminal')"
>
<Terminal class="h-4 w-4" />
{{ t('extensions.ttyd.title') }}
<span v-if="visibleSet.get('terminal') === 'label'">{{ t('actionbar.webTerminal') }}</span>
</Button>
</div>
</PopoverContent>
</Popover>
</TooltipTrigger>
<TooltipContent>
<p>{{ t('extensions.ttyd.title') }}</p>
</TooltipContent>
</Tooltip>
</TooltipProvider>
</div>
<!-- Settings - Adaptive -->
@@ -385,10 +381,10 @@ const hasOverflow = computed(() => {
</TooltipProvider>
</div>
<div v-if="isVisible('stats') || isVisible('extension') || isVisible('settings')" class="h-5 w-px bg-slate-200 dark:bg-slate-700" />
<div v-if="isVisible('stats') || isVisible('terminal') || isVisible('settings')" class="h-5 w-px bg-slate-200 dark:bg-slate-700" />
<!-- Computer Use - Always visible -->
<TooltipProvider>
<!-- Computer Use - Optional -->
<TooltipProvider v-if="props.showComputerUse !== false">
<Tooltip>
<TooltipTrigger as-child>
<Button
@@ -473,7 +469,7 @@ const hasOverflow = computed(() => {
{{ t('actionbar.paste') }}
</DropdownMenuItem>
<DropdownMenuSeparator v-if="(!isVisible('msd') || !isVisible('atx') || !isVisible('paste')) && (!isVisible('stats') || (props.showTerminal !== false && !isVisible('extension')) || !isVisible('settings'))" />
<DropdownMenuSeparator v-if="(!isVisible('msd') || !isVisible('atx') || !isVisible('paste')) && (!isVisible('stats') || (props.showTerminal !== false && !isVisible('terminal')) || !isVisible('settings'))" />
<!-- Stats -->
<DropdownMenuItem v-if="!isVisible('stats')" @click="openFromOverflow(() => emit('toggleStats'))">
@@ -481,14 +477,14 @@ const hasOverflow = computed(() => {
{{ t('actionbar.stats') }}
</DropdownMenuItem>
<!-- Extension -->
<!-- Web Terminal -->
<DropdownMenuItem
v-if="props.showTerminal !== false && !isVisible('extension')"
v-if="props.showTerminal !== false && !isVisible('terminal')"
:disabled="!props.ttydRunning"
@click="openFromOverflow(() => emit('openTerminal'))"
>
<Terminal class="h-4 w-4 mr-2" />
{{ t('extensions.ttyd.title') }}
{{ t('actionbar.webTerminal') }}
</DropdownMenuItem>
<!-- Settings -->
@@ -558,9 +554,9 @@ const hasOverflow = computed(() => {
<!-- Stats -->
<Button data-measure="stats-icon" variant="ghost" size="sm" class="h-8 gap-1.5 text-xs"><BarChart3 class="h-4 w-4" /></Button>
<Button data-measure="stats-label" variant="ghost" size="sm" class="h-8 gap-1.5 text-xs"><BarChart3 class="h-4 w-4" />{{ t('actionbar.stats') }}</Button>
<!-- Extension -->
<Button data-measure="extension-icon" variant="ghost" size="sm" class="h-8 gap-1.5 text-xs"><Cable class="h-4 w-4" /></Button>
<Button data-measure="extension-label" variant="ghost" size="sm" class="h-8 gap-1.5 text-xs"><Cable class="h-4 w-4" />{{ t('actionbar.extension') }}</Button>
<!-- Web Terminal -->
<Button data-measure="terminal-icon" variant="ghost" size="sm" class="h-8 gap-1.5 text-xs"><Terminal class="h-4 w-4" /></Button>
<Button data-measure="terminal-label" variant="ghost" size="sm" class="h-8 gap-1.5 text-xs"><Terminal class="h-4 w-4" />{{ t('actionbar.webTerminal') }}</Button>
<!-- Settings -->
<Button data-measure="settings-icon" variant="ghost" size="sm" class="h-8 gap-1.5 text-xs"><Settings class="h-4 w-4" /></Button>
<Button data-measure="settings-label" variant="ghost" size="sm" class="h-8 gap-1.5 text-xs"><Settings class="h-4 w-4" />{{ t('actionbar.settings') }}</Button>

View File

@@ -335,6 +335,7 @@ onMounted(loadConfig)
<Input
v-model="apiKey"
type="password"
autocomplete="off"
:placeholder="config?.api_key_configured ? `已配置:${config.api_key_source}` : 'sk-...'"
/>
</div>

View File

@@ -1,41 +0,0 @@
<script setup lang="ts">
import { ref } from 'vue'
defineProps<{ msg: string }>()
const count = ref(0)
</script>
<template>
<h1>{{ msg }}</h1>
<div class="card">
<button type="button" @click="count++">count is {{ count }}</button>
<p>
Edit
<code>components/HelloWorld.vue</code> to test HMR
</p>
</div>
<p>
Check out
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
>create-vue</a
>, the official Vue + Vite starter
</p>
<p>
Learn more about IDE Support for Vue in the
<a
href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support"
target="_blank"
>Vue Docs Scaling up Guide</a
>.
</p>
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
</template>
<style scoped>
.read-the-docs {
color: #888;
}
</style>

View File

@@ -1,5 +1,6 @@
import { ref, onUnmounted } from 'vue'
import { buildWsUrl } from '@/types/websocket'
import { generateUUID } from '@/lib/utils'
import type { ComputerUseScreenshot, ComputerUseSession, ComputerUseAction } from '@/api'
export type ComputerUseServerMessage =
@@ -16,7 +17,7 @@ export function useComputerUseSocket(options: {
}) {
const connected = ref(false)
const error = ref<string | null>(null)
const clientId = crypto.randomUUID()
const clientId = generateUUID()
let ws: WebSocket | null = null
let connectPromise: Promise<void> | null = null

View File

@@ -0,0 +1,20 @@
import { useLocalStorage } from '@vueuse/core'
import type { RemovableRef } from '@vueuse/core'
export type FeatureVisibilityKey = 'webTerminal' | 'computerUse'
export type FeatureVisibility = Record<FeatureVisibilityKey, boolean>
const DEFAULT_FEATURE_VISIBILITY: FeatureVisibility = {
webTerminal: true,
computerUse: true,
}
const featureVisibility = useLocalStorage<FeatureVisibility>(
'featureVisibility',
DEFAULT_FEATURE_VISIBILITY,
{ mergeDefaults: true },
)
export function useFeatureVisibility(): RemovableRef<FeatureVisibility> {
return featureVisibility
}

View File

@@ -105,8 +105,7 @@ export default {
mouseRelative: 'Relative Mouse',
mouseAbsoluteTip: 'Absolute positioning - direct screen coordinate mapping',
mouseRelativeTip: 'Relative positioning - sends mouse movement deltas',
extension: 'Extension',
extensionTip: 'Extension features',
webTerminal: 'Web Terminal',
stats: 'Stats',
statsTip: 'View connection statistics',
settings: 'Settings',
@@ -708,6 +707,9 @@ export default {
atxWolInterfaceHint: 'Specify network interface for WOL packets, leave empty for default routing',
themeDesc: 'Choose the interface color scheme',
languageDesc: 'Choose the interface display language',
featureVisibility: 'Feature Visibility',
featureVisibilityDesc: 'Control which feature entry points are shown on the console page',
computerUseAgent: 'Computer Use Agent',
videoSettings: 'Video Capture',
videoSettingsDesc: 'Configure capture device format, resolution and frame rate',
videoDevice: 'Video Device',

View File

@@ -105,8 +105,7 @@ export default {
mouseRelative: '相对鼠标',
mouseAbsoluteTip: '绝对定位模式 - 直接映射屏幕坐标',
mouseRelativeTip: '相对定位模式 - 发送鼠标移动增量',
extension: '扩展',
extensionTip: '扩展功能',
webTerminal: '网页终端',
stats: '连接统计',
statsTip: '查看连接状态',
settings: '设置',
@@ -707,6 +706,9 @@ export default {
atxWolInterfaceHint: '指定发送 WOL 包的网络接口,留空则使用系统默认路由',
themeDesc: '选择界面颜色方案',
languageDesc: '选择界面显示语言',
featureVisibility: '功能展示',
featureVisibilityDesc: '控制控制台页面显示的功能入口',
computerUseAgent: 'Computer Use Agent',
videoSettings: '视频采集',
videoSettingsDesc: '配置视频采集设备的格式、分辨率与帧率',
videoDevice: '视频设备',

View File

@@ -7,17 +7,34 @@ export function cn(...inputs: ClassValue[]) {
/**
* Generate a UUID v4 with fallback for older browsers
* Uses crypto.randomUUID() if available, otherwise falls back to manual generation
* Uses crypto.randomUUID() in secure contexts and crypto.getRandomValues()
* where randomUUID is unavailable, such as HTTP LAN access.
*/
export function generateUUID(): string {
// Use native API if available (modern browsers)
if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {
return crypto.randomUUID()
const webCrypto = globalThis.crypto
if (typeof webCrypto?.randomUUID === 'function') {
return webCrypto.randomUUID()
}
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
const r = (Math.random() * 16) | 0
const v = c === 'x' ? r : (r & 0x3) | 0x8
return v.toString(16)
})
const bytes = new Uint8Array(16)
if (typeof webCrypto?.getRandomValues === 'function') {
webCrypto.getRandomValues(bytes)
} else {
for (let i = 0; i < bytes.length; i++) {
bytes[i] = Math.floor(Math.random() * 256)
}
}
bytes[6] = (bytes[6]! & 0x0f) | 0x40
bytes[8] = (bytes[8]! & 0x3f) | 0x80
const hex = Array.from(bytes, byte => byte.toString(16).padStart(2, '0'))
return [
hex.slice(0, 4).join(''),
hex.slice(4, 6).join(''),
hex.slice(6, 8).join(''),
hex.slice(8, 10).join(''),
hex.slice(10, 16).join(''),
].join('-')
}

View File

@@ -11,6 +11,7 @@ import { useHidWebSocket } from '@/composables/useHidWebSocket'
import { useWebRTC } from '@/composables/useWebRTC'
import { useVideoSession } from '@/composables/useVideoSession'
import { useComputerUseSocket, type ComputerUseServerMessage } from '@/composables/useComputerUseSocket'
import { useFeatureVisibility } from '@/composables/useFeatureVisibility'
import { getUnifiedAudio } from '@/composables/useUnifiedAudio'
import { streamApi, hidApi, atxApi, atxConfigApi, authApi, computerUseApi } from '@/api'
import type { ComputerUseScreenshot, ComputerUseSession } from '@/api'
@@ -185,7 +186,10 @@ const changingPassword = ref(false)
const ttydStatus = ref<{ available: boolean; running: boolean } | null>(null)
const showTerminalDialog = ref(false)
const showTerminal = computed(() => ttydStatus.value?.available !== false)
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 isDark = ref(document.documentElement.classList.contains('dark'))
@@ -772,6 +776,7 @@ function clearComputerUseTimeline() {
}
async function openComputerUse() {
if (!showComputerUse.value) return
computerUseOpen.value = true
await computerUseSocket.connect().catch(() => {})
computerUseSession.value = await computerUseApi.session().catch(() => computerUseSession.value)
@@ -1818,6 +1823,14 @@ watch(() => webrtc.videoTrack.value, async (track) => {
}
})
watch(showTerminal, (visible) => {
if (!visible) showTerminalDialog.value = false
})
watch(showComputerUse, (visible) => {
if (!visible) computerUseOpen.value = false
})
watch(() => webrtc.audioTrack.value, async (track) => {
videoDebugLog('WebRTC audio track ref changed', {
hasTrack: Boolean(track),
@@ -2820,6 +2833,7 @@ onUnmounted(() => {
:video-mode="videoMode"
:ttyd-running="ttydStatus?.running"
:show-terminal="showTerminal"
:show-computer-use="showComputerUse"
@toggle-fullscreen="toggleFullscreen"
@toggle-stats="statsSheetOpen = true"
@toggle-virtual-keyboard="handleToggleVirtualKeyboard"
@@ -3037,6 +3051,7 @@ onUnmounted(() => {
</div>
</div>
<ComputerUseSheet
v-if="showComputerUse"
v-model:open="computerUseOpen"
:connected="computerUseSocket.connected.value"
:ws-error="computerUseSocket.error.value"
@@ -3120,6 +3135,7 @@ onUnmounted(() => {
id="currentPassword"
v-model="currentPassword"
type="password"
autocomplete="current-password"
:placeholder="t('auth.currentPasswordPlaceholder')"
/>
</div>
@@ -3129,6 +3145,7 @@ onUnmounted(() => {
id="newPassword"
v-model="newPassword"
type="password"
autocomplete="new-password"
:placeholder="t('auth.newPasswordPlaceholder')"
/>
</div>
@@ -3138,6 +3155,7 @@ onUnmounted(() => {
id="confirmPassword"
v-model="confirmPassword"
type="password"
autocomplete="new-password"
:placeholder="t('auth.confirmPasswordPlaceholder')"
/>
</div>

View File

@@ -82,6 +82,7 @@ async function handleLogin() {
id="username"
v-model="username"
type="text"
autocomplete="username"
:placeholder="t('auth.username')"
class="pl-10"
/>
@@ -96,6 +97,7 @@ async function handleLogin() {
id="password"
v-model="password"
:type="showPassword ? 'text' : 'password'"
autocomplete="current-password"
:placeholder="t('auth.password')"
class="pl-10 pr-10"
/>

View File

@@ -51,6 +51,7 @@ import type {
import { FrpProxyType, FrpcConfigMode } from '@/types/generated'
import { formatFpsLabel, toConfigFps } from '@/lib/fps'
import { useClipboard } from '@/composables/useClipboard'
import { useFeatureVisibility } from '@/composables/useFeatureVisibility'
import { getVideoFormatState } from '@/lib/video-format-support'
import { formatVideoDeviceLabel } from '@/lib/video-device-label'
import AppLayout from '@/components/AppLayout.vue'
@@ -111,6 +112,7 @@ import {
Globe,
Loader2,
AlertTriangle,
Bot,
} from 'lucide-vue-next'
const { t, te } = useI18n()
@@ -119,6 +121,7 @@ const router = useRouter()
const systemStore = useSystemStore()
const configStore = useConfigStore()
const authStore = useAuthStore()
const featureVisibility = useFeatureVisibility()
const isWindows = computed(() => systemStore.platform?.mode === 'windows')
const isAndroid = computed(() => systemStore.platform?.mode === 'android_amlogic')
@@ -2762,6 +2765,29 @@ watch(isWindows, () => {
<LanguageToggleButton variant="outline" size="sm" label-mode="current" />
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>{{ t('settings.featureVisibility') }}</CardTitle>
<CardDescription>{{ t('settings.featureVisibilityDesc') }}</CardDescription>
</CardHeader>
<CardContent class="space-y-1">
<div class="flex items-center justify-between gap-4 px-3 py-3">
<Label for="feature-web-terminal" class="flex min-w-0 items-center gap-2 font-normal">
<Terminal class="h-4 w-4 shrink-0 text-muted-foreground" />
<span class="truncate">{{ t('actionbar.webTerminal') }}</span>
</Label>
<Switch id="feature-web-terminal" v-model="featureVisibility.webTerminal" />
</div>
<div class="flex items-center justify-between gap-4 px-3 py-3">
<Label for="feature-computer-use" class="flex min-w-0 items-center gap-2 font-normal">
<Bot class="h-4 w-4 shrink-0 text-muted-foreground" />
<span class="truncate">{{ t('settings.computerUseAgent') }}</span>
</Label>
<Switch id="feature-computer-use" v-model="featureVisibility.computerUse" />
</div>
</CardContent>
</Card>
</div>
<!-- Account Section -->
@@ -2968,6 +2994,7 @@ watch(isWindows, () => {
id="turn-password"
v-model="config.turn_password"
:type="showPasswords ? 'text' : 'password'"
autocomplete="off"
:disabled="!config.stun_server && !config.turn_server"
/>
<button
@@ -4320,7 +4347,7 @@ watch(isWindows, () => {
<div class="grid gap-2 sm:grid-cols-4 sm:items-center">
<Label class="sm:text-right">{{ t('extensions.gostc.key') }}</Label>
<div class="sm:col-span-3 space-y-1">
<Input v-model="extConfig.gostc.key" type="password" :disabled="isExtRunning(extensions?.gostc?.status)" />
<Input v-model="extConfig.gostc.key" type="password" autocomplete="off" :disabled="isExtRunning(extensions?.gostc?.status)" />
<p v-if="extConfig.gostc.enabled && !extConfig.gostc.key" class="text-xs text-destructive">{{ t('extensions.gostc.keyRequired') }}</p>
</div>
</div>
@@ -4416,7 +4443,7 @@ watch(isWindows, () => {
</div>
<div class="grid gap-2 sm:grid-cols-4 sm:items-center">
<Label class="sm:text-right">{{ t('extensions.easytier.networkSecret') }}</Label>
<Input v-model="extConfig.easytier.network_secret" type="password" class="sm:col-span-3" :disabled="isExtRunning(extensions?.easytier?.status)" />
<Input v-model="extConfig.easytier.network_secret" type="password" autocomplete="off" class="sm:col-span-3" :disabled="isExtRunning(extensions?.easytier?.status)" />
</div>
<div class="grid gap-2 sm:grid-cols-4 sm:items-center">
<Label class="sm:text-right">{{ t('extensions.easytier.peers') }}</Label>
@@ -4572,7 +4599,7 @@ watch(isWindows, () => {
<div class="grid gap-2 sm:grid-cols-4 sm:items-center">
<Label class="sm:text-right">{{ t('extensions.frpc.token') }}</Label>
<div class="sm:col-span-3 space-y-1">
<Input v-model="extConfig.frpc.token" type="password" :disabled="isExtRunning(extensions?.frpc?.status)" />
<Input v-model="extConfig.frpc.token" type="password" autocomplete="off" :disabled="isExtRunning(extensions?.frpc?.status)" />
<p v-if="extConfig.frpc.enabled && !extConfig.frpc.token" class="text-xs text-destructive">{{ t('extensions.frpc.tokenRequired') }}</p>
</div>
</div>
@@ -4600,7 +4627,7 @@ watch(isWindows, () => {
</div>
<div v-if="showFrpcSecretKey" class="grid gap-2 sm:grid-cols-4 sm:items-center">
<Label class="sm:text-right">{{ t('extensions.frpc.secretKey') }}</Label>
<Input v-model="extConfig.frpc.secret_key" class="sm:col-span-3" type="password" :disabled="isExtRunning(extensions?.frpc?.status)" />
<Input v-model="extConfig.frpc.secret_key" class="sm:col-span-3" type="password" autocomplete="off" :disabled="isExtRunning(extensions?.frpc?.status)" />
</div>
<div class="grid gap-2 sm:grid-cols-4 sm:items-center">
<Label class="sm:text-right">{{ t('extensions.frpc.tls') }}</Label>

View File

@@ -646,6 +646,7 @@ const stepIcons = [User, Video, Keyboard, Puzzle]
id="username"
v-model="username"
type="text"
autocomplete="username"
:placeholder="t('setup.usernameHint')"
class="pl-10"
:class="{ 'border-destructive focus-visible:ring-destructive': usernameError }"
@@ -665,6 +666,7 @@ const stepIcons = [User, Video, Keyboard, Puzzle]
id="password"
v-model="password"
:type="showPassword ? 'text' : 'password'"
autocomplete="new-password"
:placeholder="t('setup.passwordHint')"
class="pr-10"
:class="{ 'border-destructive focus-visible:ring-destructive': passwordError }"
@@ -707,6 +709,7 @@ const stepIcons = [User, Video, Keyboard, Puzzle]
id="confirmPassword"
v-model="confirmPassword"
:type="showPassword ? 'text' : 'password'"
autocomplete="new-password"
:placeholder="t('setup.confirmPassword')"
:class="{ 'border-destructive focus-visible:ring-destructive': confirmPasswordError }"
@blur="validateConfirmPassword"