fix: interval indicator respects refresh interval setting
- ServerDetailView now reads refreshInterval from AppStorage - Progress bar duration dynamically adjusts based on user's refresh interval setting - Previously hardcoded to 60 seconds regardless of user preference
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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 }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user