mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-07-30 07:21:44 +08:00
feat: 增强 VNC 功能的兼容性
This commit is contained in:
@@ -1085,7 +1085,6 @@ export default {
|
||||
encodingTightJpeg: 'Tight JPEG',
|
||||
encodingH264: 'H.264',
|
||||
encodingHint: 'VNC locks output while running. VNC cannot start under an H.265 lock; MJPEG blocks RTSP and RustDesk.',
|
||||
jpegQuality: 'JPEG Quality',
|
||||
allowOneClient: 'Allow One Client Only',
|
||||
password: 'Password',
|
||||
passwordPlaceholder: 'Leave empty to keep current',
|
||||
|
||||
@@ -1084,7 +1084,6 @@ export default {
|
||||
encodingTightJpeg: 'Tight JPEG',
|
||||
encodingH264: 'H.264',
|
||||
encodingHint: 'VNC 运行时会锁定编码;H.265 锁定时 VNC 无法启动,MJPEG 锁定时 RTSP 与 RustDesk 无法启动。',
|
||||
jpegQuality: 'JPEG 质量',
|
||||
allowOneClient: '仅允许单客户端',
|
||||
password: '密码',
|
||||
passwordPlaceholder: '留空表示不修改',
|
||||
|
||||
@@ -259,7 +259,6 @@ export interface VncConfig {
|
||||
bind: string;
|
||||
port: number;
|
||||
encoding: VncEncoding;
|
||||
jpeg_quality: number;
|
||||
allow_one_client: boolean;
|
||||
}
|
||||
|
||||
@@ -639,7 +638,6 @@ export interface VncConfigResponse {
|
||||
bind: string;
|
||||
port: number;
|
||||
encoding: VncEncoding;
|
||||
jpeg_quality: number;
|
||||
allow_one_client: boolean;
|
||||
has_password: boolean;
|
||||
}
|
||||
@@ -649,7 +647,6 @@ export interface VncConfigUpdate {
|
||||
bind?: string;
|
||||
port?: number;
|
||||
encoding?: VncEncoding;
|
||||
jpeg_quality?: number;
|
||||
allow_one_client?: boolean;
|
||||
password?: string;
|
||||
}
|
||||
|
||||
@@ -424,7 +424,6 @@ const vncLocalConfig = ref<VncConfigUpdate & { password?: string }>({
|
||||
bind: '0.0.0.0',
|
||||
port: 5900,
|
||||
encoding: 'tight_jpeg',
|
||||
jpeg_quality: 80,
|
||||
allow_one_client: true,
|
||||
password: '',
|
||||
})
|
||||
@@ -2496,7 +2495,6 @@ function applyVncStatus(status: VncStatusResponse) {
|
||||
bind: status.config.bind,
|
||||
port: status.config.port,
|
||||
encoding: status.config.encoding,
|
||||
jpeg_quality: status.config.jpeg_quality,
|
||||
allow_one_client: status.config.allow_one_client,
|
||||
password: '',
|
||||
}
|
||||
@@ -2519,7 +2517,6 @@ function vncUpdatePayload(enabled = !!vncLocalConfig.value.enabled): VncConfigUp
|
||||
bind: vncLocalConfig.value.bind?.trim() || '0.0.0.0',
|
||||
port: Number(vncLocalConfig.value.port) || 5900,
|
||||
encoding: vncLocalConfig.value.encoding || 'tight_jpeg',
|
||||
jpeg_quality: Number(vncLocalConfig.value.jpeg_quality) || 80,
|
||||
allow_one_client: !!vncLocalConfig.value.allow_one_client,
|
||||
}
|
||||
const password = (vncLocalConfig.value.password || '').trim()
|
||||
@@ -4844,10 +4841,6 @@ watch(isWindows, () => {
|
||||
<p class="text-xs text-muted-foreground">{{ t('extensions.vnc.encodingHint') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid gap-2 sm:grid-cols-4 sm:items-center">
|
||||
<Label class="sm:text-right">{{ t('extensions.vnc.jpegQuality') }}</Label>
|
||||
<Input v-model.number="vncLocalConfig.jpeg_quality" class="sm:col-span-3" type="number" min="10" max="100" :disabled="vncStatus?.service_status === 'running' || vncLocalConfig.encoding !== 'tight_jpeg'" />
|
||||
</div>
|
||||
<div class="flex items-center justify-between">
|
||||
<Label>{{ t('extensions.vnc.allowOneClient') }}</Label>
|
||||
<Switch v-model="vncLocalConfig.allow_one_client" :disabled="vncStatus?.service_status === 'running'" />
|
||||
|
||||
Reference in New Issue
Block a user