feat(kiosk-shell): 首版登录页与状态机骨架

按《VDI 云桌面软件开发方案》3.2 节实现:
- 状态机 BOOT/CONFIG/CONNECTING/SESSION/RECONNECT/ERROR
- 首配页(SN 绑定、服务器地址、账号、密码、显示档位)
- 全局热键 Ctrl+Alt+Shift+M 呼出管理菜单
- FreeRDP 3 以 libfreerdp3 API 内嵌,非拉起外部进程
This commit is contained in:
dev committed 2026-10-23 17:22:55 +08:00
commit 419630fcd7
14 files changed
+1374

No files matched your search

+50
View File
@@ -0,0 +1,50 @@
// 终端本地配置
//
// 对应《VDI 云桌面软件开发方案》4.2 节 config_template 的终端侧镜像:
// 终端保存一份本地的配置版本,API 下发后覆盖。
// 当前阶段先做本地文件版本,后续由 vdt-agent 接管与 API 同步。
#ifndef KIOSK_SHELL_CONFIG_H
#define KIOSK_SHELL_CONFIG_H
#include <string>
namespace vdi {
struct TerminalConfig {
// 设备身份
std::string sn; // 序列号
std::string deviceKey; // 预置密钥(注册用)
// 首配
std::string server; // 服务器地址
std::string username; // 登录账号
std::string password; // 登录密码
std::string wifiSsid; // WiFi SSID
std::string wifiPassword;
// 显示档位:1920x1440 / 2560x1440 / 1920x1080 / 1280x720
std::string resolution = "1920x1440";
// 是否记住连接参数
bool remember = true;
int version = 0;
};
// 配置路径:~/.config/vdi-terminal/client.conf
std::string configDir();
std::string configPath();
// 读取配置;文件不存在时返回默认值
TerminalConfig loadConfig();
// 保存配置
bool saveConfig(const TerminalConfig& cfg);
// 读取设备序列号(优先取 /etc/machine-id,其次 /proc/device-tree/serial-number)
std::string readSerialNumber();
} // namespace vdi
#endif // KIOSK_SHELL_CONFIG_H