|
|
@@ -165,6 +165,10 @@ export struct LocalMusic {
|
|
|
@Consume @Watch('onModeChange') modeType: number; // 0首页,1媒体库,2艺术家,3专辑
|
|
|
@State showSingleLyric: boolean = false
|
|
|
@State sortType: number = 4 //默认排序方式
|
|
|
+ @State isShowSimi:boolean = false //是否显示私密音频
|
|
|
+ @State isShowFAV:boolean = true //是否显示我的收藏
|
|
|
+ @State isShowHistory:boolean = true //是否显示最近播放
|
|
|
+
|
|
|
@State isDarkMode: boolean = false
|
|
|
@StorageProp('currentColorMode') @Watch('onColorModeChange') currentMode: number =
|
|
|
ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT;
|
|
|
@@ -313,7 +317,7 @@ export struct LocalMusic {
|
|
|
.setLeftIconHeight(25)
|
|
|
.setTitleName('首页')
|
|
|
.setTitleFontSize(19)
|
|
|
- .setTitleFontColor($r('app.color.text_color'))// 根据深色模式状态动态设置标题栏背景色
|
|
|
+ .setTitleFontColor(Color.White)
|
|
|
.setTitleBarBackground($r('app.color.title_bar_bg'))
|
|
|
.setTitleBarBottomLineColor($r('app.color.title_bar_bg'))
|
|
|
.setRightTitleBackground($r('app.color.title_bar_bg'))
|
|
|
@@ -358,6 +362,7 @@ export struct LocalMusic {
|
|
|
// 组件生命周期
|
|
|
aboutToAppear() {
|
|
|
this.sortType = PreferencesUtil.getNumberSync(SettingPage.SORT_TYPE, 4)
|
|
|
+
|
|
|
Utility.getAppName(getContext(this)).then((appName: string) => {
|
|
|
this.appName = appName
|
|
|
})
|
|
|
@@ -1912,7 +1917,7 @@ export struct LocalMusic {
|
|
|
}
|
|
|
.width('100%')
|
|
|
.height('100%')
|
|
|
- .backgroundColor($r('app.color.index_background'))
|
|
|
+ .backgroundColor($r('app.color.bottom_control_background'))
|
|
|
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
|
|
|
|
|
|
}
|
|
|
@@ -2224,12 +2229,31 @@ export struct LocalMusic {
|
|
|
}
|
|
|
.height(58)
|
|
|
.width('100%')
|
|
|
+ .visibility(this.isShowDir(item.name)?Visibility.Visible:Visibility.None)
|
|
|
.opacity(this.opacityItem) // 绑定透明度
|
|
|
.stateStyles({
|
|
|
pressed: { opacity: 0.6 } // 按压反馈
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ isShowDir(dirName:string){
|
|
|
+ this.isShowSimi = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_SIMI, false)
|
|
|
+ this.isShowFAV = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_FAV, true)
|
|
|
+ this.isShowHistory = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_HISTORY, true)
|
|
|
+ if(dirName ===undefined)
|
|
|
+ return true
|
|
|
+ if(dirName === LocalMusic.STR_LOCK_VIDEO){
|
|
|
+ return this.isShowSimi
|
|
|
+ }
|
|
|
+ if(dirName === LocalMusic.STR_FAC_VIDEO){
|
|
|
+ return this.isShowFAV
|
|
|
+ }
|
|
|
+ if(dirName === LocalMusic.STR_HISTORY_MUSIC){
|
|
|
+ return this.isShowHistory
|
|
|
+ }
|
|
|
+ return true
|
|
|
+ }
|
|
|
+
|
|
|
@State opacityItem: number = 1; // 控制透明度的状态变量
|
|
|
|
|
|
@Builder
|
|
|
@@ -2515,7 +2539,7 @@ export struct LocalMusic {
|
|
|
duration: 666,
|
|
|
curve: 'ease-in-out' // 可选动画曲线
|
|
|
})
|
|
|
- .backgroundColor(this.isClickedPLayAll ? $r('app.color.silvery') : $r('app.color.index_background'))
|
|
|
+ .backgroundColor(this.isClickedPLayAll ? $r('app.color.button_click') : Color.Transparent)
|
|
|
.onTouch((event: TouchEvent) => {
|
|
|
if (event.type === TouchType.Down) {
|
|
|
this.isClickedPLayAll = true;
|
|
|
@@ -2862,8 +2886,7 @@ export struct LocalMusic {
|
|
|
|
|
|
}, (item: VideoItem) => item.filePath)
|
|
|
}
|
|
|
- .backgroundColor($r('app.color.index_background'))
|
|
|
- .divider({ strokeWidth: 1, color: this.isDarkMode? '333333':'#ffe9f0f0' })
|
|
|
+ // .divider({ strokeWidth: 1, color: this.isDarkMode? '#333333':'#ffe9f0f0' })
|
|
|
.margin({ bottom: this.isPuraWP() ? 50 : 108 })
|
|
|
.cachedCount(30)
|
|
|
.borderRadius(20)
|
|
|
@@ -3155,7 +3178,7 @@ export struct LocalMusic {
|
|
|
.height(this.bottomBarHeight)
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
.hitTestBehavior(HitTestMode.Transparent)
|
|
|
- .backgroundColor($r('app.color.index_background'))
|
|
|
+ .backgroundColor($r('app.color.bottom_control_background'))
|
|
|
.bindContentCover($$this.isShowPlay, this.MusicPlayBuilder(), {
|
|
|
// modalTransition: ModalTransition.DEFAULT,
|
|
|
transition: AnimationHelper.transitionInDown(666),
|
|
|
@@ -3695,7 +3718,7 @@ export struct LocalMusic {
|
|
|
`剩余时间:${this.formatTime(this.remainingSeconds)}` :
|
|
|
"定时关闭未开启")
|
|
|
.fontSize(17)
|
|
|
- .fontColor($r('app.color.title_bar_bg'))
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
.margin({ top: 2 });
|
|
|
|
|
|
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Start }) {
|
|
|
@@ -3720,7 +3743,7 @@ export struct LocalMusic {
|
|
|
}
|
|
|
.width('100%')
|
|
|
.padding(10)
|
|
|
- .backgroundColor(minutes === this.selectedMinutes ? 0xf0f8ff : 0xffffff) // 选中背景高亮
|
|
|
+ .backgroundColor(minutes === this.selectedMinutes ?$r('app.color.timeColor_bg') :$r('app.color.bottom_control_background')) // 选中背景高亮
|
|
|
.borderRadius(12)
|
|
|
.margin({ bottom: 6 })
|
|
|
.onClick(() => this.handleSelect(minutes)); // 确保点击触发选择
|
|
|
@@ -4904,7 +4927,7 @@ export struct LocalMusic {
|
|
|
Image($r('app.media.menu'))
|
|
|
.width(24)
|
|
|
.bindSheet($$this.isShowMoreView, this.PlayMoreSheet(), {
|
|
|
- height: this.isCoverOpacity() ? '95%' : '85%',
|
|
|
+ height: this.isCoverOpacity() ? '95%' : '95%',
|
|
|
dragBar: true,
|
|
|
showClose: true,
|
|
|
blurStyle: BlurStyle.Thin,
|
|
|
@@ -5285,7 +5308,7 @@ export struct LocalMusic {
|
|
|
Text(`歌词居中:`)
|
|
|
.fontSize(14)
|
|
|
.fontColor(Color.White)
|
|
|
-
|
|
|
+ .margin({ right: 8 })
|
|
|
Row() {
|
|
|
ForEach(['居中', '居左'], (size: string, index: number) => {
|
|
|
Button(size)
|
|
|
@@ -5304,35 +5327,33 @@ export struct LocalMusic {
|
|
|
.margin({ left: 8, right: 8 })
|
|
|
})
|
|
|
}
|
|
|
+ .layoutWeight(1)
|
|
|
+ Blank()
|
|
|
|
|
|
}
|
|
|
- .margin({ top: 10, bottom: 10 })
|
|
|
+ .justifyContent(FlexAlign.Start)
|
|
|
+ .margin({ top:10,bottom:10,right:20,left:35})
|
|
|
|
|
|
Row() {
|
|
|
Text(`歌词颜色:`)
|
|
|
.fontSize(14)
|
|
|
.fontColor(Color.White)
|
|
|
|
|
|
- Row({ space: 10 }) {
|
|
|
+ Row({space: 10}) {
|
|
|
HSBColorPicker({
|
|
|
- color: this.currentLyricColor,
|
|
|
+ color: '#FFFFFF',
|
|
|
radius: 8,
|
|
|
layout: HSBColorPickerLayout.COLUMN,
|
|
|
- onChange: (value: string) => this.changeLyricColor(value)
|
|
|
+ onChange:(value: string) =>this.changeLyricColor(value)
|
|
|
})
|
|
|
.height(88)
|
|
|
.layoutWeight(1)
|
|
|
- .padding({ left: 10 })
|
|
|
+ .padding({left:15,right:35})
|
|
|
}
|
|
|
- .margin({ right: 30 })
|
|
|
+
|
|
|
}
|
|
|
- .width('77%')
|
|
|
- .margin({
|
|
|
- top: 10,
|
|
|
- bottom: 10,
|
|
|
- right: 35,
|
|
|
- left: 20
|
|
|
- })
|
|
|
+ .width('76%')
|
|
|
+ .margin({ top:10,bottom:10,right:45,left:20})
|
|
|
|
|
|
Row() {
|
|
|
Text(`歌词字号:`)
|
|
|
@@ -5350,13 +5371,13 @@ export struct LocalMusic {
|
|
|
.blockColor(Color.Red)
|
|
|
.trackColor($r('app.color.speed_text_color'))
|
|
|
.selectedColor(Color.White)
|
|
|
- .trackThickness(5)
|
|
|
+ .trackThickness(6)
|
|
|
.onChange((value: number) => {
|
|
|
;
|
|
|
this.setLyricTextSize(value)
|
|
|
|
|
|
})
|
|
|
- .width('80%')
|
|
|
+ .width('76%')
|
|
|
|
|
|
}
|
|
|
.margin({
|
|
|
@@ -5382,13 +5403,13 @@ export struct LocalMusic {
|
|
|
.blockColor(Color.Red)
|
|
|
.trackColor($r('app.color.speed_text_color'))
|
|
|
.selectedColor(Color.White)
|
|
|
- .trackThickness(5)
|
|
|
+ .trackThickness(6)
|
|
|
.onChange((value: number) => {
|
|
|
;
|
|
|
this.setHighLyricTextSize(value)
|
|
|
|
|
|
})
|
|
|
- .width('80%')
|
|
|
+ .width('76%')
|
|
|
|
|
|
}
|
|
|
.margin({
|
|
|
@@ -5413,13 +5434,13 @@ export struct LocalMusic {
|
|
|
.blockColor(Color.Red)
|
|
|
.trackColor($r('app.color.speed_text_color'))
|
|
|
.selectedColor(Color.White)
|
|
|
- .trackThickness(5)
|
|
|
+ .trackThickness(6)
|
|
|
.onChange((value: number) => {
|
|
|
;
|
|
|
this.setLyricLineSpace(value)
|
|
|
|
|
|
})
|
|
|
- .width('80%')
|
|
|
+ .width('76%')
|
|
|
|
|
|
|
|
|
}
|
|
|
@@ -5444,13 +5465,13 @@ export struct LocalMusic {
|
|
|
.blockColor(Color.Red)
|
|
|
.trackColor($r('app.color.speed_text_color'))
|
|
|
.selectedColor(Color.White)
|
|
|
- .trackThickness(5)
|
|
|
+ .trackThickness(6)
|
|
|
.onChange((value: number) => {
|
|
|
;
|
|
|
this.setBlurDegree(value)
|
|
|
|
|
|
})
|
|
|
- .width('80%')
|
|
|
+ .width('76%')
|
|
|
|
|
|
|
|
|
}
|