feat(macos): add native menu bar app with notch overlay
Introduces a SwiftUI companion app for the Fail Well PWA: menu bar status item, popover with task list / record / history views, command palette, and a Dynamic Island-style notch overlay that shows the active step and timer beside the hardware notch and expands on hover to reveal pause/next controls.
This commit is contained in:
32
macos/Sources/FailWell/Views/Theme.swift
Normal file
32
macos/Sources/FailWell/Views/Theme.swift
Normal file
@@ -0,0 +1,32 @@
|
||||
import SwiftUI
|
||||
|
||||
enum Theme {
|
||||
static let mono: Font = .system(size: 12, weight: .regular, design: .monospaced)
|
||||
static let monoSmall: Font = .system(size: 11, weight: .regular, design: .monospaced)
|
||||
static let monoBold: Font = .system(size: 12, weight: .semibold, design: .monospaced)
|
||||
static let monoTitle: Font = .system(size: 13, weight: .semibold, design: .monospaced)
|
||||
static let monoTimer: Font = .system(size: 14, weight: .medium, design: .monospaced).monospacedDigit()
|
||||
|
||||
static let rowHeight: CGFloat = 24
|
||||
static let popoverWidth: CGFloat = 420
|
||||
static let popoverHeight: CGFloat = 520
|
||||
|
||||
static let dim: Color = .secondary
|
||||
static let accent: Color = .accentColor
|
||||
static let flag: Color = .orange
|
||||
|
||||
enum Glyph {
|
||||
static let pending = "·"
|
||||
static let active = "▶"
|
||||
static let done = "✓"
|
||||
static let flagged = "!"
|
||||
static let paused = "⏸"
|
||||
}
|
||||
}
|
||||
|
||||
extension View {
|
||||
func monoBody() -> some View { self.font(Theme.mono) }
|
||||
func monoSmall() -> some View { self.font(Theme.monoSmall) }
|
||||
func monoTitle() -> some View { self.font(Theme.monoTitle) }
|
||||
func monoTimer() -> some View { self.font(Theme.monoTimer) }
|
||||
}
|
||||
Reference in New Issue
Block a user