|
@@ -173,7 +173,9 @@ export struct LocalMusic {
|
|
|
@State isScrollHide: boolean = false //是否滚动隐藏
|
|
@State isScrollHide: boolean = false //是否滚动隐藏
|
|
|
@State isSameTimePlay: boolean = false //是否和其他app同时播放
|
|
@State isSameTimePlay: boolean = false //是否和其他app同时播放
|
|
|
@State isStartAutoPlay: boolean = false //启动后自动播放
|
|
@State isStartAutoPlay: boolean = false //启动后自动播放
|
|
|
|
|
+ @State isShowPlayPageBack: boolean = false //是否显示播放页返回键
|
|
|
@State isMemoryLastPlay: boolean = false //是否启用应用退出记忆最后一首的播放进度
|
|
@State isMemoryLastPlay: boolean = false //是否启用应用退出记忆最后一首的播放进度
|
|
|
|
|
+ @State isCoverTopBig: boolean = false//顶部大封面部分手机显示会和播放控制页重叠
|
|
|
@State customizeBgPath: string | undefined = '';
|
|
@State customizeBgPath: string | undefined = '';
|
|
|
@State isDarkMode: boolean = false
|
|
@State isDarkMode: boolean = false
|
|
|
@State lyricTextWeight: number = 400
|
|
@State lyricTextWeight: number = 400
|
|
@@ -569,6 +571,8 @@ export struct LocalMusic {
|
|
|
this.twoFingerType = PreferencesUtil.getNumberSync(SettingPage.TWO_FINGER_TYPE, 3)
|
|
this.twoFingerType = PreferencesUtil.getNumberSync(SettingPage.TWO_FINGER_TYPE, 3)
|
|
|
this.isCoverTop = PreferencesUtil.getBooleanSync(SettingPage.IS_COVER_TOP, false)
|
|
this.isCoverTop = PreferencesUtil.getBooleanSync(SettingPage.IS_COVER_TOP, false)
|
|
|
this.isCircleBtn = PreferencesUtil.getBooleanSync(SettingPage.IS_CIRCLE_BTN, false)
|
|
this.isCircleBtn = PreferencesUtil.getBooleanSync(SettingPage.IS_CIRCLE_BTN, false)
|
|
|
|
|
+ this.isShowPlayPageBack = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_PLAYPAGE_BACK, false)
|
|
|
|
|
+ this.isCoverTopBig = PreferencesUtil.getBooleanSync(SettingPage.IS_COVER_TOP_BIG, false)
|
|
|
if (this.isSavePlayMode) {
|
|
if (this.isSavePlayMode) {
|
|
|
this.playType = PreferencesUtil.getNumberSync('musicPlayType', 0)
|
|
this.playType = PreferencesUtil.getNumberSync('musicPlayType', 0)
|
|
|
}
|
|
}
|
|
@@ -3097,7 +3101,7 @@ export struct LocalMusic {
|
|
|
// [EndExclude GridItem_start]
|
|
// [EndExclude GridItem_start]
|
|
|
}, (item: VideoItem) => item.filePath)
|
|
}, (item: VideoItem) => item.filePath)
|
|
|
}
|
|
}
|
|
|
- .width('100%')
|
|
|
|
|
|
|
+ .width('94%')
|
|
|
.height('100%')
|
|
.height('100%')
|
|
|
.editMode(true)
|
|
.editMode(true)
|
|
|
.transition(TransitionEffect.move(TransitionEdge.BOTTOM)
|
|
.transition(TransitionEffect.move(TransitionEdge.BOTTOM)
|
|
@@ -3108,7 +3112,7 @@ export struct LocalMusic {
|
|
|
.supportAnimation(true)
|
|
.supportAnimation(true)
|
|
|
.cachedCount(3)
|
|
.cachedCount(3)
|
|
|
// .columnsTemplate('1fr '.repeat(this.currentWidthBreakpoint === WidthBreakpoint.WIDTH_SM ? 2 : 5))
|
|
// .columnsTemplate('1fr '.repeat(this.currentWidthBreakpoint === WidthBreakpoint.WIDTH_SM ? 2 : 5))
|
|
|
- .columnsTemplate(this.twoFingerType==3?'repeat(auto-fit, 150)':this.twoFingerType==2?'repeat(auto-fit, 110)':'repeat(auto-fit, 80)')
|
|
|
|
|
|
|
+ .columnsTemplate(this.twoFingerType==3?'repeat(auto-fit, 160)':this.twoFingerType==2?'repeat(auto-fit, 110)':'repeat(auto-fit, 80)')
|
|
|
.rowsGap(this.twoFingerType==3?10:this.twoFingerType==2?5:1)
|
|
.rowsGap(this.twoFingerType==3?10:this.twoFingerType==2?5:1)
|
|
|
.visibility(this.isGridMusic?Visibility.Visible:Visibility.None)
|
|
.visibility(this.isGridMusic?Visibility.Visible:Visibility.None)
|
|
|
.scale({x:this.scaleValue,y:this.scaleValue,z:1})
|
|
.scale({x:this.scaleValue,y:this.scaleValue,z:1})
|
|
@@ -5229,7 +5233,7 @@ export struct LocalMusic {
|
|
|
.margin({ top: 0 })
|
|
.margin({ top: 0 })
|
|
|
.height(PlayConstants.HEIGHT)
|
|
.height(PlayConstants.HEIGHT)
|
|
|
.visibility(DeviceUtil.getDeviceType()==resourceManager.DeviceType.DEVICE_TYPE_2IN1?
|
|
.visibility(DeviceUtil.getDeviceType()==resourceManager.DeviceType.DEVICE_TYPE_2IN1?
|
|
|
- Visibility.Visible:Visibility.None)
|
|
|
|
|
|
|
+ Visibility.Visible:this.isShowPlayPageBack?Visibility.Visible:Visibility.None)
|
|
|
|
|
|
|
|
// .visibility(this.currentBreakpoint !== BreakpointTypeEnum.SM
|
|
// .visibility(this.currentBreakpoint !== BreakpointTypeEnum.SM
|
|
|
// ?Visibility.Visible:Visibility.Visible)
|
|
// ?Visibility.Visible:Visibility.Visible)
|
|
@@ -6231,6 +6235,21 @@ export struct LocalMusic {
|
|
|
curve: 'ease-in-out' // 可选动画曲线
|
|
curve: 'ease-in-out' // 可选动画曲线
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ isBigScreen(){
|
|
|
|
|
+ if(this.currentWidthBreakpoint == WidthBreakpoint.WIDTH_LG){
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+ if (DeviceUtil.getDeviceType() === resourceManager.DeviceType.DEVICE_TYPE_PHONE
|
|
|
|
|
+ && this.currentWidthBreakpoint === WidthBreakpoint.WIDTH_SM
|
|
|
|
|
+ &&this.currentHeightBreakpoint == HeightBreakpoint.HEIGHT_LG) {
|
|
|
|
|
+ return false
|
|
|
|
|
+ }else{
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@State isAutoHide: boolean = true//手机横屏自动隐藏播放进退条,点击屏幕可以显示,倒计时4秒后又自动隐藏
|
|
@State isAutoHide: boolean = true//手机横屏自动隐藏播放进退条,点击屏幕可以显示,倒计时4秒后又自动隐藏
|
|
|
@State isCoverRectangle: boolean = false
|
|
@State isCoverRectangle: boolean = false
|
|
|
@State isCoverTop: boolean = true
|
|
@State isCoverTop: boolean = true
|
|
@@ -6278,10 +6297,10 @@ export struct LocalMusic {
|
|
|
if(this.isCoverTop&&!this.isCoverOpacity()&&this.isCoverRectangle){
|
|
if(this.isCoverTop&&!this.isCoverOpacity()&&this.isCoverRectangle){
|
|
|
Image(StrUtil.isEmpty(this.cover) ? this.imageLabel : this.cover)
|
|
Image(StrUtil.isEmpty(this.cover) ? this.imageLabel : this.cover)
|
|
|
// .height(this.isCoverOpacity() ? 250 : this.isCoverRectangle ? 320 : 162)
|
|
// .height(this.isCoverOpacity() ? 250 : this.isCoverRectangle ? 320 : 162)
|
|
|
- .width('100%')
|
|
|
|
|
|
|
+ .width(this.isBigScreen()?'72%':this.isCoverTopBig?'100%':'86%')
|
|
|
.objectFit(this.isCoverRectangle ? ImageFit.Contain : ImageFit.Auto)
|
|
.objectFit(this.isCoverRectangle ? ImageFit.Contain : ImageFit.Auto)
|
|
|
.alt(this.imageLabel)
|
|
.alt(this.imageLabel)
|
|
|
- .margin({ right: 8, left: 8 })
|
|
|
|
|
|
|
+ .margin({ right: 8, left: 8,top:8 })
|
|
|
.aspectRatio(1)
|
|
.aspectRatio(1)
|
|
|
.visibility(this.isPuraWP()?Visibility.None:Visibility.Visible)
|
|
.visibility(this.isPuraWP()?Visibility.None:Visibility.Visible)
|
|
|
.borderRadius(this.isCoverRectangle ? 20 : '100%')
|
|
.borderRadius(this.isCoverRectangle ? 20 : '100%')
|