aboutsummaryrefslogtreecommitdiff
path: root/Hotline
diff options
context:
space:
mode:
authorDustin Mierau <dustin@mierau.me>2024-06-30 17:46:30 -0700
committerDustin Mierau <dustin@mierau.me>2024-06-30 17:46:30 -0700
commit038df124a9c9d0ec7e7f3a7387669d5273a5bf49 (patch)
tree47f9c39c14a4b48e83be1c42885d92bd88384d47 /Hotline
parent3c352f194c7d14cc8a1ee23ec8fb7b834132d9a0 (diff)
A pass on icons. Sleeker toolbar window. Fix Accounts and News menu item disable states. Don't request banner from older servers. Cleanup News list display.
Diffstat (limited to 'Hotline')
-rw-r--r--Hotline/Application-macOS.swift4
-rw-r--r--Hotline/Assets.xcassets/Admin Drop Box.imageset/Admin Drop Box.pngbin464 -> 433 bytes
-rw-r--r--Hotline/Assets.xcassets/Admin Drop Box.imageset/Admin Drop Box@2x.pngbin909 -> 887 bytes
-rw-r--r--Hotline/Assets.xcassets/Admin Drop Box.imageset/Admin Drop Box@3x.pngbin1405 -> 1424 bytes
-rw-r--r--Hotline/Assets.xcassets/Drop Box.imageset/Drop Box.pngbin474 -> 409 bytes
-rw-r--r--Hotline/Assets.xcassets/Drop Box.imageset/Drop Box@2x.pngbin1007 -> 868 bytes
-rw-r--r--Hotline/Assets.xcassets/Drop Box.imageset/Drop Box@3x.pngbin1631 -> 1467 bytes
-rw-r--r--Hotline/Assets.xcassets/Folder.imageset/Folder.pngbin399 -> 393 bytes
-rw-r--r--Hotline/Assets.xcassets/Folder.imageset/Folder@2x.pngbin858 -> 854 bytes
-rw-r--r--Hotline/Assets.xcassets/Folder.imageset/Folder@3x.pngbin1487 -> 1459 bytes
-rw-r--r--Hotline/Assets.xcassets/Message Board Post.imageset/Message Board Post.pngbin392 -> 432 bytes
-rw-r--r--Hotline/Assets.xcassets/Message Board Post.imageset/Message Board Post@2x.pngbin701 -> 937 bytes
-rw-r--r--Hotline/Assets.xcassets/Message Board Post.imageset/Message Board Post@3x.pngbin1002 -> 1726 bytes
-rw-r--r--Hotline/Assets.xcassets/News Bundle.imageset/News Bundle.pngbin423 -> 607 bytes
-rw-r--r--Hotline/Assets.xcassets/News Bundle.imageset/News Bundle@2x.pngbin734 -> 1233 bytes
-rw-r--r--Hotline/Assets.xcassets/News Bundle.imageset/News Bundle@3x.pngbin1096 -> 2081 bytes
-rw-r--r--Hotline/Assets.xcassets/News Category.imageset/News Category.pngbin368 -> 473 bytes
-rw-r--r--Hotline/Assets.xcassets/News Category.imageset/News Category@2x.pngbin623 -> 888 bytes
-rw-r--r--Hotline/Assets.xcassets/News Category.imageset/News Category@3x.pngbin847 -> 1347 bytes
-rw-r--r--Hotline/Assets.xcassets/Section Board.imageset/Contents.json23
-rw-r--r--Hotline/Assets.xcassets/Section Board.imageset/Section Board.pngbin0 -> 518 bytes
-rw-r--r--Hotline/Assets.xcassets/Section Board.imageset/Section Board@2x.pngbin0 -> 1085 bytes
-rw-r--r--Hotline/Assets.xcassets/Section Board.imageset/Section Board@3x.pngbin0 -> 1709 bytes
-rw-r--r--Hotline/Assets.xcassets/Section Chat.imageset/Contents.json23
-rw-r--r--Hotline/Assets.xcassets/Section Chat.imageset/Section Chat.pngbin0 -> 518 bytes
-rw-r--r--Hotline/Assets.xcassets/Section Chat.imageset/Section Chat@2x.pngbin0 -> 936 bytes
-rw-r--r--Hotline/Assets.xcassets/Section Chat.imageset/Section Chat@3x.pngbin0 -> 1692 bytes
-rw-r--r--Hotline/Assets.xcassets/Section Files.imageset/Contents.json23
-rw-r--r--Hotline/Assets.xcassets/Section Files.imageset/Section Files.pngbin0 -> 463 bytes
-rw-r--r--Hotline/Assets.xcassets/Section Files.imageset/Section Files@2x.pngbin0 -> 1052 bytes
-rw-r--r--Hotline/Assets.xcassets/Section Files.imageset/Section Files@3x.pngbin0 -> 1929 bytes
-rw-r--r--Hotline/Assets.xcassets/Section News.imageset/Contents.json23
-rw-r--r--Hotline/Assets.xcassets/Section News.imageset/Section News.pngbin0 -> 548 bytes
-rw-r--r--Hotline/Assets.xcassets/Section News.imageset/Section News@2x.pngbin0 -> 958 bytes
-rw-r--r--Hotline/Assets.xcassets/Section News.imageset/Section News@3x.pngbin0 -> 1541 bytes
-rw-r--r--Hotline/Assets.xcassets/Section Servers.imageset/Contents.json23
-rw-r--r--Hotline/Assets.xcassets/Section Servers.imageset/Section Servers.pngbin0 -> 1131 bytes
-rw-r--r--Hotline/Assets.xcassets/Section Servers.imageset/Section Servers@2x.pngbin0 -> 2830 bytes
-rw-r--r--Hotline/Assets.xcassets/Section Servers.imageset/Section Servers@3x.pngbin0 -> 4850 bytes
-rw-r--r--Hotline/Assets.xcassets/Section Settings.imageset/Contents.json23
-rw-r--r--Hotline/Assets.xcassets/Section Settings.imageset/Section Settings.pngbin0 -> 1072 bytes
-rw-r--r--Hotline/Assets.xcassets/Section Settings.imageset/Section Settings@2x.pngbin0 -> 2495 bytes
-rw-r--r--Hotline/Assets.xcassets/Section Settings.imageset/Section Settings@3x.pngbin0 -> 4082 bytes
-rw-r--r--Hotline/Assets.xcassets/Section Users.imageset/Contents.json23
-rw-r--r--Hotline/Assets.xcassets/Section Users.imageset/Section Users.pngbin0 -> 915 bytes
-rw-r--r--Hotline/Assets.xcassets/Section Users.imageset/Section Users@2x.pngbin0 -> 2112 bytes
-rw-r--r--Hotline/Assets.xcassets/Section Users.imageset/Section Users@3x.pngbin0 -> 3406 bytes
-rw-r--r--Hotline/Assets.xcassets/Server Large.imageset/Server Large.pngbin1292 -> 1652 bytes
-rw-r--r--Hotline/Assets.xcassets/Server Large.imageset/Server Large@2x.pngbin2689 -> 4521 bytes
-rw-r--r--Hotline/Assets.xcassets/Server Large.imageset/Server Large@3x.pngbin4259 -> 8272 bytes
-rw-r--r--Hotline/Assets.xcassets/Server Message.imageset/4016.pngbin812 -> 0 bytes
-rw-r--r--Hotline/Assets.xcassets/Server Message.imageset/4016@2x.pngbin1550 -> 0 bytes
-rw-r--r--Hotline/Assets.xcassets/Server Message.imageset/4016@3x.pngbin2350 -> 0 bytes
-rw-r--r--Hotline/Assets.xcassets/Server Message.imageset/Contents.json6
-rw-r--r--Hotline/Assets.xcassets/Server Message.imageset/Server Message.pngbin0 -> 733 bytes
-rw-r--r--Hotline/Assets.xcassets/Server Message.imageset/Server Message@2x.pngbin0 -> 1521 bytes
-rw-r--r--Hotline/Assets.xcassets/Server Message.imageset/Server Message@3x.pngbin0 -> 2225 bytes
-rw-r--r--Hotline/Assets.xcassets/Server.imageset/Server.pngbin846 -> 961 bytes
-rw-r--r--Hotline/Assets.xcassets/Server.imageset/Server@2x.pngbin1777 -> 2307 bytes
-rw-r--r--Hotline/Assets.xcassets/Server.imageset/Server@3x.pngbin2827 -> 3924 bytes
-rw-r--r--Hotline/Assets.xcassets/Tracker.imageset/Tracker.pngbin383 -> 408 bytes
-rw-r--r--Hotline/Assets.xcassets/Tracker.imageset/Tracker@2x.pngbin662 -> 855 bytes
-rw-r--r--Hotline/Assets.xcassets/Tracker.imageset/Tracker@3x.pngbin1005 -> 1476 bytes
-rw-r--r--Hotline/Assets.xcassets/User.imageset/User.pngbin433 -> 614 bytes
-rw-r--r--Hotline/Assets.xcassets/User.imageset/User@2x.pngbin849 -> 1284 bytes
-rw-r--r--Hotline/Assets.xcassets/User.imageset/User@3x.pngbin1273 -> 2066 bytes
-rw-r--r--Hotline/Models/Hotline.swift4
-rw-r--r--Hotline/Shared/HotlinePanel.swift2
-rw-r--r--Hotline/macOS/FilesView.swift2
-rw-r--r--Hotline/macOS/HotlinePanelView.swift110
-rw-r--r--Hotline/macOS/MessageBoardEditorView.swift10
-rw-r--r--Hotline/macOS/NewsEditorView.swift2
-rw-r--r--Hotline/macOS/NewsItemView.swift55
-rw-r--r--Hotline/macOS/NewsView.swift2
-rw-r--r--Hotline/macOS/ServerView.swift77
75 files changed, 321 insertions, 114 deletions
diff --git a/Hotline/Application-macOS.swift b/Hotline/Application-macOS.swift
index 63b127a..56ead01 100644
--- a/Hotline/Application-macOS.swift
+++ b/Hotline/Application-macOS.swift
@@ -214,7 +214,7 @@ struct Application: App {
Button("Show News") {
activeServerState?.selection = .news
}
- .disabled(activeHotline?.status != .loggedIn)
+ .disabled(activeHotline?.status != .loggedIn || (activeHotline?.serverVersion ?? 0) < 151)
.keyboardShortcut(.init("2"), modifiers: .command)
Button("Show Message Board") {
activeServerState?.selection = .board
@@ -229,7 +229,7 @@ struct Application: App {
Button("Show Accounts") {
activeServerState?.selection = .accounts
}
- .disabled(activeHotline?.status != .loggedIn || activeHotline?.access?.contains(.canOpenUsers) == false )
+ .disabled(activeHotline?.status != .loggedIn || activeHotline?.access?.contains(.canOpenUsers) != true )
.keyboardShortcut(.init("5"), modifiers: .command)
}
}
diff --git a/Hotline/Assets.xcassets/Admin Drop Box.imageset/Admin Drop Box.png b/Hotline/Assets.xcassets/Admin Drop Box.imageset/Admin Drop Box.png
index 5d4bdb8..9905d7c 100644
--- a/Hotline/Assets.xcassets/Admin Drop Box.imageset/Admin Drop Box.png
+++ b/Hotline/Assets.xcassets/Admin Drop Box.imageset/Admin Drop Box.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Admin Drop Box.imageset/Admin Drop Box@2x.png b/Hotline/Assets.xcassets/Admin Drop Box.imageset/Admin Drop Box@2x.png
index 1ecf037..ad82349 100644
--- a/Hotline/Assets.xcassets/Admin Drop Box.imageset/Admin Drop Box@2x.png
+++ b/Hotline/Assets.xcassets/Admin Drop Box.imageset/Admin Drop Box@2x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Admin Drop Box.imageset/Admin Drop Box@3x.png b/Hotline/Assets.xcassets/Admin Drop Box.imageset/Admin Drop Box@3x.png
index c0cf6ce..b80f711 100644
--- a/Hotline/Assets.xcassets/Admin Drop Box.imageset/Admin Drop Box@3x.png
+++ b/Hotline/Assets.xcassets/Admin Drop Box.imageset/Admin Drop Box@3x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Drop Box.imageset/Drop Box.png b/Hotline/Assets.xcassets/Drop Box.imageset/Drop Box.png
index be8b501..09bf921 100644
--- a/Hotline/Assets.xcassets/Drop Box.imageset/Drop Box.png
+++ b/Hotline/Assets.xcassets/Drop Box.imageset/Drop Box.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Drop Box.imageset/Drop Box@2x.png b/Hotline/Assets.xcassets/Drop Box.imageset/Drop Box@2x.png
index 0249b96..6571289 100644
--- a/Hotline/Assets.xcassets/Drop Box.imageset/Drop Box@2x.png
+++ b/Hotline/Assets.xcassets/Drop Box.imageset/Drop Box@2x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Drop Box.imageset/Drop Box@3x.png b/Hotline/Assets.xcassets/Drop Box.imageset/Drop Box@3x.png
index 4d5bad2..9d7e747 100644
--- a/Hotline/Assets.xcassets/Drop Box.imageset/Drop Box@3x.png
+++ b/Hotline/Assets.xcassets/Drop Box.imageset/Drop Box@3x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Folder.imageset/Folder.png b/Hotline/Assets.xcassets/Folder.imageset/Folder.png
index e9909ab..381061c 100644
--- a/Hotline/Assets.xcassets/Folder.imageset/Folder.png
+++ b/Hotline/Assets.xcassets/Folder.imageset/Folder.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Folder.imageset/Folder@2x.png b/Hotline/Assets.xcassets/Folder.imageset/Folder@2x.png
index 860ca3b..df1c58d 100644
--- a/Hotline/Assets.xcassets/Folder.imageset/Folder@2x.png
+++ b/Hotline/Assets.xcassets/Folder.imageset/Folder@2x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Folder.imageset/Folder@3x.png b/Hotline/Assets.xcassets/Folder.imageset/Folder@3x.png
index 9e7634b..10fe0e9 100644
--- a/Hotline/Assets.xcassets/Folder.imageset/Folder@3x.png
+++ b/Hotline/Assets.xcassets/Folder.imageset/Folder@3x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Message Board Post.imageset/Message Board Post.png b/Hotline/Assets.xcassets/Message Board Post.imageset/Message Board Post.png
index 80f0f73..3d7fae1 100644
--- a/Hotline/Assets.xcassets/Message Board Post.imageset/Message Board Post.png
+++ b/Hotline/Assets.xcassets/Message Board Post.imageset/Message Board Post.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Message Board Post.imageset/Message Board Post@2x.png b/Hotline/Assets.xcassets/Message Board Post.imageset/Message Board Post@2x.png
index 990e5fd..1ccc659 100644
--- a/Hotline/Assets.xcassets/Message Board Post.imageset/Message Board Post@2x.png
+++ b/Hotline/Assets.xcassets/Message Board Post.imageset/Message Board Post@2x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Message Board Post.imageset/Message Board Post@3x.png b/Hotline/Assets.xcassets/Message Board Post.imageset/Message Board Post@3x.png
index 6f293b5..98bd367 100644
--- a/Hotline/Assets.xcassets/Message Board Post.imageset/Message Board Post@3x.png
+++ b/Hotline/Assets.xcassets/Message Board Post.imageset/Message Board Post@3x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/News Bundle.imageset/News Bundle.png b/Hotline/Assets.xcassets/News Bundle.imageset/News Bundle.png
index b0f4ee4..1b154db 100644
--- a/Hotline/Assets.xcassets/News Bundle.imageset/News Bundle.png
+++ b/Hotline/Assets.xcassets/News Bundle.imageset/News Bundle.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/News Bundle.imageset/News Bundle@2x.png b/Hotline/Assets.xcassets/News Bundle.imageset/News Bundle@2x.png
index 4728426..7583460 100644
--- a/Hotline/Assets.xcassets/News Bundle.imageset/News Bundle@2x.png
+++ b/Hotline/Assets.xcassets/News Bundle.imageset/News Bundle@2x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/News Bundle.imageset/News Bundle@3x.png b/Hotline/Assets.xcassets/News Bundle.imageset/News Bundle@3x.png
index cc7e0a2..f3adb80 100644
--- a/Hotline/Assets.xcassets/News Bundle.imageset/News Bundle@3x.png
+++ b/Hotline/Assets.xcassets/News Bundle.imageset/News Bundle@3x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/News Category.imageset/News Category.png b/Hotline/Assets.xcassets/News Category.imageset/News Category.png
index 5f58a1e..bf20da6 100644
--- a/Hotline/Assets.xcassets/News Category.imageset/News Category.png
+++ b/Hotline/Assets.xcassets/News Category.imageset/News Category.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/News Category.imageset/News Category@2x.png b/Hotline/Assets.xcassets/News Category.imageset/News Category@2x.png
index d3eff96..a2a61a0 100644
--- a/Hotline/Assets.xcassets/News Category.imageset/News Category@2x.png
+++ b/Hotline/Assets.xcassets/News Category.imageset/News Category@2x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/News Category.imageset/News Category@3x.png b/Hotline/Assets.xcassets/News Category.imageset/News Category@3x.png
index 371d15a..5a6876e 100644
--- a/Hotline/Assets.xcassets/News Category.imageset/News Category@3x.png
+++ b/Hotline/Assets.xcassets/News Category.imageset/News Category@3x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section Board.imageset/Contents.json b/Hotline/Assets.xcassets/Section Board.imageset/Contents.json
new file mode 100644
index 0000000..65b1d04
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Board.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "filename" : "Section Board.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Section Board@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Section Board@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/Hotline/Assets.xcassets/Section Board.imageset/Section Board.png b/Hotline/Assets.xcassets/Section Board.imageset/Section Board.png
new file mode 100644
index 0000000..6ebd353
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Board.imageset/Section Board.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section Board.imageset/Section Board@2x.png b/Hotline/Assets.xcassets/Section Board.imageset/Section Board@2x.png
new file mode 100644
index 0000000..731fcfe
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Board.imageset/Section Board@2x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section Board.imageset/Section Board@3x.png b/Hotline/Assets.xcassets/Section Board.imageset/Section Board@3x.png
new file mode 100644
index 0000000..754ce9b
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Board.imageset/Section Board@3x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section Chat.imageset/Contents.json b/Hotline/Assets.xcassets/Section Chat.imageset/Contents.json
new file mode 100644
index 0000000..44d86bd
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Chat.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "filename" : "Section Chat.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Section Chat@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Section Chat@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/Hotline/Assets.xcassets/Section Chat.imageset/Section Chat.png b/Hotline/Assets.xcassets/Section Chat.imageset/Section Chat.png
new file mode 100644
index 0000000..6c60903
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Chat.imageset/Section Chat.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section Chat.imageset/Section Chat@2x.png b/Hotline/Assets.xcassets/Section Chat.imageset/Section Chat@2x.png
new file mode 100644
index 0000000..88ae66a
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Chat.imageset/Section Chat@2x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section Chat.imageset/Section Chat@3x.png b/Hotline/Assets.xcassets/Section Chat.imageset/Section Chat@3x.png
new file mode 100644
index 0000000..cb8cc7a
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Chat.imageset/Section Chat@3x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section Files.imageset/Contents.json b/Hotline/Assets.xcassets/Section Files.imageset/Contents.json
new file mode 100644
index 0000000..9882c24
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Files.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "filename" : "Section Files.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Section Files@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Section Files@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/Hotline/Assets.xcassets/Section Files.imageset/Section Files.png b/Hotline/Assets.xcassets/Section Files.imageset/Section Files.png
new file mode 100644
index 0000000..aed2e76
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Files.imageset/Section Files.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section Files.imageset/Section Files@2x.png b/Hotline/Assets.xcassets/Section Files.imageset/Section Files@2x.png
new file mode 100644
index 0000000..11a22a6
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Files.imageset/Section Files@2x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section Files.imageset/Section Files@3x.png b/Hotline/Assets.xcassets/Section Files.imageset/Section Files@3x.png
new file mode 100644
index 0000000..dc4c1d8
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Files.imageset/Section Files@3x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section News.imageset/Contents.json b/Hotline/Assets.xcassets/Section News.imageset/Contents.json
new file mode 100644
index 0000000..f015c81
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section News.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "filename" : "Section News.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Section News@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Section News@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/Hotline/Assets.xcassets/Section News.imageset/Section News.png b/Hotline/Assets.xcassets/Section News.imageset/Section News.png
new file mode 100644
index 0000000..9285bf7
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section News.imageset/Section News.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section News.imageset/Section News@2x.png b/Hotline/Assets.xcassets/Section News.imageset/Section News@2x.png
new file mode 100644
index 0000000..b7479d6
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section News.imageset/Section News@2x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section News.imageset/Section News@3x.png b/Hotline/Assets.xcassets/Section News.imageset/Section News@3x.png
new file mode 100644
index 0000000..1af6a13
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section News.imageset/Section News@3x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section Servers.imageset/Contents.json b/Hotline/Assets.xcassets/Section Servers.imageset/Contents.json
new file mode 100644
index 0000000..4470c6f
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Servers.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "filename" : "Section Servers.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Section Servers@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Section Servers@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/Hotline/Assets.xcassets/Section Servers.imageset/Section Servers.png b/Hotline/Assets.xcassets/Section Servers.imageset/Section Servers.png
new file mode 100644
index 0000000..84d6fcc
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Servers.imageset/Section Servers.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section Servers.imageset/Section Servers@2x.png b/Hotline/Assets.xcassets/Section Servers.imageset/Section Servers@2x.png
new file mode 100644
index 0000000..9a9f80a
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Servers.imageset/Section Servers@2x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section Servers.imageset/Section Servers@3x.png b/Hotline/Assets.xcassets/Section Servers.imageset/Section Servers@3x.png
new file mode 100644
index 0000000..0750d86
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Servers.imageset/Section Servers@3x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section Settings.imageset/Contents.json b/Hotline/Assets.xcassets/Section Settings.imageset/Contents.json
new file mode 100644
index 0000000..d58685d
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Settings.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "filename" : "Section Settings.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Section Settings@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Section Settings@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/Hotline/Assets.xcassets/Section Settings.imageset/Section Settings.png b/Hotline/Assets.xcassets/Section Settings.imageset/Section Settings.png
new file mode 100644
index 0000000..0289423
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Settings.imageset/Section Settings.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section Settings.imageset/Section Settings@2x.png b/Hotline/Assets.xcassets/Section Settings.imageset/Section Settings@2x.png
new file mode 100644
index 0000000..5a8852a
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Settings.imageset/Section Settings@2x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section Settings.imageset/Section Settings@3x.png b/Hotline/Assets.xcassets/Section Settings.imageset/Section Settings@3x.png
new file mode 100644
index 0000000..743f256
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Settings.imageset/Section Settings@3x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section Users.imageset/Contents.json b/Hotline/Assets.xcassets/Section Users.imageset/Contents.json
new file mode 100644
index 0000000..0a699ec
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Users.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "filename" : "Section Users.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Section Users@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Section Users@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/Hotline/Assets.xcassets/Section Users.imageset/Section Users.png b/Hotline/Assets.xcassets/Section Users.imageset/Section Users.png
new file mode 100644
index 0000000..f8c6695
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Users.imageset/Section Users.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section Users.imageset/Section Users@2x.png b/Hotline/Assets.xcassets/Section Users.imageset/Section Users@2x.png
new file mode 100644
index 0000000..65752e7
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Users.imageset/Section Users@2x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Section Users.imageset/Section Users@3x.png b/Hotline/Assets.xcassets/Section Users.imageset/Section Users@3x.png
new file mode 100644
index 0000000..be6312d
--- /dev/null
+++ b/Hotline/Assets.xcassets/Section Users.imageset/Section Users@3x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Server Large.imageset/Server Large.png b/Hotline/Assets.xcassets/Server Large.imageset/Server Large.png
index 0b5fbb7..5c416d4 100644
--- a/Hotline/Assets.xcassets/Server Large.imageset/Server Large.png
+++ b/Hotline/Assets.xcassets/Server Large.imageset/Server Large.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Server Large.imageset/Server Large@2x.png b/Hotline/Assets.xcassets/Server Large.imageset/Server Large@2x.png
index d99e32c..7de0b7e 100644
--- a/Hotline/Assets.xcassets/Server Large.imageset/Server Large@2x.png
+++ b/Hotline/Assets.xcassets/Server Large.imageset/Server Large@2x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Server Large.imageset/Server Large@3x.png b/Hotline/Assets.xcassets/Server Large.imageset/Server Large@3x.png
index ce32a16..0e76c15 100644
--- a/Hotline/Assets.xcassets/Server Large.imageset/Server Large@3x.png
+++ b/Hotline/Assets.xcassets/Server Large.imageset/Server Large@3x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Server Message.imageset/4016.png b/Hotline/Assets.xcassets/Server Message.imageset/4016.png
deleted file mode 100644
index a11fbea..0000000
--- a/Hotline/Assets.xcassets/Server Message.imageset/4016.png
+++ /dev/null
Binary files differ
diff --git a/Hotline/Assets.xcassets/Server Message.imageset/4016@2x.png b/Hotline/Assets.xcassets/Server Message.imageset/4016@2x.png
deleted file mode 100644
index ef90260..0000000
--- a/Hotline/Assets.xcassets/Server Message.imageset/4016@2x.png
+++ /dev/null
Binary files differ
diff --git a/Hotline/Assets.xcassets/Server Message.imageset/4016@3x.png b/Hotline/Assets.xcassets/Server Message.imageset/4016@3x.png
deleted file mode 100644
index a2646ee..0000000
--- a/Hotline/Assets.xcassets/Server Message.imageset/4016@3x.png
+++ /dev/null
Binary files differ
diff --git a/Hotline/Assets.xcassets/Server Message.imageset/Contents.json b/Hotline/Assets.xcassets/Server Message.imageset/Contents.json
index 7011bdf..ab3e25e 100644
--- a/Hotline/Assets.xcassets/Server Message.imageset/Contents.json
+++ b/Hotline/Assets.xcassets/Server Message.imageset/Contents.json
@@ -1,17 +1,17 @@
{
"images" : [
{
- "filename" : "4016.png",
+ "filename" : "Server Message.png",
"idiom" : "universal",
"scale" : "1x"
},
{
- "filename" : "4016@2x.png",
+ "filename" : "Server Message@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
- "filename" : "4016@3x.png",
+ "filename" : "Server Message@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
diff --git a/Hotline/Assets.xcassets/Server Message.imageset/Server Message.png b/Hotline/Assets.xcassets/Server Message.imageset/Server Message.png
new file mode 100644
index 0000000..4640776
--- /dev/null
+++ b/Hotline/Assets.xcassets/Server Message.imageset/Server Message.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Server Message.imageset/Server Message@2x.png b/Hotline/Assets.xcassets/Server Message.imageset/Server Message@2x.png
new file mode 100644
index 0000000..4f1fddc
--- /dev/null
+++ b/Hotline/Assets.xcassets/Server Message.imageset/Server Message@2x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Server Message.imageset/Server Message@3x.png b/Hotline/Assets.xcassets/Server Message.imageset/Server Message@3x.png
new file mode 100644
index 0000000..c7a5a62
--- /dev/null
+++ b/Hotline/Assets.xcassets/Server Message.imageset/Server Message@3x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Server.imageset/Server.png b/Hotline/Assets.xcassets/Server.imageset/Server.png
index 9395a0d..6e43e66 100644
--- a/Hotline/Assets.xcassets/Server.imageset/Server.png
+++ b/Hotline/Assets.xcassets/Server.imageset/Server.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Server.imageset/Server@2x.png b/Hotline/Assets.xcassets/Server.imageset/Server@2x.png
index d206fbd..c12c871 100644
--- a/Hotline/Assets.xcassets/Server.imageset/Server@2x.png
+++ b/Hotline/Assets.xcassets/Server.imageset/Server@2x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Server.imageset/Server@3x.png b/Hotline/Assets.xcassets/Server.imageset/Server@3x.png
index 6341189..a04cf58 100644
--- a/Hotline/Assets.xcassets/Server.imageset/Server@3x.png
+++ b/Hotline/Assets.xcassets/Server.imageset/Server@3x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Tracker.imageset/Tracker.png b/Hotline/Assets.xcassets/Tracker.imageset/Tracker.png
index 6fc5957..fed290f 100644
--- a/Hotline/Assets.xcassets/Tracker.imageset/Tracker.png
+++ b/Hotline/Assets.xcassets/Tracker.imageset/Tracker.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Tracker.imageset/Tracker@2x.png b/Hotline/Assets.xcassets/Tracker.imageset/Tracker@2x.png
index ba3b2bb..658829d 100644
--- a/Hotline/Assets.xcassets/Tracker.imageset/Tracker@2x.png
+++ b/Hotline/Assets.xcassets/Tracker.imageset/Tracker@2x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/Tracker.imageset/Tracker@3x.png b/Hotline/Assets.xcassets/Tracker.imageset/Tracker@3x.png
index 32e9056..5f79f9d 100644
--- a/Hotline/Assets.xcassets/Tracker.imageset/Tracker@3x.png
+++ b/Hotline/Assets.xcassets/Tracker.imageset/Tracker@3x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/User.imageset/User.png b/Hotline/Assets.xcassets/User.imageset/User.png
index 79b64a8..6a1a8c3 100644
--- a/Hotline/Assets.xcassets/User.imageset/User.png
+++ b/Hotline/Assets.xcassets/User.imageset/User.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/User.imageset/User@2x.png b/Hotline/Assets.xcassets/User.imageset/User@2x.png
index 2ffd33c..4c025f7 100644
--- a/Hotline/Assets.xcassets/User.imageset/User@2x.png
+++ b/Hotline/Assets.xcassets/User.imageset/User@2x.png
Binary files differ
diff --git a/Hotline/Assets.xcassets/User.imageset/User@3x.png b/Hotline/Assets.xcassets/User.imageset/User@3x.png
index 3e30488..58f9167 100644
--- a/Hotline/Assets.xcassets/User.imageset/User@3x.png
+++ b/Hotline/Assets.xcassets/User.imageset/User@3x.png
Binary files differ
diff --git a/Hotline/Models/Hotline.swift b/Hotline/Models/Hotline.swift
index 70073c2..c57434a 100644
--- a/Hotline/Models/Hotline.swift
+++ b/Hotline/Models/Hotline.swift
@@ -667,6 +667,10 @@ class Hotline: Equatable, HotlineClientDelegate, HotlineFileClientDelegate {
}
@MainActor func downloadBanner(force: Bool = false) {
+ guard self.serverVersion >= 150 else {
+ return
+ }
+
if self.bannerClient != nil || force {
self.bannerClient?.delegate = nil
self.bannerClient?.cancel()
diff --git a/Hotline/Shared/HotlinePanel.swift b/Hotline/Shared/HotlinePanel.swift
index ee881a2..2db1038 100644
--- a/Hotline/Shared/HotlinePanel.swift
+++ b/Hotline/Shared/HotlinePanel.swift
@@ -1,7 +1,7 @@
import Cocoa
import SwiftUI
-fileprivate let HOTLINE_PANEL_SIZE: CGSize = CGSizeMake(476, 114)
+fileprivate let HOTLINE_PANEL_SIZE: CGSize = CGSizeMake(468, 114 - 10)
class HotlinePanel: NSPanel {
init(_ view: HotlinePanelView) {
diff --git a/Hotline/macOS/FilesView.swift b/Hotline/macOS/FilesView.swift
index 7546f2a..2afa1a8 100644
--- a/Hotline/macOS/FilesView.swift
+++ b/Hotline/macOS/FilesView.swift
@@ -75,7 +75,7 @@ struct FileView: View {
.opacity(file.isUnavailable ? 0.5 : 1.0)
if file.isFolder && loading {
- ProgressView().controlSize(.small).padding([.leading, .trailing], 1)
+ ProgressView().controlSize(.small).padding([.leading, .trailing], 5)
}
Spacer()
if !file.isUnavailable {
diff --git a/Hotline/macOS/HotlinePanelView.swift b/Hotline/macOS/HotlinePanelView.swift
index 2d4c253..991946e 100644
--- a/Hotline/macOS/HotlinePanelView.swift
+++ b/Hotline/macOS/HotlinePanelView.swift
@@ -9,12 +9,15 @@ struct HotlinePanelView: View {
Image(nsImage: ApplicationState.shared.activeServerBanner ?? NSImage(named: "Default Banner")!)
.interpolation(.high)
.resizable()
- .scaledToFit()
+ .scaledToFill()
.frame(width: 468, height: 60)
- .clipShape(RoundedRectangle(cornerRadius: 6.0))
- .padding([.top, .leading, .trailing], 4)
+ .frame(minWidth: 468, maxWidth: 468, minHeight: 60, maxHeight: 60)
+ .clipped()
+ .background(.black)
+// .clipShape(RoundedRectangle(cornerRadius: 6.0))
+// .padding([.top, .leading, .trailing], 4)
- HStack(spacing: 16) {
+ HStack(spacing: 10) {
Button {
if NSEvent.modifierFlags.contains(.option) {
openWindow(id: "server")
@@ -24,25 +27,24 @@ struct HotlinePanelView: View {
}
}
label: {
- Image(systemName: "globe.americas.fill")
+ Image("Section Servers")
.resizable()
.scaledToFit()
}
.buttonStyle(.plain)
- .frame(width: 18, height: 18)
+ .frame(width: 20, height: 20)
.help("Hotline Servers")
Button {
ApplicationState.shared.activeServerState?.selection = .chat
}
label: {
- Image(systemName: "bubble.fill")
+ Image("Section Chat")
.resizable()
.scaledToFit()
}
.buttonStyle(.plain)
- .frame(width: 18, height: 18)
- .opacity(ApplicationState.shared.activeServerState == nil ? 0.5 : 1.0)
+ .frame(width: 20, height: 20)
.disabled(ApplicationState.shared.activeServerState == nil)
.help("Public Chat")
@@ -50,72 +52,88 @@ struct HotlinePanelView: View {
ApplicationState.shared.activeServerState?.selection = .board
}
label: {
- Image(systemName: "pin.fill")
+ Image("Section Board")
.resizable()
.scaledToFit()
}
.buttonStyle(.plain)
- .frame(width: 18, height: 18)
- .opacity(ApplicationState.shared.activeServerState == nil ? 0.5 : 1.0)
+ .frame(width: 20, height: 20)
.disabled(ApplicationState.shared.activeServerState == nil)
.help("Message Board")
- Button {
- ApplicationState.shared.activeServerState?.selection = .news
- }
- label: {
- Image(systemName: "newspaper.fill")
- .resizable()
- .scaledToFit()
+ if let activeHotline = ApplicationState.shared.activeHotline,
+ activeHotline.serverVersion >= 151 {
+ Button {
+ ApplicationState.shared.activeServerState?.selection = .news
+ }
+ label: {
+ Image("Section News")
+ .resizable()
+ .scaledToFit()
+ }
+ .buttonStyle(.plain)
+ .frame(width: 20, height: 20)
+ .disabled(ApplicationState.shared.activeServerState == nil)
+ .help("News")
}
- .buttonStyle(.plain)
- .frame(width: 18, height: 18)
- .opacity(ApplicationState.shared.activeServerState == nil ? 0.5 : 1.0)
- .disabled(ApplicationState.shared.activeServerState == nil)
- .help("News")
Button {
ApplicationState.shared.activeServerState?.selection = .files
}
label: {
- Image(systemName: "folder.fill")
+ Image("Section Files")
.resizable()
.scaledToFit()
}
.buttonStyle(.plain)
- .frame(width: 18, height: 18)
- .opacity(ApplicationState.shared.activeServerState == nil ? 0.5 : 1.0)
+ .frame(width: 20, height: 20)
.disabled(ApplicationState.shared.activeServerState == nil)
.help("Files")
- Button {
- ApplicationState.shared.activeServerState?.selection = .accounts
- }
- label: {
- Image(systemName: "person.2.fill")
- .resizable()
- .scaledToFit()
- }
- .buttonStyle(.plain)
- .frame(width: 18, height: 18)
- .opacity(ApplicationState.shared.activeServerState == nil ? 0.5 : 1.0)
- .disabled(ApplicationState.shared.activeServerState == nil || ApplicationState.shared.activeHotline?.access?.contains(.canOpenUsers) == false)
- .help("Accounts")
-
Spacer()
+ if ApplicationState.shared.activeHotline?.access?.contains(.canOpenUsers) == true {
+ Button {
+ ApplicationState.shared.activeServerState?.selection = .accounts
+ }
+ label: {
+ Image("Section Users")
+ .resizable()
+ .scaledToFit()
+ }
+ .buttonStyle(.plain)
+ .frame(width: 20, height: 20)
+ .disabled(ApplicationState.shared.activeServerState == nil)
+ .help("Accounts")
+ }
+
SettingsLink(label: {
- Image(systemName: "gearshape.fill")
+ Image("Section Settings")
.resizable()
.scaledToFit()
})
.buttonStyle(.plain)
- .frame(width: 18, height: 18)
+ .frame(width: 20, height: 20)
.help("Settings")
}
- .padding(.top, 16)
- .padding(.bottom, 16)
- .padding([.leading, .trailing], 16)
+ .padding(.top, 12)
+ .padding(.bottom, 12)
+ .padding([.leading, .trailing], 12)
+
+// GroupBox {
+// HStack(spacing: 0) {
+// Text("Not Connected")
+// .font(.system(size: 10.0))
+// .lineLimit(1)
+// .truncationMode(.tail)
+// .opacity(0.5)
+// .padding(.vertical, 0.0)
+// .padding(.horizontal, 4.0)
+//
+// Spacer()
+// }
+// }
+// .padding([.leading, .bottom, .trailing], 4.0)
}
// .frame(width: 468)
// .background(colorScheme == .dark ? .black : .white)
diff --git a/Hotline/macOS/MessageBoardEditorView.swift b/Hotline/macOS/MessageBoardEditorView.swift
index 1b49f4e..029616f 100644
--- a/Hotline/macOS/MessageBoardEditorView.swift
+++ b/Hotline/macOS/MessageBoardEditorView.swift
@@ -48,11 +48,11 @@ struct MessageBoardEditorView: View {
Spacer()
- Image("Message Board Post")
- .resizable()
- .scaledToFit()
- .frame(width: 16, height: 16)
- .padding(.trailing, 6)
+// Image("Message Board Post")
+// .resizable()
+// .scaledToFit()
+// .frame(width: 16, height: 16)
+// .padding(.trailing, 6)
Text("New Post")
.fontWeight(.semibold)
diff --git a/Hotline/macOS/NewsEditorView.swift b/Hotline/macOS/NewsEditorView.swift
index a6f72ec..f69c846 100644
--- a/Hotline/macOS/NewsEditorView.swift
+++ b/Hotline/macOS/NewsEditorView.swift
@@ -88,7 +88,7 @@ struct NewsEditorView: View {
}
.buttonStyle(.plain)
.frame(width: 22, height: 22)
- .help("Post to Newsgroup")
+ .help("Post News")
.disabled(title.isEmpty || text.isEmpty)
}
}
diff --git a/Hotline/macOS/NewsItemView.swift b/Hotline/macOS/NewsItemView.swift
index 5cd9ce4..9614663 100644
--- a/Hotline/macOS/NewsItemView.swift
+++ b/Hotline/macOS/NewsItemView.swift
@@ -79,29 +79,40 @@ struct NewsItemView: View {
Spacer()
- if news.type == .bundle || news.type == .category {
- ZStack {
-// Text("^[\(news.count) \(news.type == .bundle ? "Category" : "Post")](inflect: true)")
- Text("\(news.count)")
- .foregroundStyle(.clear)
-// .font(.caption)
- .lineLimit(1)
- .padding([.leading, .trailing], 8)
- .padding([.top, .bottom], 2)
- .background(.secondary)
- .clipShape(Capsule())
-
- Text("\(news.count)")
- .foregroundStyle(.white)
-// .font(.caption)
- .lineLimit(1)
- .padding([.leading, .trailing], 8)
- .padding([.top, .bottom], 2)
- .blendMode(.destinationOut)
- }
- .drawingGroup(opaque: false)
+ if news.type == .category && news.count > 0 {
+ Text("^[\(news.count) Post](inflect: true)")
+ .lineLimit(1)
+ .foregroundStyle(.secondary)
+ .padding(.trailing, 8)
}
- if news.type == .article && news.articleUsername != nil {
+// if news.type == .bundle {
+// Text("\(news.count)")
+// .lineLimit(1)
+// .foregroundStyle(.tertiary)
+// .padding(.trailing, 8)
+
+// ZStack {
+// Text("^[\(news.count) \(news.type == .bundle ? "Category" : "Post")](inflect: true)")
+// Text("\(news.count)")
+// .foregroundStyle(.clear)
+//// .font(.caption)
+// .lineLimit(1)
+// .padding([.leading, .trailing], 8)
+// .padding([.top, .bottom], 2)
+// .background(.secondary)
+// .clipShape(Capsule())
+//
+// Text("\(news.count)")
+// .foregroundStyle(.white)
+//// .font(.caption)
+// .lineLimit(1)
+// .padding([.leading, .trailing], 8)
+// .padding([.top, .bottom], 2)
+// .blendMode(.destinationOut)
+// }
+// .drawingGroup(opaque: false)
+// }
+ else if news.type == .article && news.articleUsername != nil {
if let d = news.articleDate {
Text(NewsItemView.relativeDateFormatter.localizedString(for: d, relativeTo: Date.now))
.lineLimit(1)
diff --git a/Hotline/macOS/NewsView.swift b/Hotline/macOS/NewsView.swift
index 4469585..e4f4d21 100644
--- a/Hotline/macOS/NewsView.swift
+++ b/Hotline/macOS/NewsView.swift
@@ -138,7 +138,7 @@ struct NewsView: View {
} label: {
Image(systemName: "arrow.clockwise")
}
- .help("Reload Newsgroup")
+ .help("Reload News")
.disabled(loading)
}
}
diff --git a/Hotline/macOS/ServerView.swift b/Hotline/macOS/ServerView.swift
index 7349d95..5e3678f 100644
--- a/Hotline/macOS/ServerView.swift
+++ b/Hotline/macOS/ServerView.swift
@@ -58,28 +58,35 @@ struct ServerMenuItem: Identifiable, Hashable {
}
struct ListItemView: View {
- let icon: String
+ @Environment(\.controlActiveState) private var controlActiveState
+
+ let icon: String?
let title: String
let unread: Bool
var body: some View {
- HStack {
- Image(systemName: icon)
+ HStack(spacing: 5) {
+ if let i = icon {
+ Image(i)
.resizable()
+ // .renderingMode(.template)
.scaledToFit()
- .frame(width: 16, height: 16)
- .padding(.leading, 4)
- Text(title)
- .lineLimit(1)
- .truncationMode(.tail)
- Spacer()
- if unread {
- Circle()
- .frame(width: 6, height: 6)
- .padding(EdgeInsets(top: 0, leading: 8, bottom: 0, trailing: 2))
- .opacity(0.5)
- }
+ .frame(width: 20, height: 20)
+// .padding(.leading, 2)
+ .opacity(controlActiveState == .inactive ? 0.5 : 1.0)
}
+
+ Text(title)
+ .lineLimit(1)
+ .truncationMode(.tail)
+ Spacer()
+ if unread {
+ Circle()
+ .frame(width: 6, height: 6)
+ .padding(EdgeInsets(top: 0, leading: 8, bottom: 0, trailing: 2))
+ .opacity(0.5)
+ }
+ }
}
}
@@ -148,17 +155,17 @@ struct ServerView: View {
@Binding var server: Server
static var menuItems: [ServerMenuItem] = [
- ServerMenuItem(type: .chat, name: "Chat", image: "bubble"),
- ServerMenuItem(type: .board, name: "Board", image: "pin"),
- ServerMenuItem(type: .news, name: "News", image: "newspaper"),
- ServerMenuItem(type: .files, name: "Files", image: "folder"),
- ServerMenuItem(type: .accounts, name: "Accounts", image: "person.2"),
+ ServerMenuItem(type: .chat, name: "Chat", image: "Section Chat"),
+ ServerMenuItem(type: .board, name: "Board", image: "Section Board"),
+ ServerMenuItem(type: .news, name: "News", image: "Section News"),
+ ServerMenuItem(type: .files, name: "Files", image: "Section Files"),
+ ServerMenuItem(type: .accounts, name: "Accounts", image: "Section Users"),
]
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"),
+ ServerMenuItem(type: .chat, name: "Chat", image: "Section Chat"),
+ ServerMenuItem(type: .board, name: "Board", image: "Section Board"),
+ ServerMenuItem(type: .files, name: "Files", image: "Section Files"),
]
enum FocusFields {
@@ -211,7 +218,7 @@ struct ServerView: View {
.resizable()
.scaledToFit()
- .frame(width: 24)
+ .frame(width: 28)
.opacity(controlActiveState == .inactive ? 0.4 : 1.0)
}
}
@@ -377,10 +384,14 @@ struct ServerView: View {
}
if model.transfers.count > 0 {
+ Divider()
+
self.transfersSection
}
if model.users.count > 0 {
+ Divider()
+
self.usersSection
}
}
@@ -397,26 +408,28 @@ struct ServerView: View {
}
var transfersSection: some View {
- Section("Transfers") {
+// Section("Transfers") {
ForEach(model.transfers) { transfer in
TransferItemView(transfer: transfer)
}
- }
+// }
}
var usersSection: some View {
- Section("\(model.users.count) Online") {
+// Section("\(model.users.count) Online") {
ForEach(model.users) { user in
- HStack {
+ HStack(spacing: 5) {
if let iconImage = Hotline.getClassicIcon(Int(user.iconID)) {
Image(nsImage: iconImage)
.frame(width: 16, height: 16)
- .padding(.leading, 4)
+ .padding(.leading, 2)
+ .padding(.trailing, 2)
}
else {
Image("User")
.frame(width: 16, height: 16)
- .padding(.leading, 4)
+ .padding(.leading, 2)
+ .padding(.trailing, 2)
}
Text(user.name)
@@ -435,7 +448,7 @@ struct ServerView: View {
.opacity(controlActiveState == .inactive ? 0.5 : 1.0)
.tag(ServerNavigationType.user(userID: user.id))
}
- }
+// }
}
var serverView: some View {
@@ -453,7 +466,7 @@ struct ServerView: View {
case .news:
NewsView()
.navigationTitle(model.serverTitle)
- .navigationSubtitle("Newsgroup")
+ .navigationSubtitle("News")
.navigationSplitViewColumnWidth(min: 250, ideal: 500)
case .board:
MessageBoardView()