aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDustin Mierau <dustin@mierau.me>2024-01-03 15:57:37 -0800
committerDustin Mierau <dustin@mierau.me>2024-01-03 15:57:37 -0800
commit2286040715ff8c08c4114c60e81f087f92d53800 (patch)
tree8e8601e227a0ba585204f08f406fb5d48bb33a4a
parent69ddf90fda6d88fe440d6f6597db8c08962cd24e (diff)
Clean up user list definition a bit
-rw-r--r--Hotline/macOS/ServerView.swift27
1 files changed, 5 insertions, 22 deletions
diff --git a/Hotline/macOS/ServerView.swift b/Hotline/macOS/ServerView.swift
index 5570c47..ddf6878 100644
--- a/Hotline/macOS/ServerView.swift
+++ b/Hotline/macOS/ServerView.swift
@@ -265,36 +265,19 @@ struct ServerView: View {
if let iconImage = Hotline.getClassicIcon(Int(user.iconID)) {
Image(nsImage: iconImage)
.frame(width: 18)
- .opacity(controlActiveState == .inactive ? 0.5 : 1.0)
- .opacity(user.isIdle ? 0.5 : 1.0)
}
else {
Text("")
.frame(width: 18)
}
- if user.isAdmin {
- if user.isIdle {
- Text(user.name)
- .foregroundStyle(.red)
- .opacity(controlActiveState == .inactive ? 0.3 : 0.5)
- }
- else {
- Text(user.name)
- .foregroundStyle(.red)
- .opacity(controlActiveState == .inactive ? 0.5 : 1.0)
- }
- }
- else if user.isIdle {
- Text(user.name)
- .opacity(controlActiveState == .inactive ? 0.3 : 0.5)
- }
- else {
- Text(user.name)
-// .opacity(controlActiveState == .inactive ? 0.5 : 1.0)
- }
+ Text(user.name)
+ .foregroundStyle(user.isAdmin ? Color(hex: 0xE10000) : .primary)
+
Spacer()
}
+ .opacity(user.isIdle ? 0.6 : 1.0)
+ .opacity(controlActiveState == .inactive ? 0.4 : 1.0)
.tag(MenuItem(name: user.name, image: "", type: .user, userID: user.id))
}
}