mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-11 02:51:11 +00:00
Cleanup menu bar
This commit is contained in:
1 parent
a87387cd1d
commit
bd5a0ae061
3 files changed
+51
-30
No files matched your search
@@ -35,16 +35,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
|
||||
|
||||
menu.addItem(NSMenuItem.separator())
|
||||
|
||||
|
||||
let getSupportItem = NSMenuItem(title: NSLocalizedString("GetSupport", value: "Support", comment: ""), action: #selector(getSupport), keyEquivalent: "")
|
||||
menu.addItem(getSupportItem)
|
||||
|
||||
// Add "Privacy Policy" menu item
|
||||
let privacyPolicyItem = NSMenuItem(title: NSLocalizedString("PrivacyPolicy", value: "Privacy Policy", comment: ""), action: #selector(openPrivacyPolicy), keyEquivalent: "")
|
||||
menu.addItem(privacyPolicyItem)
|
||||
|
||||
menu.addItem(NSMenuItem.separator())
|
||||
|
||||
let userManualItem = NSMenuItem(title: NSLocalizedString("UserManual", value: "User Manual", comment: ""), action: #selector(openWelcomeScreen), keyEquivalent: "")
|
||||
menu.addItem(userManualItem)
|
||||
|
||||
@@ -196,22 +186,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@objc func getSupport() {
|
||||
if let url = URL(string: "mailto:quickdrop@leonboettger.com?subject=QuickDrop") {
|
||||
NSWorkspace.shared.open(url)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Action for "Privacy Policy" menu item
|
||||
@objc func openPrivacyPolicy() {
|
||||
if let url = URL(string: "http://leonboettger.com/privacy") {
|
||||
NSWorkspace.shared.open(url)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {
|
||||
statusItem?.isVisible=true
|
||||
return true
|
||||
|
||||
@@ -29,6 +29,41 @@ struct WelcomeScreen: View {
|
||||
|
||||
Divider()
|
||||
|
||||
Button {
|
||||
getSupport()
|
||||
} label: {
|
||||
HStack {
|
||||
Label("GetSupport", systemImage: "questionmark.circle")
|
||||
|
||||
Spacer()
|
||||
|
||||
Image(systemName: "arrow.up.right")
|
||||
.opacity(0.3)
|
||||
}
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.frame(height: 30)
|
||||
|
||||
|
||||
Button {
|
||||
openPrivacyPolicy()
|
||||
|
||||
} label: {
|
||||
|
||||
HStack {
|
||||
Label("PrivacyPolicy", systemImage: "hand.raised")
|
||||
|
||||
Spacer()
|
||||
|
||||
Image(systemName: "arrow.up.right")
|
||||
.opacity(0.3)
|
||||
}
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.frame(height: 30)
|
||||
|
||||
Divider()
|
||||
|
||||
Label(Tabs.settings.title, systemImage: Tabs.settings.systemImage)
|
||||
.tag(Tabs.settings)
|
||||
.frame(height: 30)
|
||||
@@ -60,6 +95,18 @@ struct WelcomeScreen: View {
|
||||
}
|
||||
.frame(width: 1000, height: 600)
|
||||
}
|
||||
|
||||
func getSupport() {
|
||||
if let url = URL(string: "mailto:quickdrop@leonboettger.com?subject=QuickDrop") {
|
||||
NSWorkspace.shared.open(url)
|
||||
}
|
||||
}
|
||||
|
||||
func openPrivacyPolicy() {
|
||||
if let url = URL(string: "http://leonboettger.com/privacy") {
|
||||
NSWorkspace.shared.open(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -783,8 +783,8 @@
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
SHARED_BUILD = 23;
|
||||
SHARED_VERSION = 1.5;
|
||||
SHARED_BUILD = 24;
|
||||
SHARED_VERSION = 1.6;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
};
|
||||
@@ -842,8 +842,8 @@
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = macosx;
|
||||
SHARED_BUILD = 23;
|
||||
SHARED_VERSION = 1.5;
|
||||
SHARED_BUILD = 24;
|
||||
SHARED_VERSION = 1.6;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user