Refined the recording Live Activity presentation in the Widget target.

This commit is contained in:
2026-07-07 00:11:39 +02:00
parent 9e431c8e7a
commit dfd4829980
13 changed files with 281 additions and 163 deletions
@@ -0,0 +1,27 @@
import Commanding
import SwiftUI
extension RecordingActivityState {
// MARK: Computed
/// The system symbol marking the state in the Live Activity: a microphone while recording, a pause symbol while paused, and
/// a send symbol while the recorded input is being processed.
var symbol: Image {
switch self {
case .recording: Image.Symbol.microphone
case .paused: Image.Symbol.pause
case .processing: Image.Symbol.send
}
}
/// The tint coloring the state's ``symbol``: yellow while recording or paused, and green while the recorded input is being
/// processed.
var tint: Color {
switch self {
case .recording, .paused: .yellow
case .processing: .green
}
}
}