new release script

This commit is contained in:
Mark Gregory
2026-10-18 15:41:16 +01:00
parent 55c4254b25
commit 73e9a3efe2
4 changed files with 157 additions and 30 deletions
+21 -6
View File
@@ -8,10 +8,12 @@ extension Notification.Name {
@main
struct DBSynApp: App {
@StateObject private var model = DatabaseModel()
@AppStorage("preferences.appearance") private var appearance = "system"
var body: some Scene {
WindowGroup("DBSyn") {
WorkbenchLaunchView()
.preferredColorScheme(appearance == "dark" ? .dark : appearance == "light" ? .light : nil)
.onAppear {
if let iconURL = Bundle.main.url(forResource: "DBSyn", withExtension: "icns"),
let icon = NSImage(contentsOf: iconURL) {
@@ -30,7 +32,7 @@ struct DBSynApp: App {
NSApplication.shared.orderFrontStandardAboutPanel(options: [
.applicationName: "DBSyn",
.applicationIcon: icon ?? NSApplication.shared.applicationIconImage,
.version: "Phase 59.2",
.version: "Phase 61",
.credits: NSAttributedString(string: "Native MySQL client for macOS")
])
}
@@ -74,7 +76,7 @@ final class WorkbenchPreferences: ObservableObject {
var alternatingRows = true
@AppStorage("preferences.appearance")
var appearance = "light"
var appearance = "system"
@AppStorage("preferences.autoExpandTables")
var autoExpandTables = true
@@ -112,6 +114,9 @@ struct WorkbenchSettingsView: View {
@AppStorage("preferences.autoExpandTables")
private var autoExpandTables = true
@AppStorage("preferences.appearance")
private var appearance = "system"
var body: some View {
TabView {
@@ -148,7 +153,7 @@ struct WorkbenchSettingsView: View {
}
}
.frame(width: 620, height: 390)
.preferredColorScheme(.light)
.preferredColorScheme(appearance == "dark" ? .dark : appearance == "light" ? .light : nil)
}
private var editorSettings: some View {
@@ -273,6 +278,16 @@ struct WorkbenchSettingsView: View {
private var generalSettings: some View {
settingsPage("General") {
settingsRow("Appearance") {
Picker("Appearance", selection: $appearance) {
Text("System").tag("system")
Text("Light").tag("light")
Text("Dark").tag("dark")
}
.labelsHidden()
.frame(width: 170)
}
settingsRow("Navigator") {
Toggle(
"Automatically expand table folders",
@@ -392,14 +407,14 @@ struct WorkbenchSplashView: View {
.background(
LinearGradient(
colors: [
Color(red: 0.96, green: 0.98, blue: 1),
Color(red: 0.88, green: 0.93, blue: 1)
Color(nsColor: .windowBackgroundColor),
Color(nsColor: .controlBackgroundColor)
],
startPoint: .topLeading,
endPoint: .bottomTrailing
)
)
.preferredColorScheme(.light)
}
private func feature(_ symbol: String, _ title: String) -> some View {