Add screenshot generator

This commit is contained in:
世界
2026-01-08 16:13:20 +08:00
parent 264c4eed81
commit 6b589cb771
57 changed files with 1931 additions and 109 deletions
@@ -17,6 +17,25 @@ public enum NavigationPage: Int, CaseIterable, Identifiable {
}
public extension NavigationPage {
init?(snapshotValue: String) {
switch snapshotValue.trimmingCharacters(in: .whitespacesAndNewlines).lowercased() {
case "dashboard":
self = .dashboard
case "logs":
self = .logs
case "settings":
self = .settings
#if os(macOS)
case "groups":
self = .groups
case "connections":
self = .connections
#endif
default:
return nil
}
}
#if os(macOS)
static var macosDefaultPages: [NavigationPage] {
[.logs, .settings]