|
@@ -7537,6 +7537,46 @@ class ViewController: NSViewController {
|
|
|
return "Saved time: \(formatter.string(from: date))"
|
|
return "Saved time: \(formatter.string(from: date))"
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private func styleAiCompanionGetNotesButton(_ button: NSButton, enabled: Bool) {
|
|
|
|
|
+ let pillHeight: CGFloat = 36
|
|
|
|
|
+ button.isBordered = false
|
|
|
|
|
+ button.wantsLayer = true
|
|
|
|
|
+ button.layer?.cornerRadius = pillHeight / 2
|
|
|
|
|
+ button.layer?.borderWidth = 1
|
|
|
|
|
+ button.font = .systemFont(ofSize: 13, weight: .semibold)
|
|
|
|
|
+ button.imagePosition = .imageLeading
|
|
|
|
|
+ button.imageHugsTitle = true
|
|
|
|
|
+
|
|
|
|
|
+ let enabledFill = palette.isDarkMode
|
|
|
|
|
+ ? NSColor(calibratedRed: 22 / 255, green: 34 / 255, blue: 54 / 255, alpha: 1)
|
|
|
|
|
+ : NSColor(calibratedRed: 236 / 255, green: 243 / 255, blue: 252 / 255, alpha: 1)
|
|
|
|
|
+ let disabledFill = palette.isDarkMode
|
|
|
|
|
+ ? NSColor(calibratedRed: 18 / 255, green: 26 / 255, blue: 40 / 255, alpha: 1)
|
|
|
|
|
+ : NSColor(calibratedRed: 245 / 255, green: 247 / 255, blue: 250 / 255, alpha: 1)
|
|
|
|
|
+
|
|
|
|
|
+ if enabled {
|
|
|
|
|
+ button.layer?.backgroundColor = enabledFill.cgColor
|
|
|
|
|
+ button.layer?.borderColor = accentBlue.cgColor
|
|
|
|
|
+ button.contentTintColor = accentBlue
|
|
|
|
|
+ if let icon = NSImage(systemSymbolName: "note.text", accessibilityDescription: nil) {
|
|
|
|
|
+ let config = NSImage.SymbolConfiguration(pointSize: 13, weight: .semibold)
|
|
|
|
|
+ .applying(NSImage.SymbolConfiguration(hierarchicalColor: accentBlue))
|
|
|
|
|
+ button.image = icon.withSymbolConfiguration(config)
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ let mutedBlue = accentBlue.withAlphaComponent(palette.isDarkMode ? 0.38 : 0.45)
|
|
|
|
|
+ button.layer?.backgroundColor = disabledFill.cgColor
|
|
|
|
|
+ button.layer?.borderColor = mutedBlue.cgColor
|
|
|
|
|
+ button.contentTintColor = mutedBlue
|
|
|
|
|
+ if let icon = NSImage(systemSymbolName: "note.text", accessibilityDescription: nil) {
|
|
|
|
|
+ let config = NSImage.SymbolConfiguration(pointSize: 13, weight: .semibold)
|
|
|
|
|
+ .applying(NSImage.SymbolConfiguration(hierarchicalColor: mutedBlue))
|
|
|
|
|
+ button.image = icon.withSymbolConfiguration(config)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private func localRecordingNotesStatusLabel(
|
|
private func localRecordingNotesStatusLabel(
|
|
|
for recording: MeetingRecordingManager.RecordedMeeting,
|
|
for recording: MeetingRecordingManager.RecordedMeeting,
|
|
|
notesStatus: LocalRecordingNotesStatus
|
|
notesStatus: LocalRecordingNotesStatus
|
|
@@ -7596,27 +7636,12 @@ class ViewController: NSViewController {
|
|
|
let getNotesTitle = notesReady ? "View Notes" : "Get Notes"
|
|
let getNotesTitle = notesReady ? "View Notes" : "Get Notes"
|
|
|
let getNotesBtn = NSButton(title: getNotesTitle, target: self, action: #selector(recordingGetNotesTapped(_:)))
|
|
let getNotesBtn = NSButton(title: getNotesTitle, target: self, action: #selector(recordingGetNotesTapped(_:)))
|
|
|
getNotesBtn.translatesAutoresizingMaskIntoConstraints = false
|
|
getNotesBtn.translatesAutoresizingMaskIntoConstraints = false
|
|
|
- getNotesBtn.isBordered = false
|
|
|
|
|
- getNotesBtn.wantsLayer = true
|
|
|
|
|
- getNotesBtn.layer?.cornerRadius = 10
|
|
|
|
|
- getNotesBtn.font = .systemFont(ofSize: 13, weight: .semibold)
|
|
|
|
|
getNotesBtn.tag = index
|
|
getNotesBtn.tag = index
|
|
|
- if let icon = NSImage(systemSymbolName: "note.text", accessibilityDescription: nil) {
|
|
|
|
|
- let config = NSImage.SymbolConfiguration(pointSize: 12, weight: .semibold)
|
|
|
|
|
- getNotesBtn.image = icon.withSymbolConfiguration(config)
|
|
|
|
|
- getNotesBtn.imagePosition = .imageLeading
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
let getNotesEnabled = (notesStatus != .processing)
|
|
let getNotesEnabled = (notesStatus != .processing)
|
|
|
&& (notesReady || notesStatus == .failed || (hasTranscript && !transcriptionBusy))
|
|
&& (notesReady || notesStatus == .failed || (hasTranscript && !transcriptionBusy))
|
|
|
getNotesBtn.isEnabled = getNotesEnabled
|
|
getNotesBtn.isEnabled = getNotesEnabled
|
|
|
- if getNotesEnabled {
|
|
|
|
|
- getNotesBtn.layer?.backgroundColor = accentBlue.cgColor
|
|
|
|
|
- getNotesBtn.contentTintColor = .white
|
|
|
|
|
- } else {
|
|
|
|
|
- getNotesBtn.layer?.backgroundColor = (palette.isDarkMode ? NSColor.white.withAlphaComponent(0.08) : NSColor.black.withAlphaComponent(0.06)).cgColor
|
|
|
|
|
- getNotesBtn.contentTintColor = secondaryText
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ styleAiCompanionGetNotesButton(getNotesBtn, enabled: getNotesEnabled)
|
|
|
|
|
|
|
|
let statusInfo = localRecordingNotesStatusLabel(for: recording, notesStatus: notesStatus)
|
|
let statusInfo = localRecordingNotesStatusLabel(for: recording, notesStatus: notesStatus)
|
|
|
let statusLabel = makeLabel(statusInfo.text, size: 12, color: statusInfo.color, weight: .regular, centered: false)
|
|
let statusLabel = makeLabel(statusInfo.text, size: 12, color: statusInfo.color, weight: .regular, centered: false)
|
|
@@ -7648,8 +7673,8 @@ class ViewController: NSViewController {
|
|
|
|
|
|
|
|
getNotesBtn.topAnchor.constraint(equalTo: savedTimeLabel.bottomAnchor, constant: 14),
|
|
getNotesBtn.topAnchor.constraint(equalTo: savedTimeLabel.bottomAnchor, constant: 14),
|
|
|
getNotesBtn.leadingAnchor.constraint(equalTo: title.leadingAnchor),
|
|
getNotesBtn.leadingAnchor.constraint(equalTo: title.leadingAnchor),
|
|
|
- getNotesBtn.heightAnchor.constraint(equalToConstant: 34),
|
|
|
|
|
- getNotesBtn.widthAnchor.constraint(greaterThanOrEqualToConstant: 130),
|
|
|
|
|
|
|
+ getNotesBtn.heightAnchor.constraint(equalToConstant: 36),
|
|
|
|
|
+ getNotesBtn.widthAnchor.constraint(greaterThanOrEqualToConstant: 140),
|
|
|
|
|
|
|
|
statusLabel.topAnchor.constraint(equalTo: getNotesBtn.bottomAnchor, constant: 8),
|
|
statusLabel.topAnchor.constraint(equalTo: getNotesBtn.bottomAnchor, constant: 8),
|
|
|
statusLabel.leadingAnchor.constraint(equalTo: title.leadingAnchor),
|
|
statusLabel.leadingAnchor.constraint(equalTo: title.leadingAnchor),
|