Add prompt picker to audio transcribe tab
This commit is contained in:
parent
febd75cc39
commit
e58d178c9d
@ -84,6 +84,31 @@ struct AudioTranscribeView: View {
|
||||
HStack(spacing: 8) {
|
||||
Text("Prompt:")
|
||||
.font(.subheadline)
|
||||
|
||||
if enhancementService.allPrompts.isEmpty {
|
||||
Text("No prompts available")
|
||||
.foregroundColor(.secondary)
|
||||
.italic()
|
||||
.font(.caption)
|
||||
} else {
|
||||
let promptBinding = Binding<UUID>(
|
||||
get: {
|
||||
selectedPromptId ?? enhancementService.allPrompts.first?.id ?? UUID()
|
||||
},
|
||||
set: { newValue in
|
||||
selectedPromptId = newValue
|
||||
enhancementService.selectedPromptId = newValue
|
||||
}
|
||||
)
|
||||
|
||||
Picker("", selection: promptBinding) {
|
||||
ForEach(enhancementService.allPrompts) { prompt in
|
||||
Text(prompt.title).tag(prompt.id)
|
||||
}
|
||||
}
|
||||
.labelsHidden()
|
||||
.fixedSize()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user