|
|
@@ -581,14 +581,15 @@ export struct LocalMusic {
|
|
|
makeWorker() {
|
|
|
setTimeout(() => {
|
|
|
if (PreferencesUtil.getBooleanSync('isFirstApp', true)) {
|
|
|
- //发送worker通知扫描文件入库
|
|
|
- workerInstance.postMessage({
|
|
|
- code: 1,
|
|
|
- data1: this.context,
|
|
|
- data2: this.rootPath,
|
|
|
- data3: this.lockPath,
|
|
|
- data4: PreferencesUtil.getStringSync('COVER_API', ''),
|
|
|
- });
|
|
|
+ ToastUtil.showToast('请到文件扫描页面导入音乐!')
|
|
|
+ //发送worker通知扫描文件入库,用户反馈4000多首用这个方法扫描会闪退。
|
|
|
+ // workerInstance.postMessage({
|
|
|
+ // code: 1,
|
|
|
+ // data1: this.context,
|
|
|
+ // data2: this.rootPath,
|
|
|
+ // data3: this.lockPath,
|
|
|
+ // data4: PreferencesUtil.getStringSync('COVER_API', ''),
|
|
|
+ // });
|
|
|
PreferencesUtil.putSync('isFirstApp', false)
|
|
|
} else {
|
|
|
workerInstance.postMessage({ code: 2, data: this.context });
|
|
|
@@ -3004,6 +3005,8 @@ export struct LocalMusic {
|
|
|
.width('100%')
|
|
|
.height('100%')
|
|
|
.editMode(true)
|
|
|
+ .transition(TransitionEffect.move(TransitionEdge.BOTTOM)
|
|
|
+ .animation({ duration: 500, curve: Curve.Ease }))
|
|
|
.margin({ bottom: this.isCoverOpacity() ? 80 : 175 })
|
|
|
.layoutWeight(1)
|
|
|
.scrollBar(BarState.Off)
|
|
|
@@ -3434,6 +3437,8 @@ export struct LocalMusic {
|
|
|
.margin({ bottom: this.isCoverOpacity() ? 80 : 166 })
|
|
|
.cachedCount(6)
|
|
|
.borderRadius(20)
|
|
|
+ .transition(TransitionEffect.move(TransitionEdge.BOTTOM)
|
|
|
+ .animation({ duration: 500, curve: Curve.Ease }))
|
|
|
.layoutWeight(1)
|
|
|
.visibility(this.isGridMusic?Visibility.None:Visibility.Visible)
|
|
|
.lanes(
|
|
|
@@ -4698,6 +4703,8 @@ export struct LocalMusic {
|
|
|
}
|
|
|
.width('100%')
|
|
|
.height('100%')
|
|
|
+ .transition(TransitionEffect.move(TransitionEdge.BOTTOM)
|
|
|
+ .animation({ duration: 500, curve: Curve.Ease }))
|
|
|
.cachedCount(10)
|
|
|
|
|
|
.padding({
|
|
|
@@ -5081,7 +5088,7 @@ export struct LocalMusic {
|
|
|
@State lyricTextSize: number = 24
|
|
|
@State lyricContent: string = ''
|
|
|
@State isDebug: boolean = false
|
|
|
- @State isHightLightCenter: boolean = false
|
|
|
+ @State isHightLightCenter: boolean = true
|
|
|
/**
|
|
|
* 初始化歌词加载与展示逻辑
|
|
|
* @param lyricPath 歌词文件路径(支持普通.lrc和加密.lrcc)
|
|
|
@@ -5124,7 +5131,7 @@ export struct LocalMusic {
|
|
|
this.lyricController.setLineSpace(PreferencesUtil.getNumberSync('LyricLineSpace', 52))
|
|
|
this.changeLyricColor(PreferencesUtil.getStringSync('LyricColor', '#FFFFFF'),false)
|
|
|
this.changeLyricHightLightColor(PreferencesUtil.getStringSync('LyricHighLightColor', '#FFFFFF'),false)
|
|
|
- this.isHightLightCenter = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_SIMI, false)
|
|
|
+ this.isHightLightCenter = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_SIMI, true)
|
|
|
this.lyricController.setHightLightCenter(this.isHightLightCenter)
|
|
|
this.lyricTextWeight = PreferencesUtil.getNumberSync('lyricTextWeight',400)
|
|
|
this.lyricController.setTextWeight(this.lyricTextWeight)
|
|
|
@@ -5918,12 +5925,18 @@ export struct LocalMusic {
|
|
|
Text(this.name)
|
|
|
.fontSize(this.name.length >= 28 || this.isCoverOpacity() ? 18 : 22)
|
|
|
.fontWeight(FontWeight.Bold)
|
|
|
- .textOverflow({ overflow: TextOverflow.MARQUEE })//超长滚动
|
|
|
+ .textOverflow({ overflow: TextOverflow.Ellipsis })
|
|
|
.maxLines(1)
|
|
|
+ .width('80%')
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
.fontColor(Color.White)
|
|
|
Text(this.artist + ' ' + this.currentSong?.album)
|
|
|
.fontSize(this.isCoverOpacity() ? 12 : 15)
|
|
|
+ .textOverflow({ overflow: TextOverflow.Ellipsis })
|
|
|
.fontColor(Color.White)
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ .width('60%')
|
|
|
+ .maxLines(1)
|
|
|
}
|
|
|
.margin({ top: this.isCoverOpacity() ? 20 : 66 })
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
@@ -6199,7 +6212,7 @@ export struct LocalMusic {
|
|
|
.height(28)
|
|
|
.fontSize(12)
|
|
|
.fontColor('#FFFFFF')
|
|
|
- .backgroundColor(this.currentLyricAlignMode === index ? this.themeColor :Color.Transparent)
|
|
|
+ .backgroundColor((!isPip&&this.currentLyricAlignMode === index)||(isPip&&this.currentLyricAlignModePip === index) ? this.themeColor :Color.Transparent)
|
|
|
.border({
|
|
|
color: (!isPip&&this.currentLyricAlignMode === index) || (isPip&&this.currentLyricAlignModePip === index)?
|
|
|
'#007DFF' : '#DDDDDD',
|
|
|
@@ -7048,7 +7061,7 @@ export struct LocalMusic {
|
|
|
|
|
|
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Start }) {
|
|
|
|
|
|
- ForEach(this.moreItems, (more: MoreItem) => {
|
|
|
+ ForEach(this.moreItems, (more: MoreItem,index:number) => {
|
|
|
Button({ type: ButtonType.Capsule, stateEffect: true }) {
|
|
|
Row() {
|
|
|
if (more.id === 3) {
|
|
|
@@ -7312,6 +7325,7 @@ export struct LocalMusic {
|
|
|
.borderRadius(12)
|
|
|
.margin({ bottom: 6 })
|
|
|
}
|
|
|
+ .transition(TransitionEffect.move(TransitionEdge.BOTTOM).animation({ duration: 600, curve: Curve.Ease, delay: 60*index }))
|
|
|
.backgroundColor(Color.Transparent)
|
|
|
.onClick(() => {
|
|
|
this.doMore(more.id)
|