Fix result display: audio player, error message, correct field names
- Use file_accomplished (not frozen+!error) to gate audio player - Use errors field (was .error — wrong name, always falsy) - Render <audio controls> instead of bare download link - Add audiowidget.tmpl.stub for server-side customization
This commit is contained in:
@@ -110,14 +110,22 @@ export const PaneCP = {
|
||||
// Export error
|
||||
exportError.value ? h('div', { class: 'se-error' }, exportError.value) : null,
|
||||
|
||||
// Status poller
|
||||
// Status poller (while running)
|
||||
store.synthesisStatus && !store.synthesisStatus.frozen
|
||||
? h(StatusPoller, { store }) : null,
|
||||
|
||||
// Result link
|
||||
store.synthesisStatus?.frozen && !store.synthesisStatus?.error
|
||||
? h('a', { href: '/sompyle/result.mp3', style: 'display:block;margin-top:0.5rem' },
|
||||
'Download result') : null,
|
||||
// Synthesis error
|
||||
store.synthesisStatus?.frozen && store.synthesisStatus?.errors
|
||||
? h('div', { class: 'se-error', style: 'margin-top:0.5rem' },
|
||||
store.synthesisStatus.errors) : null,
|
||||
|
||||
// Audio result
|
||||
store.synthesisStatus?.file_accomplished
|
||||
? h('audio', {
|
||||
controls: true,
|
||||
src: '/sompyle/result.mp3',
|
||||
style: 'display:block;width:100%;margin-top:0.5rem',
|
||||
}) : null,
|
||||
]);
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user