aboutsummaryrefslogtreecommitdiff
path: root/Hotline/macOS/Settings/SoundSettingsView.swift
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-11-27 23:38:04 +0100
committerRuben Beltran del Rio <git@r.bdr.sh>2025-11-27 23:38:04 +0100
commit213710bf5bd6413c747bf126db50816ef5de5a6e (patch)
tree912f8cf87955a08077c92fea8ad934f50b7ab975 /Hotline/macOS/Settings/SoundSettingsView.swift
parentf466b21dc02f78c984ba6748e703f6780a7a0db4 (diff)
parent6a95b53616a4abfa306ddce43151cf4fefbd20ed (diff)
Merge remote-tracking branch 'upstream/main'
Diffstat (limited to 'Hotline/macOS/Settings/SoundSettingsView.swift')
-rw-r--r--Hotline/macOS/Settings/SoundSettingsView.swift40
1 files changed, 40 insertions, 0 deletions
diff --git a/Hotline/macOS/Settings/SoundSettingsView.swift b/Hotline/macOS/Settings/SoundSettingsView.swift
new file mode 100644
index 0000000..b99db77
--- /dev/null
+++ b/Hotline/macOS/Settings/SoundSettingsView.swift
@@ -0,0 +1,40 @@
+import SwiftUI
+
+struct SoundSettingsView: View {
+ var body: some View {
+ @Bindable var preferences = Prefs.shared
+
+ Form {
+ Toggle("Enable Sounds", isOn: $preferences.playSounds)
+ .controlSize(.large)
+
+ Section("Sounds") {
+ Toggle("Chat", isOn: $preferences.playChatSound)
+ .disabled(!preferences.playSounds)
+
+ Toggle("File Transfers", isOn: $preferences.playFileTransferCompleteSound)
+ .disabled(!preferences.playSounds)
+
+ Toggle("Private Message", isOn: $preferences.playPrivateMessageSound)
+ .disabled(!preferences.playSounds)
+
+ Toggle("Join", isOn: $preferences.playJoinSound)
+ .disabled(!preferences.playSounds)
+
+ Toggle("Leave", isOn: $preferences.playLeaveSound)
+ .disabled(!preferences.playSounds)
+
+ Toggle("Logged in", isOn: $preferences.playLoggedInSound)
+ .disabled(!preferences.playSounds)
+
+ Toggle("Error", isOn: $preferences.playErrorSound)
+ .disabled(!preferences.playSounds)
+
+ Toggle("Chat Invitation", isOn: $preferences.playChatInvitationSound)
+ .disabled(!preferences.playSounds)
+ }
+ }
+ .formStyle(.grouped)
+ .frame(width: 392, height: 433)
+ }
+}