|
|
@@ -714,6 +714,9 @@ export struct LocalMusic {
|
|
|
aboutToDisappear() {
|
|
|
console.info('LifeCycleComponent aboutToDisappear');
|
|
|
emitter.off(2);
|
|
|
+ emitter.off(101);
|
|
|
+ emitter.off(888);
|
|
|
+ emitter.off(333);
|
|
|
this.mDestroyPage = true;
|
|
|
this.mIjkMediaPlayer.setScreenOnWhilePlaying(false);
|
|
|
if (this.CONTROL_PlayStatus != PlayStatus.INIT) {
|
|
|
@@ -1868,7 +1871,7 @@ export struct LocalMusic {
|
|
|
.width('35%')
|
|
|
.height(60)
|
|
|
.margin({ top: 10, bottom: 10, right: 6 })
|
|
|
- .backgroundColor($r('app.color.tab_item_bg'))
|
|
|
+ .backgroundColor(this.themeColor)
|
|
|
.onClick(() => {
|
|
|
if (this.isAllSelected) {
|
|
|
// 全不选
|
|
|
@@ -1884,7 +1887,7 @@ export struct LocalMusic {
|
|
|
.height(60)
|
|
|
.id('music_cut')
|
|
|
.margin({ top: 10, bottom: 10, right: 6 })
|
|
|
- .backgroundColor($r('app.color.tab_item_bg'))
|
|
|
+ .backgroundColor(this.themeColor)
|
|
|
.onClick(() => {
|
|
|
this.showCutDialogForMultipleFiles(false, 'music_cut')
|
|
|
})
|
|
|
@@ -1895,7 +1898,7 @@ export struct LocalMusic {
|
|
|
.id('music_cut_current')
|
|
|
.visibility(this.isHasDir ? Visibility.Visible : Visibility.None)
|
|
|
.margin({ top: 10, bottom: 10, right: 6 })
|
|
|
- .backgroundColor($r('app.color.tab_item_bg'))
|
|
|
+ .backgroundColor(this.themeColor)
|
|
|
.onClick(() => {
|
|
|
|
|
|
this.showCutDialogForMultipleFiles(true, 'music_cut_current')
|
|
|
@@ -1905,7 +1908,7 @@ export struct LocalMusic {
|
|
|
.height(60)
|
|
|
.id('music_copy_current')// .visibility(this.isHasDir?Visibility.None:Visibility.None)
|
|
|
.margin({ top: 10, bottom: 10, right: 6 })
|
|
|
- .backgroundColor($r('app.color.tab_item_bg'))
|
|
|
+ .backgroundColor(this.themeColor)
|
|
|
.onClick(() => {
|
|
|
this.showCopyDialogForMultipleFiles(false, 'music_copy_current')
|
|
|
})
|
|
|
@@ -1915,7 +1918,7 @@ export struct LocalMusic {
|
|
|
.height(60)
|
|
|
.margin({ top: 10, bottom: 10, right: 6 })
|
|
|
.visibility(this.isFavMusic?Visibility.None:Visibility.Visible)
|
|
|
- .backgroundColor($r('app.color.tab_item_bg'))
|
|
|
+ .backgroundColor(this.themeColor)
|
|
|
.onClick(() => {
|
|
|
this.showWarnIsDelete()
|
|
|
})
|
|
|
@@ -1923,7 +1926,7 @@ export struct LocalMusic {
|
|
|
.width('35%')
|
|
|
.height(60)
|
|
|
.margin({ top: 10, bottom: 10, right: 6 })
|
|
|
- .backgroundColor($r('app.color.tab_item_bg'))
|
|
|
+ .backgroundColor(this.themeColor)
|
|
|
.onClick(() => {
|
|
|
this.selectedFiles = [];
|
|
|
this.isAllSelected = false
|
|
|
@@ -2349,14 +2352,14 @@ export struct LocalMusic {
|
|
|
duration: 555,
|
|
|
curve: 'Linear',
|
|
|
})
|
|
|
- .fontColor(this.currentSong?.filePath === item.filePath ? $r('app.color.title_bar_bg_text') :
|
|
|
+ .fontColor(this.currentSong?.filePath === item.filePath ? this.themeColor :
|
|
|
$r('app.color.text_color'))
|
|
|
.margin({ left: 10 })
|
|
|
Row() {
|
|
|
Text(StrUtil.isEmpty(item.artist) ? item.cTime : item.artist + ' ' + item?.album)
|
|
|
.fontSize(11)
|
|
|
.padding({ top: 8 })
|
|
|
- .fontColor(this.currentSong?.filePath === item.filePath ? $r('app.color.title_bar_bg_text') :
|
|
|
+ .fontColor(this.currentSong?.filePath === item.filePath ? this.themeColor :
|
|
|
$r('app.color.text_color'))
|
|
|
.margin({ left: 10 })
|
|
|
Blank()
|
|
|
@@ -2364,7 +2367,7 @@ export struct LocalMusic {
|
|
|
.fontSize(11)
|
|
|
.padding({ top: 8 })
|
|
|
.visibility(StrUtil.isEmpty(item.artist) ? Visibility.Visible : Visibility.None)
|
|
|
- .fontColor(this.currentSong?.filePath === item.filePath ? $r('app.color.title_bar_bg_text') :
|
|
|
+ .fontColor(this.currentSong?.filePath === item.filePath ? this.themeColor :
|
|
|
$r('app.color.text_color'))
|
|
|
.margin({ left: 10 })
|
|
|
}
|
|
|
@@ -2382,7 +2385,7 @@ export struct LocalMusic {
|
|
|
Column() {
|
|
|
Checkbox({ name: 'checkbox' + index })
|
|
|
.select(this.selectedFiles.some(x => x.filePath === item.filePath))
|
|
|
- .selectedColor(0x39a2db)
|
|
|
+ .selectedColor(this.themeColor)
|
|
|
.shape(CheckBoxShape.CIRCLE)
|
|
|
.opacity(this.isMultiSelect ? 1 : 0)
|
|
|
.animation({
|
|
|
@@ -2671,17 +2674,7 @@ export struct LocalMusic {
|
|
|
})
|
|
|
|
|
|
Blank()
|
|
|
- Image(this.isGridMusic?$r('app.media.list'):$r("app.media.grid"))
|
|
|
- .width(25)
|
|
|
- .animation({
|
|
|
- duration: 666,
|
|
|
- curve: 'ease-in-out' // 可选动画曲线
|
|
|
- })
|
|
|
- .fillColor(this.themeColor)
|
|
|
- .clickEffect({ level: ClickEffectLevel.MIDDLE })
|
|
|
- .onClick(() => {
|
|
|
- this.isGridMusic = !this.isGridMusic
|
|
|
- })
|
|
|
+
|
|
|
Image($r("app.media.search"))
|
|
|
.width(25)// .visibility(this.modeType===1?Visibility.Visible:Visibility.None)
|
|
|
.animation({
|
|
|
@@ -2730,7 +2723,6 @@ export struct LocalMusic {
|
|
|
|
|
|
Image(this.isMultiSelect ? $r("app.media.cancel_multi") : $r("app.media.top_flower"))
|
|
|
.width(24)
|
|
|
- .margin({ right: 10 })
|
|
|
// .fillColor('#ff5186')// .opacity(this.opacityItem)
|
|
|
.visibility(this.isHistory || this.isSearchMode ? Visibility.None : Visibility.Visible)
|
|
|
.animation({
|
|
|
@@ -2742,10 +2734,10 @@ export struct LocalMusic {
|
|
|
.onClick(() => {
|
|
|
this.isMultiSelect = !this.isMultiSelect
|
|
|
})
|
|
|
- Image($r("app.media.uninstall_green"))
|
|
|
- .width(24)
|
|
|
- .margin({ right: 10 })
|
|
|
- .fillColor(this.themeColor)
|
|
|
+ SymbolGlyph($r('sys.symbol.trash'))
|
|
|
+ .fontColor([this.themeColor])
|
|
|
+ .fontSize(25)
|
|
|
+ .effectStrategy(1)
|
|
|
.visibility(this.isHistory ? Visibility.Visible : Visibility.None)
|
|
|
.animation({
|
|
|
duration: 666,
|
|
|
@@ -2756,6 +2748,18 @@ export struct LocalMusic {
|
|
|
.onClick(() => {
|
|
|
this.clearVideoHistory() //清空播放记录
|
|
|
})
|
|
|
+
|
|
|
+ Image(this.isGridMusic?$r('app.media.list'):$r("app.media.grid"))
|
|
|
+ .width(24)
|
|
|
+ .animation({
|
|
|
+ duration: 666,
|
|
|
+ curve: 'ease-in-out' // 可选动画曲线
|
|
|
+ })
|
|
|
+ .fillColor(this.themeColor)
|
|
|
+ .clickEffect({ level: ClickEffectLevel.MIDDLE })
|
|
|
+ .onClick(() => {
|
|
|
+ this.isGridMusic = !this.isGridMusic
|
|
|
+ })
|
|
|
}
|
|
|
.width('100%')
|
|
|
.padding(10)
|
|
|
@@ -3067,7 +3071,7 @@ export struct LocalMusic {
|
|
|
duration: 555,
|
|
|
curve: 'Linear',
|
|
|
})
|
|
|
- .fontColor(this.currentSong?.filePath === item.filePath ? $r('app.color.title_bar_bg_text') :
|
|
|
+ .fontColor(this.currentSong?.filePath === item.filePath ? this.themeColor :
|
|
|
$r('app.color.text_color'))
|
|
|
|
|
|
Column(){
|
|
|
@@ -3087,7 +3091,7 @@ export struct LocalMusic {
|
|
|
||item.type==CommonConstants.TYPE_IS_ALBUM
|
|
|
||item.type==CommonConstants.TYPE_IS_DIR?Visibility.None:Visibility.Visible)
|
|
|
.fontWeight(FontWeight.Medium)
|
|
|
- .fontColor(this.currentSong?.filePath === item.filePath ? $r('app.color.title_bar_bg_text') :
|
|
|
+ .fontColor(this.currentSong?.filePath === item.filePath ? this.themeColor:
|
|
|
$r('app.color.text_color'))
|
|
|
|
|
|
}
|
|
|
@@ -3145,7 +3149,7 @@ export struct LocalMusic {
|
|
|
|
|
|
Checkbox({ name: 'checkbox' + index })
|
|
|
.select(this.selectedFiles.some(x => x.filePath === item.filePath))
|
|
|
- .selectedColor(0x39a2db)
|
|
|
+ .selectedColor(this.themeColor)
|
|
|
.shape(CheckBoxShape.CIRCLE)
|
|
|
.opacity(this.isMultiSelect ? 1 : 0)
|
|
|
.animation({
|
|
|
@@ -4723,7 +4727,7 @@ export struct LocalMusic {
|
|
|
|
|
|
Text(item.name)
|
|
|
.fontSize(14)
|
|
|
- .fontColor(this.curIndex === index ? $r('app.color.title_bar_bg_text') :
|
|
|
+ .fontColor(this.curIndex === index ? this.themeColor :
|
|
|
this.isFrontWhite ? Color.White : $r('app.color.text_color'))
|
|
|
.maxLines(1)
|
|
|
.margin({ left: 10 })
|
|
|
@@ -4731,7 +4735,7 @@ export struct LocalMusic {
|
|
|
Text(StrUtil.isEmpty(item.artist) ? item.cTime : item.artist + ' ' + item?.album)
|
|
|
.fontSize(11)
|
|
|
.padding({ top: 8 })
|
|
|
- .fontColor(this.curIndex === index ? $r('app.color.title_bar_bg_text') :
|
|
|
+ .fontColor(this.curIndex === index ? this.themeColor :
|
|
|
this.isFrontWhite ? $r('app.color.playlistText_color') : $r('app.color.text_color'))
|
|
|
.margin({ left: 10 })
|
|
|
Blank()
|
|
|
@@ -6146,7 +6150,7 @@ export struct LocalMusic {
|
|
|
.fontWeight(480)
|
|
|
.layoutWeight(1)
|
|
|
Toggle({ type: ToggleType.Switch, isOn: this.isOpenPip })
|
|
|
- .selectedColor($r('app.color.tab_item_bg'))
|
|
|
+ .selectedColor(this.themeColor)
|
|
|
.switchPointColor(Color.White)
|
|
|
.margin({ right: 18 })
|
|
|
.onChange((checked: boolean) => {
|
|
|
@@ -6289,7 +6293,7 @@ export struct LocalMusic {
|
|
|
|
|
|
Column(){
|
|
|
Toggle({ type: ToggleType.Switch, isOn: this.isHightLightCenter })
|
|
|
- .selectedColor($r('app.color.tab_item_bg'))
|
|
|
+ .selectedColor(this.themeColor)
|
|
|
.switchPointColor(Color.White)
|
|
|
.onChange((checked: boolean) => {
|
|
|
this.isHightLightCenter = checked;
|
|
|
@@ -6441,7 +6445,7 @@ export struct LocalMusic {
|
|
|
step: 1,
|
|
|
style: SliderStyle.OutSet
|
|
|
})
|
|
|
- .blockColor(Color.Red)
|
|
|
+ .blockColor(this.themeColor)
|
|
|
.trackColor($r('app.color.speed_text_color'))
|
|
|
.selectedColor(Color.White)
|
|
|
.trackThickness(6)
|
|
|
@@ -6475,7 +6479,7 @@ export struct LocalMusic {
|
|
|
step: 1,
|
|
|
style: SliderStyle.OutSet
|
|
|
})
|
|
|
- .blockColor(Color.Red)
|
|
|
+ .blockColor(this.themeColor)
|
|
|
.trackColor($r('app.color.speed_text_color'))
|
|
|
.selectedColor(Color.White)
|
|
|
.trackThickness(6)
|
|
|
@@ -6510,7 +6514,7 @@ export struct LocalMusic {
|
|
|
step: 0.1,
|
|
|
style: SliderStyle.OutSet
|
|
|
})
|
|
|
- .blockColor(Color.Red)
|
|
|
+ .blockColor(this.themeColor)
|
|
|
.trackColor($r('app.color.speed_text_color'))
|
|
|
.selectedColor(Color.White)
|
|
|
.trackThickness(6)
|
|
|
@@ -6539,7 +6543,7 @@ export struct LocalMusic {
|
|
|
step: 0.1,
|
|
|
style: SliderStyle.OutSet
|
|
|
})
|
|
|
- .blockColor(Color.Red)
|
|
|
+ .blockColor(this.themeColor)
|
|
|
.trackColor($r('app.color.speed_text_color'))
|
|
|
.selectedColor(Color.White)
|
|
|
.trackThickness(6)
|
|
|
@@ -6568,7 +6572,7 @@ export struct LocalMusic {
|
|
|
step: 0.1,
|
|
|
style: SliderStyle.OutSet
|
|
|
})
|
|
|
- .blockColor(Color.Red)
|
|
|
+ .blockColor(this.themeColor)
|
|
|
.trackColor($r('app.color.speed_text_color'))
|
|
|
.selectedColor(Color.White)
|
|
|
.trackThickness(6)
|
|
|
@@ -6597,7 +6601,7 @@ export struct LocalMusic {
|
|
|
step: 100,
|
|
|
style: SliderStyle.OutSet
|
|
|
})
|
|
|
- .blockColor(Color.Red)
|
|
|
+ .blockColor(this.themeColor)
|
|
|
.trackColor($r('app.color.speed_text_color'))
|
|
|
.selectedColor(Color.White)
|
|
|
.trackThickness(6)
|
|
|
@@ -6636,7 +6640,7 @@ export struct LocalMusic {
|
|
|
step: 0.1,
|
|
|
style: SliderStyle.OutSet
|
|
|
})
|
|
|
- .blockColor(Color.Red)
|
|
|
+ .blockColor(this.themeColor)
|
|
|
.trackColor($r('app.color.speed_text_color'))
|
|
|
.selectedColor(Color.White)
|
|
|
.trackThickness(6)
|
|
|
@@ -7197,7 +7201,7 @@ export struct LocalMusic {
|
|
|
style: SliderStyle.OutSet
|
|
|
})
|
|
|
.margin({ left: 18, right: 8 })
|
|
|
- .blockColor(Color.Red)
|
|
|
+ .blockColor(this.themeColor)
|
|
|
.trackColor($r('app.color.speed_text_color'))
|
|
|
.selectedColor(Color.White)
|
|
|
.trackThickness(9)
|
|
|
@@ -7646,7 +7650,7 @@ export struct LocalMusic {
|
|
|
step: 1,
|
|
|
style: SliderStyle.OutSet
|
|
|
})
|
|
|
- .blockColor(Color.Red)
|
|
|
+ .blockColor(this.themeColor)
|
|
|
.trackColor($r('app.color.speed_text_color'))
|
|
|
.selectedColor(Color.White)
|
|
|
.trackThickness(8)
|
|
|
@@ -7679,7 +7683,7 @@ export struct LocalMusic {
|
|
|
step: 1,
|
|
|
style: SliderStyle.OutSet
|
|
|
})
|
|
|
- .blockColor(Color.Red)
|
|
|
+ .blockColor(this.themeColor)
|
|
|
.trackColor($r('app.color.speed_text_color'))
|
|
|
.selectedColor(Color.White)
|
|
|
.trackThickness(8)
|