|
@@ -335,6 +335,9 @@ final class ViewController: NSViewController {
|
|
|
private var aiCompanionNotesStatusLabelByView = [ObjectIdentifier: NSTextField]()
|
|
private var aiCompanionNotesStatusLabelByView = [ObjectIdentifier: NSTextField]()
|
|
|
private var aiCompanionNotesCurrentRequestId: UUID?
|
|
private var aiCompanionNotesCurrentRequestId: UUID?
|
|
|
private var aiCompanionNotesPanel: NSPanel?
|
|
private var aiCompanionNotesPanel: NSPanel?
|
|
|
|
|
+ private weak var aiCompanionNotesRootView: NSView?
|
|
|
|
|
+ private weak var aiCompanionNotesHeaderView: NSView?
|
|
|
|
|
+ private weak var aiCompanionNotesTitleLabel: NSTextField?
|
|
|
private weak var aiCompanionNotesTextView: NSTextView?
|
|
private weak var aiCompanionNotesTextView: NSTextView?
|
|
|
private weak var aiCompanionNotesCopyButton: NSButton?
|
|
private weak var aiCompanionNotesCopyButton: NSButton?
|
|
|
private weak var aiCompanionNotesCloseButton: NSButton?
|
|
private weak var aiCompanionNotesCloseButton: NSButton?
|
|
@@ -3525,9 +3528,9 @@ private extension ViewController {
|
|
|
@MainActor
|
|
@MainActor
|
|
|
private func aiCompanionPresentNotesWindow(meetingTitle: String, initialText: String) {
|
|
private func aiCompanionPresentNotesWindow(meetingTitle: String, initialText: String) {
|
|
|
guard let hostWindow = view.window else { return }
|
|
guard let hostWindow = view.window else { return }
|
|
|
- let hostIsDarkMode = hostWindow.effectiveAppearance.bestMatch(from: [.darkAqua, .aqua]) == .darkAqua
|
|
|
|
|
|
|
+ let hostIsDarkMode = darkModeEnabled
|
|
|
let panelAppearanceName: NSAppearance.Name = hostIsDarkMode ? .darkAqua : .aqua
|
|
let panelAppearanceName: NSAppearance.Name = hostIsDarkMode ? .darkAqua : .aqua
|
|
|
- let outerBackgroundColor: NSColor = hostIsDarkMode ? .windowBackgroundColor : NSColor(calibratedWhite: 0.96, alpha: 1.0)
|
|
|
|
|
|
|
+ let outerBackgroundColor: NSColor = hostIsDarkMode ? .windowBackgroundColor : NSColor(calibratedWhite: 0.98, alpha: 1.0)
|
|
|
let headerBackgroundColor: NSColor = hostIsDarkMode ? .controlBackgroundColor : NSColor(calibratedWhite: 0.93, alpha: 1.0)
|
|
let headerBackgroundColor: NSColor = hostIsDarkMode ? .controlBackgroundColor : NSColor(calibratedWhite: 0.93, alpha: 1.0)
|
|
|
|
|
|
|
|
if let panel = aiCompanionNotesPanel, let textView = aiCompanionNotesTextView {
|
|
if let panel = aiCompanionNotesPanel, let textView = aiCompanionNotesTextView {
|
|
@@ -3535,6 +3538,9 @@ private extension ViewController {
|
|
|
panel.appearance = NSAppearance(named: panelAppearanceName)
|
|
panel.appearance = NSAppearance(named: panelAppearanceName)
|
|
|
panel.backgroundColor = outerBackgroundColor
|
|
panel.backgroundColor = outerBackgroundColor
|
|
|
textView.string = initialText
|
|
textView.string = initialText
|
|
|
|
|
+ aiCompanionNotesRootView?.layer?.backgroundColor = outerBackgroundColor.cgColor
|
|
|
|
|
+ aiCompanionNotesHeaderView?.layer?.backgroundColor = headerBackgroundColor.cgColor
|
|
|
|
|
+ aiCompanionNotesTitleLabel?.textColor = hostIsDarkMode ? .labelColor : .black
|
|
|
if hostWindow.attachedSheet !== panel {
|
|
if hostWindow.attachedSheet !== panel {
|
|
|
hostWindow.beginSheet(panel, completionHandler: nil)
|
|
hostWindow.beginSheet(panel, completionHandler: nil)
|
|
|
}
|
|
}
|
|
@@ -3572,7 +3578,8 @@ private extension ViewController {
|
|
|
header.layer?.backgroundColor = headerBackgroundColor.cgColor
|
|
header.layer?.backgroundColor = headerBackgroundColor.cgColor
|
|
|
header.layer?.cornerRadius = 10
|
|
header.layer?.cornerRadius = 10
|
|
|
|
|
|
|
|
- let titleLabel = textLabel("Meeting Notes", font: NSFont.systemFont(ofSize: 15, weight: .semibold), color: .labelColor)
|
|
|
|
|
|
|
+ let headingColor: NSColor = hostIsDarkMode ? .labelColor : .black
|
|
|
|
|
+ let titleLabel = textLabel("Meeting Notes", font: NSFont.systemFont(ofSize: 15, weight: .semibold), color: headingColor)
|
|
|
titleLabel.translatesAutoresizingMaskIntoConstraints = false
|
|
titleLabel.translatesAutoresizingMaskIntoConstraints = false
|
|
|
let subtitleLabel = textLabel(meetingTitle, font: NSFont.systemFont(ofSize: 12, weight: .regular), color: .secondaryLabelColor)
|
|
let subtitleLabel = textLabel(meetingTitle, font: NSFont.systemFont(ofSize: 12, weight: .regular), color: .secondaryLabelColor)
|
|
|
subtitleLabel.translatesAutoresizingMaskIntoConstraints = false
|
|
subtitleLabel.translatesAutoresizingMaskIntoConstraints = false
|
|
@@ -3644,6 +3651,9 @@ private extension ViewController {
|
|
|
NSApp.activate(ignoringOtherApps: true)
|
|
NSApp.activate(ignoringOtherApps: true)
|
|
|
|
|
|
|
|
aiCompanionNotesPanel = panel
|
|
aiCompanionNotesPanel = panel
|
|
|
|
|
+ aiCompanionNotesRootView = root
|
|
|
|
|
+ aiCompanionNotesHeaderView = header
|
|
|
|
|
+ aiCompanionNotesTitleLabel = titleLabel
|
|
|
aiCompanionNotesTextView = textView
|
|
aiCompanionNotesTextView = textView
|
|
|
aiCompanionNotesCopyButton = copyButton
|
|
aiCompanionNotesCopyButton = copyButton
|
|
|
aiCompanionNotesCloseButton = closeButton
|
|
aiCompanionNotesCloseButton = closeButton
|
|
@@ -6607,6 +6617,9 @@ extension ViewController: NSWindowDelegate {
|
|
|
guard let closingWindow = notification.object as? NSWindow else { return }
|
|
guard let closingWindow = notification.object as? NSWindow else { return }
|
|
|
if closingWindow === aiCompanionNotesPanel {
|
|
if closingWindow === aiCompanionNotesPanel {
|
|
|
aiCompanionNotesPanel = nil
|
|
aiCompanionNotesPanel = nil
|
|
|
|
|
+ aiCompanionNotesRootView = nil
|
|
|
|
|
+ aiCompanionNotesHeaderView = nil
|
|
|
|
|
+ aiCompanionNotesTitleLabel = nil
|
|
|
aiCompanionNotesTextView = nil
|
|
aiCompanionNotesTextView = nil
|
|
|
aiCompanionNotesCopyButton = nil
|
|
aiCompanionNotesCopyButton = nil
|
|
|
aiCompanionNotesCloseButton = nil
|
|
aiCompanionNotesCloseButton = nil
|