diff options
| author | Dustin Mierau <dustin@mierau.me> | 2025-11-12 21:45:13 -0800 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2025-11-12 21:45:13 -0800 |
| commit | 3795039436f741ec23f65e7cd0639023bac1f1ca (patch) | |
| tree | 1cbaf5c1b37583d9af7f84a075b97d131f93054c /Hotline/MacApp.swift | |
| parent | 79a37fa509576c94b96ff896550426d8ebfdec67 (diff) | |
More work on account management. Add Broadcast UI.
Diffstat (limited to 'Hotline/MacApp.swift')
| -rw-r--r-- | Hotline/MacApp.swift | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/Hotline/MacApp.swift b/Hotline/MacApp.swift index 5a84da8..7997a87 100644 --- a/Hotline/MacApp.swift +++ b/Hotline/MacApp.swift @@ -246,9 +246,9 @@ struct Application: App { Divider() Button("Broadcast Message...") { - // TODO: Implement broadcast message when user is allowed. + activeServerState?.broadcastShown = true } - .disabled(true) + .disabled(activeHotline?.access?.contains(.canBroadcast) != true) .keyboardShortcut(.init("B"), modifiers: .command) Divider() @@ -274,15 +274,12 @@ struct Application: App { .disabled(activeHotline?.status != .loggedIn) .keyboardShortcut(.init("4"), modifiers: .command) - if activeHotline?.access?.contains(.canOpenUsers) == true { - Divider() - - Button("Manage Server...") { - activeServerState?.accountsShown = true - } - .disabled(activeHotline?.status != .loggedIn || activeHotline?.access?.contains(.canOpenUsers) != true ) -// .keyboardShortcut(.init("5"), modifiers: .command) + Divider() + + Button("Manage Accounts...") { + activeServerState?.accountsShown = true } + .disabled(activeHotline?.status != .loggedIn || activeHotline?.access?.contains(.canOpenUsers) != true) } } |