Files
opsxshell/src-tauri/src/application/state.rs
T
Logan.Li b0d0e3a5f3 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
2026-08-12 00:07:48 +08:00

26 lines
736 B
Rust

use std::sync::Arc;
use crate::services::{
ai::AiService,
deep_link::DeepLinkService,
desktop::{RdpService, VncService},
local_terminal::LocalTerminalService,
serial::SerialService,
ssh::SshService,
storage::StorageService,
};
/// Shared application root. Services are added here only after their lifecycle
/// and cancellation semantics are defined in the domain layer.
#[derive(Clone, Default)]
pub struct AppState {
pub ai: Arc<AiService>,
pub deep_links: Arc<DeepLinkService>,
pub local_terminal: Arc<LocalTerminalService>,
pub serial: Arc<SerialService>,
pub rdp: Arc<RdpService>,
pub vnc: Arc<VncService>,
pub ssh: Arc<SshService>,
pub storage: Arc<StorageService>,
}