This commit is contained in:
Felix
2025-12-06 19:23:15 +08:00
parent 156e6eca6f
commit 29064351aa
3 changed files with 20 additions and 27 deletions

View File

@@ -326,6 +326,7 @@ Page<IPageData, IPageInstance>({
// startAnim()
// }
},
// 切换评分区域展开状态
toggleScoreSection() {
this.setData({

View File

@@ -33,7 +33,7 @@
<view wx:for="{{highlightWords}}" wx:key="index"
class="overlay-word {{highlightShow ? 'show' : ''}} {{highlightZoom ? 'zoom' : ''}}"
style="left: {{item.left}}px; top: {{item.top}}px; width: {{item.width}}px; height: {{item.height}}px; {{item.transform ? ('transform: ' + item.transform) : ''}}">
<view class="overlay-text {{analizing ? 'loading-shimmer' : ''}}" style="animation-delay: {{index * 90}}ms;">{{item.text}}</view>
<view class="overlay-text {{analizing ? 'loading-shimmer' : ''}}" style="animation-delay: {{index * 200}}ms;">{{item.text}}</view>
</view>
</view>
<view wx:if="{{isRecording}}" class="recording-mask" catchtouchstart="noop" catchtouchmove="noop" catchtouchend="noop"></view>
@@ -47,10 +47,9 @@
<t-icon name="translate" class="trans-button left-half {{transDisplayMode === 'en_ipa' ? 'trans-active' : 'trans-deactive'}}" size="48rpx" />
<t-icon name="translate" class="trans-button right-half {{transDisplayMode === 'en_zh' ? 'trans-active' : 'trans-deactive'}}" size="48rpx" />
</view>
<view class="bottom-button mic-wrap" bindtap="onMicHighlight">
<view class="bottom-button mic-wrap" bind:longpress="handleRecordStart" bind:touchend="handleRecordEnd" bind:touchcancel="handleRecordEnd" >
<t-icon name="microphone-1" color="{{isRecording ? '#FFFFFF' : '#333333'}}"
class="microphone {{isRecording ? 'recording' : 'bottom-button'}} {{recordPermissionGranted ? '' : 'disabled'}}" size="48rpx"
bind:longpress="handleRecordStart" bind:touchend="handleRecordEnd" bind:touchcancel="handleRecordEnd" />
class="microphone {{isRecording ? 'recording' : 'bottom-button'}} {{recordPermissionGranted ? '' : 'disabled'}}" size="48rpx" />
<view wx:if="{{isRecording}}" class="mic">
<view class="mic-shadow"></view>
</view>

View File

@@ -555,11 +555,12 @@
bottom: calc(120rpx + env(safe-area-inset-bottom));
background: rgba(0,0,0,0.6);
z-index: 99;
pointer-events: none;
/* pointer-events: none; */
display: none;
opacity: 0;
transition: opacity 300ms ease;
}
.highlight-area.show { opacity: 1; }
.highlight-area.show { display: block; opacity: 1; }
.overlay-word {
position: fixed;
color: #ffffff;
@@ -1506,29 +1507,21 @@
.loading-shimmer {
/* transition: all 0.3s ease; */
/* animation: loading-shimmer 2.6s ease infinite; */
animation: loading-shimmer 3s ease infinite;
}
@keyframes loading-shimmer {
0% {
transform: translate3D(0, 0, 0) scale(1);
color: #868F97;
text-shadow: 0 0 0 rgba(134, 143, 151, 0);
}
13% {
transform: translate3D(1px, -1px, 0) scale(1.2);
color: white;
}
16% {
text-shadow: 0 0 2px #d8dbde;
}
26% {
transform: translate3D(0, 0, 0) scale(1);
color: #a1a8af;
opacity: 1;
}
100% {
transform: scale(1);
opacity: 0.8;
}
transform: translate(0, 0) scale(1);
color: #ffffff;
}
15% {
transform: translate(0, -2rpx) scale(1.2);
color: #eee;
}
30%, 100% {
transform: translate(0, 0) scale(1);
color: #fff;
opacity: 1;
}
}