diff options
Diffstat (limited to 'Hotline/iOS/UsersView.swift')
| -rw-r--r-- | Hotline/iOS/UsersView.swift | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/Hotline/iOS/UsersView.swift b/Hotline/iOS/UsersView.swift index d1f3318..5d7a198 100644 --- a/Hotline/iOS/UsersView.swift +++ b/Hotline/iOS/UsersView.swift @@ -6,12 +6,23 @@ struct UsersView: View { 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) + HStack(alignment: .center, spacing: 4) { + HStack(alignment: .center, spacing: 0) { + if let iconImage = Hotline.getClassicIcon(Int(u.iconID)) { + Image(uiImage: iconImage) + .interpolation(.none) + .frame(width: 32, height: 16, alignment: .center) + .scaledToFit() + } + } + .frame(width: 32) + Text(u.name) + .fontWeight(.medium) + .lineLimit(1) + .truncationMode(.tail) + .foregroundStyle(u.isAdmin ? Color(hex: 0xE10000) : Color.accentColor) + } + .opacity(u.isIdle ? 0.5 : 1.0) } .scrollBounceBehavior(.basedOnSize) .navigationBarTitleDisplayMode(.inline) |