|
@@ -165,11 +165,12 @@ export struct LocalMusic {
|
|
|
@Consume @Watch('onModeChange') modeType: number; // 0首页,1媒体库,2艺术家,3专辑
|
|
@Consume @Watch('onModeChange') modeType: number; // 0首页,1媒体库,2艺术家,3专辑
|
|
|
@State showSingleLyric: boolean = false
|
|
@State showSingleLyric: boolean = false
|
|
|
@State sortType: number = 4 //默认排序方式
|
|
@State sortType: number = 4 //默认排序方式
|
|
|
|
|
+ @State isDarkMode: boolean = false
|
|
|
@StorageProp('currentColorMode') @Watch('onColorModeChange') currentMode: number =
|
|
@StorageProp('currentColorMode') @Watch('onColorModeChange') currentMode: number =
|
|
|
ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT;
|
|
ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT;
|
|
|
|
|
|
|
|
onColorModeChange() {
|
|
onColorModeChange() {
|
|
|
- console.log('Heanup-当前模式:' + this.currentMode)
|
|
|
|
|
|
|
+ this.isDarkMode = this.currentMode === ConfigurationConstant.ColorMode.COLOR_MODE_DARK
|
|
|
if (this.currentMode == ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT) {
|
|
if (this.currentMode == ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT) {
|
|
|
//当前为浅色模式,资源初始化逻辑
|
|
//当前为浅色模式,资源初始化逻辑
|
|
|
|
|
|
|
@@ -939,15 +940,27 @@ export struct LocalMusic {
|
|
|
dataBean.imageRes =
|
|
dataBean.imageRes =
|
|
|
[$r('app.media.home_press'), $r('app.media.kp_music'), $r('app.media.music_menu'), $r('app.media.llq'),
|
|
[$r('app.media.home_press'), $r('app.media.kp_music'), $r('app.media.music_menu'), $r('app.media.llq'),
|
|
|
$r('app.media.refresh')]
|
|
$r('app.media.refresh')]
|
|
|
- let pup = XPopup.Builder()
|
|
|
|
|
- .setPopupPosition(PopupPosition.BOTTOM)
|
|
|
|
|
- .setBackgroundColor($r('app.color.title_bar_bg'))
|
|
|
|
|
- .atView('pup_positon_music')
|
|
|
|
|
- .asBubble(wrapBuilder(customPopupBuilder), dataBean)
|
|
|
|
|
- .show()
|
|
|
|
|
|
|
+ let pup: XPopup;
|
|
|
|
|
+ if (this.isDarkMode) {
|
|
|
|
|
+ pup = XPopup.Builder()
|
|
|
|
|
+ .setPopupPosition(PopupPosition.BOTTOM)
|
|
|
|
|
+ .atView('pup_positon_music')
|
|
|
|
|
+ .setBackgroundColor(Color.Black)
|
|
|
|
|
+ .asBubble(wrapBuilder(customPopupBuilder), dataBean)
|
|
|
|
|
+ .show()
|
|
|
|
|
+ }else {
|
|
|
|
|
+ pup = XPopup.Builder()
|
|
|
|
|
+ .setPopupPosition(PopupPosition.BOTTOM)
|
|
|
|
|
+ .atView('pup_positon_music')
|
|
|
|
|
+ .setBackgroundColor(Color.White)
|
|
|
|
|
+ .asBubble(wrapBuilder(customPopupBuilder), dataBean)
|
|
|
|
|
+ .show()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
dataBean.onItemClick = (i) => {
|
|
dataBean.onItemClick = (i) => {
|
|
|
- pup.dismiss()
|
|
|
|
|
|
|
+ XPopup.dismissTop()
|
|
|
switch (i) {
|
|
switch (i) {
|
|
|
|
|
|
|
|
case 0: //首页
|
|
case 0: //首页
|
|
@@ -1551,7 +1564,7 @@ export struct LocalMusic {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
- pup.dismiss()
|
|
|
|
|
|
|
+ XPopup.dismissTop()
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
let popupPosition: PopupPosition = PopupPosition.BOTTOM
|
|
let popupPosition: PopupPosition = PopupPosition.BOTTOM
|
|
@@ -1607,7 +1620,7 @@ export struct LocalMusic {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
- pup.dismiss()
|
|
|
|
|
|
|
+ XPopup.dismissTop()
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
let popupPosition: PopupPosition = PopupPosition.BOTTOM
|
|
let popupPosition: PopupPosition = PopupPosition.BOTTOM
|
|
@@ -1961,7 +1974,7 @@ export struct LocalMusic {
|
|
|
this.isMultiSelect = false
|
|
this.isMultiSelect = false
|
|
|
this.selectedFiles = [];
|
|
this.selectedFiles = [];
|
|
|
this.isAllSelected = false
|
|
this.isAllSelected = false
|
|
|
- pup.dismiss();
|
|
|
|
|
|
|
+ XPopup.dismissTop();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
let pup = XPopup.Builder()
|
|
let pup = XPopup.Builder()
|
|
@@ -2062,7 +2075,7 @@ export struct LocalMusic {
|
|
|
this.isMultiSelect = false
|
|
this.isMultiSelect = false
|
|
|
this.selectedFiles = [];
|
|
this.selectedFiles = [];
|
|
|
this.isAllSelected = false
|
|
this.isAllSelected = false
|
|
|
- pup.dismiss();
|
|
|
|
|
|
|
+ XPopup.dismissTop();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
let pup = XPopup.Builder()
|
|
let pup = XPopup.Builder()
|
|
@@ -2261,7 +2274,7 @@ export struct LocalMusic {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
.layoutWeight(1)
|
|
.layoutWeight(1)
|
|
|
- .margin({ left: 5, right: 5, bottom: 1 })
|
|
|
|
|
|
|
+ .margin({ left: 5, right: 5, bottom: 1 });
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
.width('100%')
|
|
.width('100%')
|
|
@@ -3524,8 +3537,8 @@ export struct LocalMusic {
|
|
|
Row() {
|
|
Row() {
|
|
|
Text('存放目录:')
|
|
Text('存放目录:')
|
|
|
.fontSize(14)
|
|
.fontSize(14)
|
|
|
- .margin({ left: 22 })
|
|
|
|
|
.fontColor(Color.White)
|
|
.fontColor(Color.White)
|
|
|
|
|
+ .margin({ left: 22 })
|
|
|
Text(this.currentSong.filePath)
|
|
Text(this.currentSong.filePath)
|
|
|
.fontSize(12)
|
|
.fontSize(12)
|
|
|
.margin({ left: 10 })
|
|
.margin({ left: 10 })
|
|
@@ -6554,7 +6567,7 @@ export struct LocalMusic {
|
|
|
this.jumpTopTime = PreferencesUtil.getNumberSync(parentPath + 'jumpTopTime')
|
|
this.jumpTopTime = PreferencesUtil.getNumberSync(parentPath + 'jumpTopTime')
|
|
|
this.jumpEndTime = PreferencesUtil.getNumberSync(parentPath + 'jumpEndTime')
|
|
this.jumpEndTime = PreferencesUtil.getNumberSync(parentPath + 'jumpEndTime')
|
|
|
this.isOpenJump = PreferencesUtil.getBooleanSync(parentPath + 'isOpenJump', false)
|
|
this.isOpenJump = PreferencesUtil.getBooleanSync(parentPath + 'isOpenJump', false)
|
|
|
- } else if (this.modeType === 1) { //媒体列表
|
|
|
|
|
|
|
+ } else if (this.modeType === 1) { //媒体库
|
|
|
this.jumpTopTime = PreferencesUtil.getNumberSync(1 + 'jumpTopTime')
|
|
this.jumpTopTime = PreferencesUtil.getNumberSync(1 + 'jumpTopTime')
|
|
|
this.jumpEndTime = PreferencesUtil.getNumberSync(1 + 'jumpEndTime')
|
|
this.jumpEndTime = PreferencesUtil.getNumberSync(1 + 'jumpEndTime')
|
|
|
this.isOpenJump = PreferencesUtil.getBooleanSync(1 + 'isOpenJump', false)
|
|
this.isOpenJump = PreferencesUtil.getBooleanSync(1 + 'isOpenJump', false)
|