Clipboard Floating Panel

This commit is contained in:
Hariharan Mudaliar 2025-08-12 23:38:10 +05:30
commit e583069870
12 changed files with 549 additions and 226 deletions

View file

@ -31,23 +31,17 @@ enum CalendarSelectionState: Codable, Defaults.Serializable {
}
enum ClipboardDisplayMode: String, CaseIterable, Codable, Defaults.Serializable {
case auto = "auto" // Automatically choose: popover on desktop, window in fullscreen
case popover = "popover" // Always use popover (attached to notch)
case window = "window" // Always use standalone window
case popover = "popover" // Always use floating panel
var displayName: String {
switch self {
case .auto: return "Auto (Smart)"
case .popover: return "Popover"
case .window: return "Window"
case .popover: return "Panel"
}
}
var description: String {
switch self {
case .auto: return "Automatically chooses the best display mode based on context"
case .popover: return "Always shows clipboard attached to the Dynamic Island"
case .window: return "Always shows clipboard in a standalone moveable window"
case .popover: return "Shows clipboard in a floating panel near the notch"
}
}
}
@ -192,7 +186,7 @@ extension Defaults.Keys {
static let enableClipboardManager = Key<Bool>("enableClipboardManager", default: true)
static let clipboardHistorySize = Key<Int>("clipboardHistorySize", default: 3)
static let showClipboardIcon = Key<Bool>("showClipboardIcon", default: true)
static let clipboardDisplayMode = Key<ClipboardDisplayMode>("clipboardDisplayMode", default: .auto)
static let clipboardDisplayMode = Key<ClipboardDisplayMode>("clipboardDisplayMode", default: .popover)
// MARK: Keyboard Shortcuts
static let enableShortcuts = Key<Bool>("enableShortcuts", default: true)

View file

@ -29,7 +29,6 @@ class DynamicIslandViewModel: NSObject, ObservableObject {
@Published var hideOnClosed: Bool = true
@Published var isHoveringCalendar: Bool = false
@Published var isBatteryPopoverActive: Bool = false
@Published var isClipboardPopoverActive: Bool = false
let webcamManager = WebcamManager.shared
@Published var isCameraExpanded: Bool = false