feat(i18n): add multi-language support (ja/ko/vi/ru/zh-TW) with system auto-detection

- Extend AppLanguage to 7 locales: zh-CN, zh-TW, en, ja, ko, vi, ru
- Auto-detect system language via navigator.languages; fallback to English
- Add BCP47 locale mapping for date formatting and sorting
- Create 50 translation JSON files (5 languages × 10 namespaces, 1137 keys each)
- Update language selector with native language names
- Extend locale key parity test to cover all 7 languages (70 assertions)
- Add VNC/RDP desktop, serial terminal, AI agent, port forwarding, and SFTP features
- Add credential encryption, host metrics, session backup crypto, and zmodem bridge
- Update Rust backend: desktop services, host metrics, SSH/SFTP enhancements
This commit is contained in:
Logan.Li committed 2026-08-12 00:07:48 +08:00
1 parent fea6d8db04
commit b0d0e3a5f3
301 files changed
+28002 -2705

No files matched your search

+95
View File
@@ -0,0 +1,95 @@
/** Shared remote-desktop (RDP / VNC) contracts for the renderer. */
export type DesktopProtocol = 'rdp' | 'vnc'
export type DesktopSecurity = 'nla' | 'tls' | 'rdp' | 'auto'
export interface RdpConfig {
host: string
port?: number
username: string
password: string
domain?: string
/** Default NLA (CredSSP). */
security?: DesktopSecurity
width?: number
height?: number
}
export interface VncConfig {
host: string
port?: number
/** Optional VNC password (DES challenge). */
password?: string
width?: number
height?: number
}
export type DesktopSessionConfig =
| { protocol: 'rdp'; config: RdpConfig }
| { protocol: 'vnc'; config: VncConfig }
export interface DesktopOpenResponse {
sessionId: string
}
export interface DesktopStatusEvent {
sessionId: string
status: 'connecting' | 'connected' | 'disconnected' | 'error'
message?: string
width?: number
height?: number
}
/** Dirty-rectangle frame. Prefer JPEG (`encoding: 'jpeg'`); `rgba` is raw w*h*4 fallback. */
export interface DesktopFrameEvent {
sessionId: string
x: number
y: number
width: number
height: number
/** Full framebuffer width (for canvas sizing). */
fbWidth: number
/** Full framebuffer height. */
fbHeight: number
encoding: 'jpeg' | 'rgba'
dataBase64: string
}
export type DesktopPointerButton = 'left' | 'middle' | 'right' | 'wheel_up' | 'wheel_down'
export interface DesktopPointerEvent {
x: number
y: number
button?: DesktopPointerButton
pressed?: boolean
/** true = pointer move (may include held button for drag). */
moving?: boolean
}
export interface DesktopKeyEvent {
key: string
code: string
pressed: boolean
altKey?: boolean
ctrlKey?: boolean
metaKey?: boolean
shiftKey?: boolean
}
export interface RdpClipboardEvent {
sessionId: string
text: string
}
export interface VncClipboardEvent {
sessionId: string
text: string
}
export interface RdpFileDownloadEvent {
sessionId: string
name: string
/** Absolute path in the host Downloads folder. */
path: string
}