|
@@ -335,6 +335,9 @@ final class ViewController: NSViewController {
|
|
335
|
private var aiCompanionNotesStatusLabelByView = [ObjectIdentifier: NSTextField]()
|
335
|
private var aiCompanionNotesStatusLabelByView = [ObjectIdentifier: NSTextField]()
|
|
336
|
private var aiCompanionNotesCurrentRequestId: UUID?
|
336
|
private var aiCompanionNotesCurrentRequestId: UUID?
|
|
337
|
private var aiCompanionNotesPanel: NSPanel?
|
337
|
private var aiCompanionNotesPanel: NSPanel?
|
|
|
|
338
|
+ private weak var aiCompanionNotesRootView: NSView?
|
|
|
|
339
|
+ private weak var aiCompanionNotesHeaderView: NSView?
|
|
|
|
340
|
+ private weak var aiCompanionNotesTitleLabel: NSTextField?
|
|
338
|
private weak var aiCompanionNotesTextView: NSTextView?
|
341
|
private weak var aiCompanionNotesTextView: NSTextView?
|
|
339
|
private weak var aiCompanionNotesCopyButton: NSButton?
|
342
|
private weak var aiCompanionNotesCopyButton: NSButton?
|
|
340
|
private weak var aiCompanionNotesCloseButton: NSButton?
|
343
|
private weak var aiCompanionNotesCloseButton: NSButton?
|
|
@@ -3525,9 +3528,9 @@ private extension ViewController {
|
|
3525
|
@MainActor
|
3528
|
@MainActor
|
|
3526
|
private func aiCompanionPresentNotesWindow(meetingTitle: String, initialText: String) {
|
3529
|
private func aiCompanionPresentNotesWindow(meetingTitle: String, initialText: String) {
|
|
3527
|
guard let hostWindow = view.window else { return }
|
3530
|
guard let hostWindow = view.window else { return }
|
|
3528
|
- let hostIsDarkMode = hostWindow.effectiveAppearance.bestMatch(from: [.darkAqua, .aqua]) == .darkAqua
|
|
|
|
|
|
3531
|
+ let hostIsDarkMode = darkModeEnabled
|
|
3529
|
let panelAppearanceName: NSAppearance.Name = hostIsDarkMode ? .darkAqua : .aqua
|
3532
|
let panelAppearanceName: NSAppearance.Name = hostIsDarkMode ? .darkAqua : .aqua
|
|
3530
|
- let outerBackgroundColor: NSColor = hostIsDarkMode ? .windowBackgroundColor : NSColor(calibratedWhite: 0.96, alpha: 1.0)
|
|
|
|
|
|
3533
|
+ let outerBackgroundColor: NSColor = hostIsDarkMode ? .windowBackgroundColor : NSColor(calibratedWhite: 0.98, alpha: 1.0)
|
|
3531
|
let headerBackgroundColor: NSColor = hostIsDarkMode ? .controlBackgroundColor : NSColor(calibratedWhite: 0.93, alpha: 1.0)
|
3534
|
let headerBackgroundColor: NSColor = hostIsDarkMode ? .controlBackgroundColor : NSColor(calibratedWhite: 0.93, alpha: 1.0)
|
|
3532
|
|
3535
|
|
|
3533
|
if let panel = aiCompanionNotesPanel, let textView = aiCompanionNotesTextView {
|
3536
|
if let panel = aiCompanionNotesPanel, let textView = aiCompanionNotesTextView {
|
|
@@ -3535,6 +3538,9 @@ private extension ViewController {
|
|
3535
|
panel.appearance = NSAppearance(named: panelAppearanceName)
|
3538
|
panel.appearance = NSAppearance(named: panelAppearanceName)
|
|
3536
|
panel.backgroundColor = outerBackgroundColor
|
3539
|
panel.backgroundColor = outerBackgroundColor
|
|
3537
|
textView.string = initialText
|
3540
|
textView.string = initialText
|
|
|
|
3541
|
+ aiCompanionNotesRootView?.layer?.backgroundColor = outerBackgroundColor.cgColor
|
|
|
|
3542
|
+ aiCompanionNotesHeaderView?.layer?.backgroundColor = headerBackgroundColor.cgColor
|
|
|
|
3543
|
+ aiCompanionNotesTitleLabel?.textColor = hostIsDarkMode ? .labelColor : .black
|
|
3538
|
if hostWindow.attachedSheet !== panel {
|
3544
|
if hostWindow.attachedSheet !== panel {
|
|
3539
|
hostWindow.beginSheet(panel, completionHandler: nil)
|
3545
|
hostWindow.beginSheet(panel, completionHandler: nil)
|
|
3540
|
}
|
3546
|
}
|
|
@@ -3572,7 +3578,8 @@ private extension ViewController {
|
|
3572
|
header.layer?.backgroundColor = headerBackgroundColor.cgColor
|
3578
|
header.layer?.backgroundColor = headerBackgroundColor.cgColor
|
|
3573
|
header.layer?.cornerRadius = 10
|
3579
|
header.layer?.cornerRadius = 10
|
|
3574
|
|
3580
|
|
|
3575
|
- let titleLabel = textLabel("Meeting Notes", font: NSFont.systemFont(ofSize: 15, weight: .semibold), color: .labelColor)
|
|
|
|
|
|
3581
|
+ let headingColor: NSColor = hostIsDarkMode ? .labelColor : .black
|
|
|
|
3582
|
+ let titleLabel = textLabel("Meeting Notes", font: NSFont.systemFont(ofSize: 15, weight: .semibold), color: headingColor)
|
|
3576
|
titleLabel.translatesAutoresizingMaskIntoConstraints = false
|
3583
|
titleLabel.translatesAutoresizingMaskIntoConstraints = false
|
|
3577
|
let subtitleLabel = textLabel(meetingTitle, font: NSFont.systemFont(ofSize: 12, weight: .regular), color: .secondaryLabelColor)
|
3584
|
let subtitleLabel = textLabel(meetingTitle, font: NSFont.systemFont(ofSize: 12, weight: .regular), color: .secondaryLabelColor)
|
|
3578
|
subtitleLabel.translatesAutoresizingMaskIntoConstraints = false
|
3585
|
subtitleLabel.translatesAutoresizingMaskIntoConstraints = false
|
|
@@ -3644,6 +3651,9 @@ private extension ViewController {
|
|
3644
|
NSApp.activate(ignoringOtherApps: true)
|
3651
|
NSApp.activate(ignoringOtherApps: true)
|
|
3645
|
|
3652
|
|
|
3646
|
aiCompanionNotesPanel = panel
|
3653
|
aiCompanionNotesPanel = panel
|
|
|
|
3654
|
+ aiCompanionNotesRootView = root
|
|
|
|
3655
|
+ aiCompanionNotesHeaderView = header
|
|
|
|
3656
|
+ aiCompanionNotesTitleLabel = titleLabel
|
|
3647
|
aiCompanionNotesTextView = textView
|
3657
|
aiCompanionNotesTextView = textView
|
|
3648
|
aiCompanionNotesCopyButton = copyButton
|
3658
|
aiCompanionNotesCopyButton = copyButton
|
|
3649
|
aiCompanionNotesCloseButton = closeButton
|
3659
|
aiCompanionNotesCloseButton = closeButton
|
|
@@ -6607,6 +6617,9 @@ extension ViewController: NSWindowDelegate {
|
|
6607
|
guard let closingWindow = notification.object as? NSWindow else { return }
|
6617
|
guard let closingWindow = notification.object as? NSWindow else { return }
|
|
6608
|
if closingWindow === aiCompanionNotesPanel {
|
6618
|
if closingWindow === aiCompanionNotesPanel {
|
|
6609
|
aiCompanionNotesPanel = nil
|
6619
|
aiCompanionNotesPanel = nil
|
|
|
|
6620
|
+ aiCompanionNotesRootView = nil
|
|
|
|
6621
|
+ aiCompanionNotesHeaderView = nil
|
|
|
|
6622
|
+ aiCompanionNotesTitleLabel = nil
|
|
6610
|
aiCompanionNotesTextView = nil
|
6623
|
aiCompanionNotesTextView = nil
|
|
6611
|
aiCompanionNotesCopyButton = nil
|
6624
|
aiCompanionNotesCopyButton = nil
|
|
6612
|
aiCompanionNotesCloseButton = nil
|
6625
|
aiCompanionNotesCloseButton = nil
|