diff options
| author | Dustin Mierau <dustin@mierau.me> | 2025-11-14 08:38:32 -0800 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2025-11-14 08:38:32 -0800 |
| commit | 46384d99b78cca150aa720eb915d161b5be8c08d (patch) | |
| tree | 33b56420adae4f3158e7a07530c12b73e9f5d312 /Hotline/macOS/UserInfo.swift | |
| parent | 7ca2ece66a5d40964f5d640255d1b137433511a9 (diff) | |
Cleanup user client info sheet. Hide button if you don't have persmission to do so.
Diffstat (limited to 'Hotline/macOS/UserInfo.swift')
| -rw-r--r-- | Hotline/macOS/UserInfo.swift | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Hotline/macOS/UserInfo.swift b/Hotline/macOS/UserInfo.swift new file mode 100644 index 0000000..328fc02 --- /dev/null +++ b/Hotline/macOS/UserInfo.swift @@ -0,0 +1,25 @@ +import SwiftUI + +struct UserInfoView: View { + @Environment(\.dismiss) private var dismiss + + let info: HotlineUserClientInfo + + var body: some View { + ScrollView(.vertical) { + Text(self.info.details) + .fontDesign(.monospaced) + .textSelection(.enabled) + .frame(maxWidth: .infinity, alignment: .topLeading) + .padding() + } + .frame(width: 350, height: 400) + .toolbar { + ToolbarItem(placement: .confirmationAction) { + Button("OK") { + self.dismiss() + } + } + } + } +} |