diff options
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()) -} |