|
@@ -3731,9 +3731,10 @@ export struct LocalMusic {
|
|
|
.fillColor(this.themeColor)// .fontSize(33)
|
|
.fillColor(this.themeColor)// .fontSize(33)
|
|
|
.alt($r('app.media.music_group'))
|
|
.alt($r('app.media.music_group'))
|
|
|
.borderRadius('100%')
|
|
.borderRadius('100%')
|
|
|
- .interpolation(ImageInterpolation.High)// 用于重采样后的抗锯齿
|
|
|
|
|
- .autoResize(true) // 重采样,可减少内存占用
|
|
|
|
|
|
|
+ // .interpolation(ImageInterpolation.High)// 用于重采样后的抗锯齿
|
|
|
|
|
+ // .autoResize(true) // 重采样,可减少内存占用
|
|
|
.clip(true)
|
|
.clip(true)
|
|
|
|
|
+ .sourceSize({width:38, height:38})
|
|
|
.margin({ left: 20, top: 8, bottom: 8 })
|
|
.margin({ left: 20, top: 8, bottom: 8 })
|
|
|
Column() {
|
|
Column() {
|
|
|
Text(item.name.startsWith('.') ? item.name.replace(/\./g, '') : item.name)
|
|
Text(item.name.startsWith('.') ? item.name.replace(/\./g, '') : item.name)
|
|
@@ -3826,9 +3827,9 @@ export struct LocalMusic {
|
|
|
.borderRadius(this.isCoverRectangle?13:'100%')
|
|
.borderRadius(this.isCoverRectangle?13:'100%')
|
|
|
.clip(true)
|
|
.clip(true)
|
|
|
.draggable(false)
|
|
.draggable(false)
|
|
|
- .sourceSize({width:50, height:50})
|
|
|
|
|
- .interpolation(ImageInterpolation.High)// 用于重采样后的抗锯齿
|
|
|
|
|
- .autoResize(true) // 重采样,可减少内存占用
|
|
|
|
|
|
|
+ .sourceSize({width:38, height:38})
|
|
|
|
|
+ // .interpolation(ImageInterpolation.High)// 用于重采样后的抗锯齿
|
|
|
|
|
+ // .autoResize(true) // 重采样,可减少内存占用
|
|
|
.opacity(this.opacityItem)// 绑定透明度
|
|
.opacity(this.opacityItem)// 绑定透明度
|
|
|
.margin({ left: 20 })
|
|
.margin({ left: 20 })
|
|
|
.gesture(LongPressGesture()
|
|
.gesture(LongPressGesture()
|
|
@@ -5420,9 +5421,9 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
// .transition(TransitionEffect.scale({ x: 1.2, y: 1.2 }).animation({ duration: 500 }))
|
|
// .transition(TransitionEffect.scale({ x: 1.2, y: 1.2 }).animation({ duration: 500 }))
|
|
|
- // .transition(TransitionEffect.asymmetric(TransitionEffect.scale({ x: 1.2, y: 1.2 })
|
|
|
|
|
- // .animation({ duration: 500 }),
|
|
|
|
|
- // TransitionEffect.scale({ x: 0, y: 0 })))
|
|
|
|
|
|
|
+ .transition(TransitionEffect.asymmetric(TransitionEffect.scale({ x: 0.9, y: 0.9 })
|
|
|
|
|
+ .animation({ duration: 500 }),
|
|
|
|
|
+ TransitionEffect.scale({ x: 0, y: 0 })))
|
|
|
.clickEffect({ level: ClickEffectLevel.LIGHT })
|
|
.clickEffect({ level: ClickEffectLevel.LIGHT })
|
|
|
.swipeAction((
|
|
.swipeAction((
|
|
|
(this.isSwipe&&this.modeType == 0 || this.modeType == 1 || ((this.modeType == 3 || this.modeType == 2) && this.isCanBack))
|
|
(this.isSwipe&&this.modeType == 0 || this.modeType == 1 || ((this.modeType == 3 || this.modeType == 2) && this.isCanBack))
|
|
@@ -9216,7 +9217,7 @@ export struct LocalMusic {
|
|
|
.width(24)
|
|
.width(24)
|
|
|
.clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
.clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
.bindSheet($$this.isShowMoreView, this.PlayMoreSheet(), {
|
|
.bindSheet($$this.isShowMoreView, this.PlayMoreSheet(), {
|
|
|
- height: '95%',
|
|
|
|
|
|
|
+ height: '99%',
|
|
|
preferType: this.currentBreakpoint!==BreakpointTypeEnum.SM?SheetType.CENTER:SheetType.BOTTOM,
|
|
preferType: this.currentBreakpoint!==BreakpointTypeEnum.SM?SheetType.CENTER:SheetType.BOTTOM,
|
|
|
dragBar: true,
|
|
dragBar: true,
|
|
|
showClose: true,
|
|
showClose: true,
|
|
@@ -9277,33 +9278,11 @@ export struct LocalMusic {
|
|
|
await this.playNext();
|
|
await this.playNext();
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- if(this.isPhoneLan()){
|
|
|
|
|
- this.fullButton()
|
|
|
|
|
- }else{
|
|
|
|
|
- Button({type:ButtonType.Circle,stateEffect:true}){
|
|
|
|
|
- //添加或取消收藏
|
|
|
|
|
- SymbolGlyph(Utility.getIsFav(this.favList,this.currentSong)?
|
|
|
|
|
- $r('sys.symbol.heart_fill'):$r('sys.symbol.heart'))
|
|
|
|
|
- .fontSize(23)
|
|
|
|
|
- .fontColor([Color.White])
|
|
|
|
|
- .alignSelf(ItemAlign.Center)
|
|
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
|
|
- .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
|
|
- .onClick(async () => {
|
|
|
|
|
- if(this.currentSong){
|
|
|
|
|
- this.doFav(this.currentSong)
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- .backgroundColor(Color.Transparent)
|
|
|
|
|
- .height(45)
|
|
|
|
|
- .width(45)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.fullButton()
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
.width('95%')
|
|
.width('95%')
|
|
|
- .margin({ bottom:this.isCoverOpacity()?0:20 })
|
|
|
|
|
|
|
+ .margin({ bottom:this.isCoverOpacity()?0:15 })
|
|
|
.justifyContent(FlexAlign.SpaceEvenly)
|
|
.justifyContent(FlexAlign.SpaceEvenly)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -9398,7 +9377,7 @@ export struct LocalMusic {
|
|
|
//x5的竖屏模式需要99%
|
|
//x5的竖屏模式需要99%
|
|
|
.width(this.isLandscape?'80%':'93%')
|
|
.width(this.isLandscape?'80%':'93%')
|
|
|
.justifyContent(FlexAlign.Center)
|
|
.justifyContent(FlexAlign.Center)
|
|
|
- .margin({bottom:6})
|
|
|
|
|
|
|
+ .margin({bottom:3})
|
|
|
.animation({
|
|
.animation({
|
|
|
duration: 666,
|
|
duration: 666,
|
|
|
curve: 'ease-in-out' // 可选动画曲线
|
|
curve: 'ease-in-out' // 可选动画曲线
|
|
@@ -9443,8 +9422,33 @@ export struct LocalMusic {
|
|
|
this.setLoopMode()
|
|
this.setLoopMode()
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ if(this.currentSong){
|
|
|
|
|
+ Button({type:ButtonType.Circle,stateEffect:true}){
|
|
|
|
|
+ Column() {
|
|
|
|
|
+ Image($r('app.media.rename2'))
|
|
|
|
|
+ .width(21)
|
|
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
|
|
+ .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .bindSheet($$this.isShowEdit, this.editSheet(this.currentSong), {
|
|
|
|
|
+ height: '99%',
|
|
|
|
|
+ dragBar: true,
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ preferType: SheetType.BOTTOM,
|
|
|
|
|
+ title: { title: '编辑标签' }
|
|
|
|
|
+ })
|
|
|
|
|
+ .height(45)
|
|
|
|
|
+ .width(45)
|
|
|
|
|
+ .layoutWeight(1)
|
|
|
|
|
+ .backgroundColor(Color.Transparent)
|
|
|
|
|
+ .onClick(async () => {
|
|
|
|
|
+ this.setEditStrEmpty()
|
|
|
|
|
+ this.tempLyricContent = this.lyricContent
|
|
|
|
|
+ this.isShowEdit = !this.isShowEdit;
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- this.fullButton()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Button({type:ButtonType.Circle,stateEffect:true}){
|
|
Button({type:ButtonType.Circle,stateEffect:true}){
|
|
@@ -9503,7 +9507,6 @@ export struct LocalMusic {
|
|
|
.width(this.isLandscape?'88%':'95%')
|
|
.width(this.isLandscape?'88%':'95%')
|
|
|
.justifyContent(FlexAlign.SpaceAround)
|
|
.justifyContent(FlexAlign.SpaceAround)
|
|
|
.height(30)
|
|
.height(30)
|
|
|
- .margin({top:3})
|
|
|
|
|
.animation({
|
|
.animation({
|
|
|
duration: 666,
|
|
duration: 666,
|
|
|
curve: 'ease-in-out' // 可选动画曲线
|
|
curve: 'ease-in-out' // 可选动画曲线
|
|
@@ -9892,30 +9895,65 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
@Builder
|
|
@Builder
|
|
|
private musicNameInfo(isHidden: boolean) {
|
|
private musicNameInfo(isHidden: boolean) {
|
|
|
- Column({ space: 8 }) {
|
|
|
|
|
- Text(this.isShowFileName&&this.currentSong?this.currentSong.fileName :this.name)
|
|
|
|
|
- .fontSize(this.name.length >= 28 || this.isCoverOpacity() ? 18 : 22)
|
|
|
|
|
- .fontWeight(FontWeight.Bold)
|
|
|
|
|
- .textOverflow({ overflow: TextOverflow.MARQUEE })//超长滚动
|
|
|
|
|
- .maxLines(1)
|
|
|
|
|
- .width('99%')
|
|
|
|
|
- .textAlign(TextAlign.Center)
|
|
|
|
|
- .fontColor(Color.White)
|
|
|
|
|
- Text(this.artist + ' ' + this.currentSong?.album||'')
|
|
|
|
|
- .fontSize(this.isCoverOpacity() ? 12 : 15)
|
|
|
|
|
- .textOverflow({ overflow: TextOverflow.MARQUEE })//超长滚动
|
|
|
|
|
- .fontColor(Color.White)
|
|
|
|
|
- .textAlign(TextAlign.Center)
|
|
|
|
|
- .visibility(StrUtil.isEmpty(this.artist)||this.isShowFileName?Visibility.None:Visibility.Visible)
|
|
|
|
|
- .width('99%')
|
|
|
|
|
- .maxLines(1)
|
|
|
|
|
|
|
+ Row(){
|
|
|
|
|
+
|
|
|
|
|
+ Column({ space: 8 }) {
|
|
|
|
|
+ Text(this.name)
|
|
|
|
|
+ .fontSize(this.name.length >= 28 || this.isCoverOpacity() ? 18 : 20)
|
|
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
|
|
+ .textOverflow({ overflow: TextOverflow.MARQUEE })//超长滚动
|
|
|
|
|
+ .maxLines(1)
|
|
|
|
|
+ .width('99%')
|
|
|
|
|
+ .textAlign(TextAlign.Start)
|
|
|
|
|
+ .fontColor(Color.White)
|
|
|
|
|
+ Text(this.artist + ' ' + this.currentSong?.album)
|
|
|
|
|
+ .fontSize(this.isCoverOpacity() ? 12 : 15)
|
|
|
|
|
+ .textOverflow({ overflow: TextOverflow.MARQUEE })//超长滚动
|
|
|
|
|
+ .fontColor(Color.White)
|
|
|
|
|
+ .textAlign(TextAlign.Start)
|
|
|
|
|
+ .visibility(StrUtil.isEmpty(this.artist)?Visibility.None:Visibility.Visible)
|
|
|
|
|
+ .width('99%')
|
|
|
|
|
+ .maxLines(1)
|
|
|
|
|
+ }
|
|
|
|
|
+ .zIndex(1)
|
|
|
|
|
+ .layoutWeight(1)
|
|
|
|
|
+ .margin({ left: 15 })
|
|
|
|
|
+ .scale({ x: this.scaleValueImage, y: this.scaleValueImage }) // 添加缩放效果
|
|
|
|
|
+ Blank()
|
|
|
|
|
+ Row(){
|
|
|
|
|
+
|
|
|
|
|
+ Button({type:ButtonType.Circle,stateEffect:true}){
|
|
|
|
|
+ //添加或取消收藏
|
|
|
|
|
+ SymbolGlyph(Utility.getIsFav(this.favList,this.currentSong)?
|
|
|
|
|
+ $r('sys.symbol.heart_fill'):$r('sys.symbol.heart'))
|
|
|
|
|
+ .fontSize(22)
|
|
|
|
|
+ .fontColor([Color.White])
|
|
|
|
|
+ .alignSelf(ItemAlign.Center)
|
|
|
|
|
+ // .width(24)
|
|
|
|
|
+ .clickEffect({level:ClickEffectLevel.MIDDLE})
|
|
|
|
|
+ .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
|
|
+ .onClick(async () => {
|
|
|
|
|
+ if(this.currentSong){
|
|
|
|
|
+ this.doFav(this.currentSong)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ .margin({ left: 15,right:3 })
|
|
|
|
|
+ .backgroundColor(Color.Transparent)
|
|
|
|
|
+ .width(45)
|
|
|
|
|
+ .height(45)
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
- .margin({ top: this.isCoverOpacity() ? 20 : isHidden ? 40 : 20 })
|
|
|
|
|
- .zIndex(1)
|
|
|
|
|
- .scale({ x: this.scaleValueImage, y: this.scaleValueImage }) // 添加缩放效果
|
|
|
|
|
|
|
+ .width('90%')
|
|
|
|
|
+ .margin({ top: this.isCoverOpacity() ? 10 : isHidden ? 20 : 10 })
|
|
|
.visibility(this.isCoverOpacity() || isHidden ? Visibility.None : Visibility.Visible)
|
|
.visibility(this.isCoverOpacity() || isHidden ? Visibility.None : Visibility.Visible)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
@Builder
|
|
@Builder
|
|
|
private PlayTitle() {
|
|
private PlayTitle() {
|
|
|
|
|
|
|
@@ -11032,15 +11070,7 @@ export struct LocalMusic {
|
|
|
Text(more.title)
|
|
Text(more.title)
|
|
|
.fontSize(16)
|
|
.fontSize(16)
|
|
|
.fontColor(Color.White)
|
|
.fontColor(Color.White)
|
|
|
- .bindSheet($$this.isShowEdit, this.editSheet(this.currentSong), {
|
|
|
|
|
- height: '99%',
|
|
|
|
|
- dragBar: true,
|
|
|
|
|
- showClose: true,
|
|
|
|
|
- preferType: this.currentBreakpoint !== BreakpointTypeEnum.SM ? SheetType.CENTER : SheetType.BOTTOM,
|
|
|
|
|
- // blurStyle:BlurStyle.Thin,
|
|
|
|
|
- // backgroundColor:Color.Transparent,
|
|
|
|
|
- title: { title: '编辑标签' }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+
|
|
|
} else if (more.id === 5) { //定时关闭
|
|
} else if (more.id === 5) { //定时关闭
|
|
|
Image(more.image)
|
|
Image(more.image)
|
|
|
.width(24)
|
|
.width(24)
|