aboutsummaryrefslogtreecommitdiff
path: root/Hotline/State
diff options
context:
space:
mode:
authorDustin Mierau <dustin@mierau.me>2025-11-12 18:55:25 -0800
committerDustin Mierau <dustin@mierau.me>2025-11-12 18:55:25 -0800
commit5eff79cc4891076d85223dcfd96c7cb8894c80f2 (patch)
tree9a0197cf30d3300cb2fbc024da26ddbc82df43bd /Hotline/State
parent5a3d06c527cf03d68149449965fade0dd5ea0ed2 (diff)
Get Accounts out of the sidebar, redesign Account management.
Diffstat (limited to 'Hotline/State')
-rw-r--r--Hotline/State/AppUpdate.swift20
-rw-r--r--Hotline/State/ServerState.swift7
2 files changed, 18 insertions, 9 deletions
diff --git a/Hotline/State/AppUpdate.swift b/Hotline/State/AppUpdate.swift
index 558a296..83006a2 100644
--- a/Hotline/State/AppUpdate.swift
+++ b/Hotline/State/AppUpdate.swift
@@ -144,12 +144,13 @@ final class AppUpdate {
self.releaseNotesCombined = nil
self.isDownloading = false
if trigger == .manual {
- self.message = AppUpdateMessage(
- title: "Hotline is up to date",
- detail: "You're running the latest and greatest.",
- kind: .success
- )
- self.showWindow = true
+ self.showUpToDateAlert()
+// self.message = AppUpdateMessage(
+// title: "Hotline is up to date",
+// detail: "You're running the latest and greatest.",
+// kind: .success
+// )
+// self.showWindow = true
} else {
self.message = nil
self.showWindow = false
@@ -175,6 +176,13 @@ final class AppUpdate {
}
}
+ private func showUpToDateAlert() {
+ let alert = NSAlert()
+ alert.messageText = "No Update Available"
+ alert.informativeText = "You are already using the latest version of Hotline!"
+ alert.runModal()
+ }
+
private func fetchNewerReleases() async throws -> [UpdateReleaseInfo] {
let (data, _) = try await URLSession.shared.data(from: releasesURL)
guard let jsonArray = try JSONSerialization.jsonObject(with: data, options: []) as? [[String: Any]] else {
diff --git a/Hotline/State/ServerState.swift b/Hotline/State/ServerState.swift
index 5913bf5..8f8d3bf 100644
--- a/Hotline/State/ServerState.swift
+++ b/Hotline/State/ServerState.swift
@@ -5,6 +5,7 @@ class ServerState: Equatable {
var id: UUID = UUID()
var selection: ServerNavigationType
var serverName: String? = nil
+ var accountsShown: Bool = false
// var serverBanner: NSImage? = nil
// var bannerBackgroundColor: Color? = nil
@@ -28,8 +29,8 @@ enum ServerNavigationType: Identifiable, Hashable, Equatable {
return "Board"
case .files:
return "Files"
- case .accounts:
- return "Accounts"
+// case .accounts:
+// return "Accounts"
case .user(let userID):
return String(userID)
}
@@ -39,6 +40,6 @@ enum ServerNavigationType: Identifiable, Hashable, Equatable {
case news
case board
case files
- case accounts
+// case accounts
case user(userID: UInt16)
}