Something went wrong. Try again.
An auto tiler for macOS
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637import Foundation
public enum MenuProblem: Equatable, Sendable { case shortcutsOff case voiceOverShortcutConflict case startupFailure case secureInput(ownerName: String?) case updateReady case configuration(reason: String)
var title: String { switch self { case .shortcutsOff: MenuText.text("Shortcuts are off — re-enable Parcel…") case .voiceOverShortcutConflict: MenuText.text("VoiceOver is on — Use ⌥⌘") case .startupFailure: MenuText.text("Parcel could not start tiling — Try again") case .secureInput(let ownerName): if let ownerName { String(format: MenuText.text("Secure Input is on in %@"), locale: .current, ownerName) } else { MenuText.text("Secure Input is on") } case .updateReady: MenuText.text("Update ready — Restart to update") case .configuration: MenuText.text("Config has a problem — Show…") } }
var detail: String? { if case .configuration(let reason) = self { return reason } return nil }
var isActionable: Bool { if case .secureInput = self { return false } return true }}