aboutsummaryrefslogtreecommitdiff
path: root/Hotline/macOS/ServerView.swift
diff options
context:
space:
mode:
authorDustin Mierau <dustin@mierau.me>2024-05-22 11:40:53 -0700
committerDustin Mierau <dustin@mierau.me>2024-05-22 11:40:53 -0700
commitc7a2970c7f17a1b19a76d9cb6addda8fb877a63a (patch)
tree20f52495dd9e599d7b3942ba8357c79bc394822d /Hotline/macOS/ServerView.swift
parent39255f49250e3b0ccbd42661614a7c8a3e0d4fb7 (diff)
Redesign of Message Board post sheet. Tweaks to NewsEditor. Disable smart quotes in message board and news editor text view. Hide news section on older servers.
Diffstat (limited to 'Hotline/macOS/ServerView.swift')
-rw-r--r--Hotline/macOS/ServerView.swift9
1 files changed, 8 insertions, 1 deletions
diff --git a/Hotline/macOS/ServerView.swift b/Hotline/macOS/ServerView.swift
index e3f0596..e342f73 100644
--- a/Hotline/macOS/ServerView.swift
+++ b/Hotline/macOS/ServerView.swift
@@ -151,6 +151,12 @@ struct ServerView: View {
ServerMenuItem(type: .files, name: "Files", image: "folder"),
]
+ static var classicMenuItems: [ServerMenuItem] = [
+ ServerMenuItem(type: .chat, name: "Chat", image: "bubble"),
+ ServerMenuItem(type: .board, name: "Board", image: "pin"),
+ ServerMenuItem(type: .files, name: "Files", image: "folder"),
+ ]
+
enum FocusFields {
case address
case login
@@ -347,7 +353,8 @@ struct ServerView: View {
var navigationList: some View {
List(selection: $state.selection) {
- ForEach(ServerView.menuItems) { menuItem in
+ // Don't show news on older servers.
+ ForEach(model.serverVersion < 151 ? ServerView.classicMenuItems : ServerView.menuItems) { menuItem in
if menuItem.type == .chat {
ListItemView(icon: menuItem.image, title: menuItem.name, unread: model.unreadPublicChat).tag(menuItem.type)
}