Made visual improvements to the RecordingView view in the Recording package target.
This commit is contained in:
@@ -82,7 +82,6 @@ public struct RecordingView: View {
|
||||
} label: {
|
||||
Image(model.iconMain)
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
}
|
||||
.buttonStyle(.recording(
|
||||
invertStyle: true
|
||||
@@ -90,21 +89,7 @@ public struct RecordingView: View {
|
||||
.disabled(model.shouldDisableMain)
|
||||
.accessibilityLabel(labelMain)
|
||||
|
||||
if model.shouldShowDiscard {
|
||||
Button {
|
||||
model.pressedDiscard()
|
||||
} label: {
|
||||
Image(systemName: Constant.Symbol.discard)
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
}
|
||||
.buttonStyle(.recording(
|
||||
invertStyle: true
|
||||
))
|
||||
.accessibilityLabel(Constant.Text.labelDiscard)
|
||||
}
|
||||
|
||||
if model.shouldShowSend {
|
||||
if model.shouldShowActions {
|
||||
Button {
|
||||
model.pressedSend()
|
||||
} label: {
|
||||
@@ -120,10 +105,26 @@ public struct RecordingView: View {
|
||||
))
|
||||
.disabled(model.isProcessing)
|
||||
.accessibilityLabel(labelSend)
|
||||
|
||||
Button {
|
||||
model.pressedDiscard()
|
||||
} label: {
|
||||
Image(systemName: Constant.Symbol.discard)
|
||||
.resizable()
|
||||
}
|
||||
.buttonStyle(.recording(
|
||||
invertStyle: true
|
||||
))
|
||||
.disabled(model.shouldDisableMain)
|
||||
.accessibilityLabel(Constant.Text.labelDiscard)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.animation(
|
||||
.easeInOut,
|
||||
value: model.state
|
||||
)
|
||||
.onChange(
|
||||
of: model.transcription,
|
||||
initial: false
|
||||
@@ -216,7 +217,7 @@ private enum Constant {
|
||||
/// The spacing constants.
|
||||
enum Spacing {
|
||||
/// The spacing between the elements of a stack.
|
||||
static let stack: CGFloat = 8
|
||||
static let stack: CGFloat = 16
|
||||
}
|
||||
|
||||
/// The symbol constants.
|
||||
|
||||
Reference in New Issue
Block a user