diff options
| author | Dustin Mierau <dustin@mierau.me> | 2023-12-19 20:38:13 -0800 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2023-12-19 20:38:13 -0800 |
| commit | 4fd69c02a3e7b581bb9229865336c315153f3b18 (patch) | |
| tree | e6e11d872424196f2b4033077902126ad5556e40 /Hotline/Views/UsersView.swift | |
| parent | 5e87b5927cd931d46fb5f72fb035480a95969a9f (diff) | |
Beginnings of a UI for macOS as well as some visual changes to iOS client. :)
Diffstat (limited to 'Hotline/Views/UsersView.swift')
| -rw-r--r-- | Hotline/Views/UsersView.swift | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/Hotline/Views/UsersView.swift b/Hotline/Views/UsersView.swift deleted file mode 100644 index d1f3318..0000000 --- a/Hotline/Views/UsersView.swift +++ /dev/null @@ -1,41 +0,0 @@ -import SwiftUI - -struct UsersView: View { - @Environment(Hotline.self) private var model: Hotline - - var body: some View { - NavigationStack { - List(model.users) { u in - Text("🤖 \(u.name)") - .fontWeight(.medium) - .lineLimit(1) - .truncationMode(.tail) - .foregroundStyle(u.status.contains(.admin) ? Color(hex: 0xE10000) : Color.accentColor) - .opacity(u.status.contains(.idle) ? 0.5 : 1.0) - } - .scrollBounceBehavior(.basedOnSize) - .navigationBarTitleDisplayMode(.inline) - .toolbar { - ToolbarItem(placement: .principal) { - Text(model.serverTitle) - .font(.headline) - } - ToolbarItem(placement: .navigationBarLeading) { - Button { - model.disconnect() - } label: { - Text(Image(systemName: "xmark.circle.fill")) - .symbolRenderingMode(.hierarchical) - .font(.title2) - .foregroundColor(.secondary) - } - } - } - } - } -} - -#Preview { - ChatView() - .environment(Hotline(trackerClient: HotlineTrackerClient(), client: HotlineClient())) -} |