feat: recording capsule (#38)

This commit is contained in:
Owen Gretzinger
2025-07-23 23:15:57 -04:00
committed by GitHub
parent 7f37b00e39
commit 7ddec9c193
9 changed files with 249 additions and 6 deletions
+27
View File
@@ -43,7 +43,19 @@ struct MeetingnotesApp: App {
CommandGroup(after: .appInfo) {
CheckForUpdatesView(updater: updaterController.updater)
}
// Hidden command group that handles audio level window notifications
CommandGroup(after: .windowArrangement) {
ShowAudioLevelsCommand()
}
}
// Floating Audio Level Window
Window("", id: "audio-levels") {
AudioLevelWindowView()
}
.windowStyle(.plain)
.windowResizability(.contentSize)
.defaultPosition(.trailing)
}
}
@@ -57,3 +69,18 @@ struct CheckForUpdatesView: View {
.keyboardShortcut("u", modifiers: .command)
}
}
struct ShowAudioLevelsCommand: View {
@Environment(\.openWindow) private var openWindow
var body: some View {
// Empty view - we only need this for the notification observer
EmptyView()
.onReceive(NotificationCenter.default.publisher(for: .openAudioLevelWindow)) { _ in
openWindow(id: "audio-levels")
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
AudioLevelWindowManager.shared.showWindow()
}
}
}
}