mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-28 15:44:32 +00:00
Working stuff with revamped UI
This commit is contained in:
parent
8659a338dd
commit
5a8c592157
11 changed files with 646 additions and 279 deletions
|
|
@ -37,6 +37,8 @@ struct ContentView: View {
|
|||
@Default(.showNetworkGraph) var showNetworkGraph
|
||||
@Default(.showDiskGraph) var showDiskGraph
|
||||
@Default(.enableReminderLiveActivity) var enableReminderLiveActivity
|
||||
@Default(.enableTimerFeature) var enableTimerFeature
|
||||
@Default(.timerDisplayMode) var timerDisplayMode
|
||||
|
||||
// Dynamic sizing based on view type and graph count with smooth transitions
|
||||
var dynamicNotchSize: CGSize {
|
||||
|
|
@ -765,9 +767,11 @@ struct ContentView: View {
|
|||
triggerHapticIfAllowed()
|
||||
}
|
||||
|
||||
let shouldFocusTimerTab = enableTimerFeature && timerDisplayMode == .tab && timerManager.isTimerActive
|
||||
|
||||
guard vm.notchState == .closed,
|
||||
!coordinator.sneakPeek.show,
|
||||
Defaults[.openNotchOnHover] else { return }
|
||||
!coordinator.sneakPeek.show,
|
||||
(Defaults[.openNotchOnHover] || shouldFocusTimerTab) else { return }
|
||||
|
||||
hoverTask = Task {
|
||||
try? await Task.sleep(for: .seconds(Defaults[.minimumHoverDuration]))
|
||||
|
|
@ -778,6 +782,11 @@ struct ContentView: View {
|
|||
self.isHovering,
|
||||
!self.coordinator.sneakPeek.show else { return }
|
||||
|
||||
if shouldFocusTimerTab {
|
||||
withAnimation(.smooth) {
|
||||
self.coordinator.currentView = .timer
|
||||
}
|
||||
}
|
||||
self.openNotch()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue