fix(feedback): restore voice records affordance
This commit is contained in:
@@ -364,7 +364,7 @@ Page({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const prefix = `${session.lessonCount}节 · ${formatVoiceDuration(session.totalDurationMs)}`
|
const prefix = `语音记录 · ${session.lessonCount}节 · ${formatVoiceDuration(session.totalDurationMs)}`
|
||||||
let suffix = '已就绪'
|
let suffix = '已就绪'
|
||||||
if (session.failedSegmentCount > 0) suffix = `${session.failedSegmentCount}段转录失败`
|
if (session.failedSegmentCount > 0) suffix = `${session.failedSegmentCount}段转录失败`
|
||||||
else if (session.processingSegmentCount > 0) suffix = '正在处理'
|
else if (session.processingSegmentCount > 0) suffix = '正在处理'
|
||||||
@@ -494,6 +494,10 @@ Page({
|
|||||||
copyApiRequestId(this.data.errorRequestId)
|
copyApiRequestId(this.data.errorRequestId)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
dismissError() {
|
||||||
|
this.setData({ errorMessage: '', errorRequestId: '' })
|
||||||
|
},
|
||||||
|
|
||||||
onProfileChange(event: PickerEvent) {
|
onProfileChange(event: PickerEvent) {
|
||||||
this.clearDraftSaveTimer()
|
this.clearDraftSaveTimer()
|
||||||
this.clearSummaryPollTimer()
|
this.clearSummaryPollTimer()
|
||||||
|
|||||||
@@ -6,8 +6,11 @@
|
|||||||
<text class="page-subtitle">填写课堂表现并保存到教学反馈记录。</text>
|
<text class="page-subtitle">填写课堂表现并保存到教学反馈记录。</text>
|
||||||
|
|
||||||
<view wx:if="{{errorMessage}}" class="status-banner feedback-error-banner">
|
<view wx:if="{{errorMessage}}" class="status-banner feedback-error-banner">
|
||||||
<view class="status-copy">
|
<view class="feedback-error-heading">
|
||||||
<text class="feedback-error-message">{{errorMessage}}</text>
|
<text class="feedback-error-message">{{errorMessage}}</text>
|
||||||
|
<button class="feedback-error-close" aria-label="关闭提示" bindtap="dismissError">
|
||||||
|
<view class="feedback-error-close-icon"></view>
|
||||||
|
</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="feedback-error-footer">
|
<view class="feedback-error-footer">
|
||||||
<view wx:if="{{errorRequestId}}" class="feedback-error-reference">
|
<view wx:if="{{errorRequestId}}" class="feedback-error-reference">
|
||||||
@@ -61,7 +64,7 @@
|
|||||||
<text class="voice-button-icon">{{recording ? '■' : '●'}}</text>
|
<text class="voice-button-icon">{{recording ? '■' : '●'}}</text>
|
||||||
<text>{{recording ? '结束录音' : '语音录入'}}</text>
|
<text>{{recording ? '结束录音' : '语音录入'}}</text>
|
||||||
</button>
|
</button>
|
||||||
<view class="voice-state {{voiceActionable ? 'voice-state-actionable' : ''}}" bindtap="toggleVoiceDetails">
|
<view class="voice-state {{voiceActionable ? 'voice-state-actionable' : ''}}" aria-role="button" aria-label="{{voiceDetailsExpanded ? '收起语音记录' : '展开语音记录'}}" bindtap="toggleVoiceDetails">
|
||||||
<text class="voice-status">{{voiceStatus}}</text>
|
<text class="voice-status">{{voiceStatus}}</text>
|
||||||
<text wx:if="{{recording}}" class="recording-time">{{recordingTime}}</text>
|
<text wx:if="{{recording}}" class="recording-time">{{recordingTime}}</text>
|
||||||
<view wx:elif="{{voiceActionable}}" class="voice-state-arrow {{voiceDetailsExpanded ? 'voice-state-arrow-expanded' : ''}}"></view>
|
<view wx:elif="{{voiceActionable}}" class="voice-state-arrow {{voiceDetailsExpanded ? 'voice-state-arrow-expanded' : ''}}"></view>
|
||||||
|
|||||||
@@ -13,16 +13,67 @@
|
|||||||
gap: 14rpx;
|
gap: 14rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.feedback-error-message {
|
.feedback-error-heading,
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.feedback-error-footer,
|
.feedback-error-footer,
|
||||||
.feedback-error-reference {
|
.feedback-error-reference {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.feedback-error-heading {
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 18rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feedback-error-message {
|
||||||
|
display: block;
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feedback-error-close {
|
||||||
|
display: flex;
|
||||||
|
flex: none;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 48rpx;
|
||||||
|
height: 48rpx;
|
||||||
|
margin: -8rpx -8rpx -8rpx 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feedback-error-close::after {
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feedback-error-close-icon {
|
||||||
|
position: relative;
|
||||||
|
width: 22rpx;
|
||||||
|
height: 22rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feedback-error-close-icon::before,
|
||||||
|
.feedback-error-close-icon::after {
|
||||||
|
position: absolute;
|
||||||
|
top: 10rpx;
|
||||||
|
left: 1rpx;
|
||||||
|
width: 20rpx;
|
||||||
|
height: 2rpx;
|
||||||
|
border-radius: 1rpx;
|
||||||
|
background: #8e5b5b;
|
||||||
|
content: '';
|
||||||
|
}
|
||||||
|
|
||||||
|
.feedback-error-close-icon::before {
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.feedback-error-close-icon::after {
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
}
|
||||||
|
|
||||||
.feedback-error-footer {
|
.feedback-error-footer {
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
gap: 18rpx;
|
gap: 18rpx;
|
||||||
|
|||||||
Reference in New Issue
Block a user