fix(voice): recover empty failed lessons

This commit is contained in:
zhangheng
2026-07-22 21:19:22 +08:00
parent 55084a4784
commit 80e670d72b
8 changed files with 226 additions and 13 deletions

View File

@@ -101,7 +101,7 @@
<text class="voice-record-duration">{{lesson.durationText}} · {{lesson.transcriptLength}}字</text>
</view>
</view>
<text class="voice-record-status {{lesson.failedSegmentCount > 0 ? 'voice-record-status-failed' : ''}}">{{lesson.statusText}}</text>
<text class="voice-record-status {{lesson.failureRecoveryAction ? 'voice-record-status-failed' : ''}}">{{lesson.statusText}}</text>
</view>
<text
wx:if="{{lesson.transcript}}"
@@ -123,19 +123,19 @@
bindtap="addVoiceLessonToDraft"
>{{lesson.addActionText}}</button>
</view>
<view wx:if="{{lesson.failedSegmentCount > 0}}" class="voice-record-failure-actions">
<view wx:if="{{lesson.failureRecoveryAction}}" class="voice-record-failure-actions">
<button
class="voice-record-retry-button"
data-lesson-id="{{lesson.id}}"
disabled="{{recording || voiceBusy}}"
catchtap="retryVoiceLesson"
>重试转录</button>
catchtap="recoverVoiceLesson"
>{{lesson.failureRecoveryText}}</button>
<button
class="voice-record-delete-button"
data-lesson-id="{{lesson.id}}"
disabled="{{recording || voiceBusy}}"
catchtap="discardVoiceLesson"
>删除录音</button>
>{{lesson.failureDeleteText}}</button>
</view>
</view>
</checkbox-group>