Files
shadcn-slint/ui/types.slint
2026-01-30 20:32:37 +08:00

58 lines
1.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Data structure definitions for the proxy management application
// 配置文件信息
export struct Profile {
id: string,
name: string,
url: string,
type: string, // "remote" | "local"
updated-at: string,
usage: string, // "1.26GB / 100GB"
expire-at: string,
selected: bool,
}
// 代理节点
export struct ProxyNode {
name: string,
type: string, // "Vmess", "Shadowsocks", etc.
delay: int, // 延迟 ms-1 表示未测试
udp: bool,
}
// 代理组
export struct ProxyGroup {
name: string,
type: string, // "Selector", "URLTest", etc.
now: string, // 当前选中的节点
nodes: [ProxyNode],
}
// 连接信息
export struct Connection {
id: string,
host: string,
process: string,
rule: string,
chains: string,
upload: string,
download: string,
time: string,
}
// 日志条目
export struct LogEntry {
time: string,
level: string, // "debug", "info", "warn", "error"
message: string,
}
// 设置项
export struct SettingItem {
key: string,
label: string,
value: string,
type: string, // "switch", "select", "button", "text"
enabled: bool,
}