updates
This commit is contained in:
@@ -18,7 +18,32 @@ struct MonitorMenuView: View {
|
||||
}
|
||||
}.padding(14)
|
||||
Divider()
|
||||
Text("SERVERS").font(.caption.bold()).foregroundStyle(.secondary).padding(.horizontal, 14).padding(.top, 12)
|
||||
HStack {
|
||||
Text("SERVERS")
|
||||
.font(.caption.bold())
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
Spacer()
|
||||
|
||||
Menu {
|
||||
ForEach(monitor.servers) { server in
|
||||
Button {
|
||||
monitor.select(server.id)
|
||||
} label: {
|
||||
if server.id == monitor.selectedID {
|
||||
Label(server.name, systemImage: "checkmark")
|
||||
} else {
|
||||
Text(server.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
Label("Switch Server", systemImage: "chevron.down.circle")
|
||||
.font(.caption)
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 14)
|
||||
.padding(.top, 12)
|
||||
ScrollView {
|
||||
LazyVStack(spacing: 2) {
|
||||
ForEach(monitor.servers) { server in
|
||||
@@ -48,7 +73,8 @@ struct MonitorMenuView: View {
|
||||
}.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
}.frame(maxHeight: 175)
|
||||
}
|
||||
.frame(height: min(CGFloat(max(monitor.servers.count, 1)) * 58, 175))
|
||||
Divider()
|
||||
if let selected = monitor.selected {
|
||||
HStack {
|
||||
|
||||
Reference in New Issue
Block a user