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
+2 -22
View File
@@ -9,7 +9,7 @@ private struct SidebarContentView: View {
var environments: ExtensionEnvironments
private var hasGroups: Bool {
environments.commandClient.groups?.isEmpty == false
Variant.screenshotMode || environments.commandClient.groups?.isEmpty == false
}
var body: some View {
@@ -77,9 +77,7 @@ public struct SidebarView: View {
}
public var body: some View {
if ApplicationLibrary.inPreview {
previewContent
} else if environments.extensionProfileLoading {
if environments.extensionProfileLoading {
ProgressView()
} else if let profile = environments.extensionProfile {
SidebarContentView(
@@ -93,24 +91,6 @@ public struct SidebarView: View {
}
}
@ViewBuilder
private var previewContent: some View {
List(selection: $localSelection) {
Section(NavigationPage.dashboard.title) {
Label("Overview", systemImage: "text.and.command.macwindow")
.tint(.textColor)
.tag(NavigationPage.dashboard)
NavigationPage.groups.label.tag(NavigationPage.groups)
NavigationPage.connections.label.tag(NavigationPage.connections)
}
ForEach(NavigationPage.macosDefaultPages, id: \.self) { it in
it.label
}
}
.listStyle(.sidebar)
.scrollDisabled(true)
}
@ViewBuilder
private var disconnectedContent: some View {
List(selection: $localSelection) {