-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance NotificationsView and introduce SettingsView
- Improved NotificationsView layout with better spacing and error message styling. - Added functionality to open links in notifications and hide the application on button tap. - Introduced a new SettingsView for application controls, including termination and hiding options. - Updated NotificationRow to enhance text spacing and padding for improved readability.
- Loading branch information
Showing
2 changed files
with
78 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import SwiftUI | ||
import SwifterSwift | ||
|
||
struct SettingsView: View { | ||
@Environment(\.openURL) private var openURL | ||
|
||
var body: some View { | ||
VStack(spacing: 0) { | ||
Divider() | ||
|
||
HStack(spacing: 16) { | ||
Button { | ||
NSApplication.shared.terminate(nil) | ||
} label: { | ||
Image(systemName: "power.circle.fill") | ||
.foregroundColor(.red) | ||
.font(.title2) | ||
} | ||
.buttonStyle(.plain) | ||
|
||
Spacer() | ||
|
||
Button { | ||
NSApplication.shared.hide(nil) | ||
} label: { | ||
Image(systemName: "xmark.circle.fill") | ||
.font(.title2) | ||
} | ||
.buttonStyle(.plain) | ||
} | ||
.padding(.horizontal) | ||
.padding(.vertical, 8) | ||
} | ||
} | ||
} |