mirror of
https://github.com/h3pdesign/Neon-Vision-Editor
synced 2026-04-21 13:27:16 +00:00
Switch settings opening to SettingsLink and unify shortcuts
This commit is contained in:
parent
9820a2714a
commit
6f365e4cfe
6 changed files with 13 additions and 28 deletions
|
|
@ -361,7 +361,7 @@
|
|||
CODE_SIGNING_ALLOWED = YES;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 355;
|
||||
CURRENT_PROJECT_VERSION = 358;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = CS727NF72U;
|
||||
ENABLE_APP_SANDBOX = YES;
|
||||
|
|
@ -441,7 +441,7 @@
|
|||
CODE_SIGNING_ALLOWED = YES;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 355;
|
||||
CURRENT_PROJECT_VERSION = 358;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = CS727NF72U;
|
||||
ENABLE_APP_SANDBOX = YES;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ struct NeonVisionMacAppCommands: Commands {
|
|||
let openNewWindow: () -> Void
|
||||
let openAIDiagnosticsWindow: () -> Void
|
||||
let postWindowCommand: (_ name: Notification.Name, _ object: Any?) -> Void
|
||||
let showSettingsWindow: () -> Void
|
||||
let isUpdaterEnabled: Bool
|
||||
|
||||
@Binding var useAppleIntelligence: Bool
|
||||
|
|
@ -66,10 +65,10 @@ struct NeonVisionMacAppCommands: Commands {
|
|||
|
||||
Divider()
|
||||
|
||||
Button("Settings…") {
|
||||
showSettingsWindow()
|
||||
SettingsLink {
|
||||
Text("Settings…")
|
||||
}
|
||||
.keyboardShortcut("+", modifiers: .command)
|
||||
.keyboardShortcut(",", modifiers: .command)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -348,9 +348,7 @@ struct NeonVisionEditorApp: App {
|
|||
|
||||
Divider()
|
||||
|
||||
Button {
|
||||
showSettingsWindow()
|
||||
} label: {
|
||||
SettingsLink {
|
||||
Label("Settings…", systemImage: "gearshape")
|
||||
}
|
||||
|
||||
|
|
@ -371,7 +369,6 @@ struct NeonVisionEditorApp: App {
|
|||
postWindowCommand: { name, object in
|
||||
postWindowCommand(name, object: object)
|
||||
},
|
||||
showSettingsWindow: showSettingsWindow,
|
||||
isUpdaterEnabled: ReleaseRuntimePolicy.isUpdaterEnabledForCurrentDistribution,
|
||||
useAppleIntelligence: $useAppleIntelligence,
|
||||
appleAIStatus: $appleAIStatus,
|
||||
|
|
@ -409,17 +406,6 @@ struct NeonVisionEditorApp: App {
|
|||
#endif
|
||||
}
|
||||
|
||||
private func showSettingsWindow() {
|
||||
#if os(macOS)
|
||||
NSApp.activate(ignoringOtherApps: true)
|
||||
let handledBySystemSettings = NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil)
|
||||
|| NSApp.sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil)
|
||||
if handledBySystemSettings {
|
||||
return
|
||||
}
|
||||
postWindowCommand(.showSettingsRequested)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
struct ShowGrokErrorKey: EnvironmentKey {
|
||||
|
|
|
|||
|
|
@ -204,11 +204,11 @@ extension ContentView {
|
|||
|
||||
@ViewBuilder
|
||||
private var settingsControl: some View {
|
||||
Button(action: { showSettingsSheet = true }) {
|
||||
Button(action: { openSettings() }) {
|
||||
Image(systemName: "gearshape")
|
||||
}
|
||||
.help("Settings (Cmd+)")
|
||||
.keyboardShortcut("+", modifiers: .command)
|
||||
.help("Settings (Cmd+,)")
|
||||
.keyboardShortcut(",", modifiers: .command)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
|
|
@ -501,7 +501,7 @@ extension ContentView {
|
|||
Label("Find & Replace", systemImage: "magnifyingglass")
|
||||
}
|
||||
case .settings:
|
||||
Button(action: { showSettingsSheet = true }) {
|
||||
Button(action: { openSettings() }) {
|
||||
Label("Settings", systemImage: "gearshape")
|
||||
}
|
||||
case .codeCompletion:
|
||||
|
|
@ -579,7 +579,7 @@ extension ContentView {
|
|||
private var moreActionsControl: some View {
|
||||
Menu {
|
||||
Button(action: {
|
||||
showSettingsSheet = true
|
||||
openSettings()
|
||||
}) {
|
||||
Label("Settings", systemImage: "gearshape")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -396,7 +396,7 @@ struct WelcomeTourView: View {
|
|||
ToolbarItemInfo(title: "New Tab", description: "New Tab", shortcutMac: "Cmd+T", shortcutPad: "Cmd+T", iconName: "plus.square.on.square"),
|
||||
ToolbarItemInfo(title: "Open File…", description: "Open File…", shortcutMac: "Cmd+O", shortcutPad: "Cmd+O", iconName: "folder"),
|
||||
ToolbarItemInfo(title: "Save File", description: "Save File", shortcutMac: "Cmd+S", shortcutPad: "Cmd+S", iconName: "square.and.arrow.down"),
|
||||
ToolbarItemInfo(title: "Settings", description: "Settings", shortcutMac: "Cmd+", shortcutPad: "None", iconName: "gearshape"),
|
||||
ToolbarItemInfo(title: "Settings", description: "Settings", shortcutMac: "Cmd+,", shortcutPad: "None", iconName: "gearshape"),
|
||||
ToolbarItemInfo(title: "Insert Template", description: "Insert Template for Current Language", shortcutMac: "None", shortcutPad: "None", iconName: "doc.badge.plus"),
|
||||
ToolbarItemInfo(title: "Language", description: "Language", shortcutMac: "None", shortcutPad: "None", iconName: "textformat"),
|
||||
ToolbarItemInfo(title: "AI Model & Settings", description: "AI Model & Settings", shortcutMac: "None", shortcutPad: "None", iconName: "brain.head.profile"),
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@
|
|||
"Run AI Check" = "KI-Prüfung ausführen";
|
||||
"Undo" = "Rückgängig";
|
||||
"Redo" = "Wiederholen";
|
||||
"Settings (Cmd+)" = "Einstellungen (Cmd+)";
|
||||
"Settings (Cmd+,)" = "Einstellungen (Cmd+,)";
|
||||
"Insert Template for Current Language" = "Vorlage für aktuelle Sprache einfügen";
|
||||
"Enable Wrap / Disable Wrap (Cmd+Opt+L)" = "Zeilenumbruch aktivieren/deaktivieren (Cmd+Opt+L)";
|
||||
"Open File… (Cmd+O)" = "Datei öffnen… (Cmd+O)";
|
||||
|
|
|
|||
Loading…
Reference in a new issue