diff --git a/CHANGELOG.md b/CHANGELOG.md index d2c5743..f770d31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,16 +7,25 @@ - Fixed code signature issues for sandboxed apps by removing entitlements parameter from non-sandboxed builds. - Fixed Sparkle framework deep code signing to handle complex framework structure. - Fixed missing XPC service entitlements (`com.apple.security.xpc.aConnectionServices`, `com.apple.security.xpc.aStatusServices`) required for Sparkle installer to communicate with sandboxed app. +- Fixed excessive refresh timer resets by properly cancelling previous subscriptions and validating value changes before recreating timers. +- Fixed interval indicator to respect user's refresh interval setting instead of always assuming 60 seconds. ### Changed - Re-enabled app sandbox with minimal entitlements (network.client only) for improved security while maintaining Sparkle update functionality. - Enhanced Sparkle error logging to include error domain and code information, making update failures easier to diagnose. - Updated build script to use `ditto -c -k --keepParent` for creating update ZIPs, which properly preserves code signatures that `zip` command breaks. +- Removed app sandbox to allow Sparkle to function properly; keeps option to re-enable sandbox later for App Store distribution. ### Added - Added in-app Sparkle update logs in Preferences → Updates tab with Show/Hide toggle for real-time debugging of update operations. - Log entries include timestamps and distinguish between info and error messages. - Users can clear logs manually and logs persist during the session (max 100 entries). +- Added status notifications for server monitoring in Preferences → Notifications: + - "Status Notifications" toggle: alerts when servers go offline/online or services change status. + - "Alert Notifications" toggle: (placeholder for future alert threshold configuration). +- Ping status changes now trigger notifications (Server Online/Offline). +- Service status monitoring tracks individual services (DNS, FTP, SSH, HTTP, HTTPS, etc.) and alerts when they go offline or come back online. +- Notification permissions are requested automatically when the app launches. ### Previous Changes - Flattened the project structure so sources live at the repository root instead of the nested `iKeyMon/` folder and updated the Xcode project accordingly. diff --git a/NOTES.md b/NOTES.md index 9f001a2..0ec16f4 100644 --- a/NOTES.md +++ b/NOTES.md @@ -5,5 +5,3 @@ add a marker for "reboot required" - -1112 diff --git a/Sources/Views/ServerDetailView.swift b/Sources/Views/ServerDetailView.swift index 7c7c6e8..cee72c2 100644 --- a/Sources/Views/ServerDetailView.swift +++ b/Sources/Views/ServerDetailView.swift @@ -11,11 +11,12 @@ struct ServerDetailView: View { @Binding var server: Server var isFetching: Bool @AppStorage("showIntervalIndicator") private var showIntervalIndicator: Bool = true - + @AppStorage("refreshInterval") private var refreshInterval: Int = 60 + private var showPlaceholder: Bool { server.info == nil } - + @State private var progress: Double = 0 let timer = Timer.publish(every: 1.0 / 60.0, on: .main, in: .common).autoconnect() @@ -59,7 +60,7 @@ struct ServerDetailView: View { .onReceive(timer) { _ in guard showIntervalIndicator else { return } withAnimation(.linear(duration: 1.0 / 60.0)) { - progress += 1.0 / (60.0 * 60.0) + progress += 1.0 / (Double(refreshInterval) * 60.0) if progress >= 1 { progress = 0 } } }