diff options
| author | Dustin Mierau <dustin@mierau.me> | 2023-12-11 23:32:28 -0800 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2023-12-11 23:32:28 -0800 |
| commit | 18c4b8643df09be4ce52a4b110ea21ac1ad053fc (patch) | |
| tree | 335d4f0a6b430b983b6f00567b91eb1ee6b16b4b /Hotline/Views/UserListView.swift | |
| parent | 84aaa9ef0a1be6986e38d7e4f58e07d3cb84979e (diff) | |
Move to new Hotline model for data observation and let client exist standalone.
Diffstat (limited to 'Hotline/Views/UserListView.swift')
| -rw-r--r-- | Hotline/Views/UserListView.swift | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/Hotline/Views/UserListView.swift b/Hotline/Views/UserListView.swift deleted file mode 100644 index 8ea186e..0000000 --- a/Hotline/Views/UserListView.swift +++ /dev/null @@ -1,41 +0,0 @@ -import SwiftUI - -struct UserListView: View { - @Environment(HotlineClient.self) private var hotline - - var body: some View { - NavigationStack { - List(hotline.userList) { u in - Text("🤖 \(u.name)") - .fontWeight(.medium) - .lineLimit(1) - .truncationMode(.tail) - .foregroundStyle(u.isAdmin ? Color(hex: 0xE10000) : Color.accentColor) - .opacity(u.isIdle ? 0.5 : 1.0) - } -// .listStyle(.grouped) - .navigationBarTitleDisplayMode(.inline) - .toolbar { - ToolbarItem(placement: .principal) { - Text(hotline.server?.name ?? "") - .font(.headline) - } - ToolbarItem(placement: .navigationBarLeading) { - Button { - hotline.disconnect() - } label: { - Text(Image(systemName: "xmark.circle.fill")) - .symbolRenderingMode(.hierarchical) - .font(.title2) - .foregroundColor(.secondary) - } - } - } - } - } -} - -#Preview { - ChatView() - .environment(HotlineClient()) -} |