|
@@ -1,7 +1,6 @@
|
|
|
import TitleBar from './TitleBar'
|
|
import TitleBar from './TitleBar'
|
|
|
import { Animator, curves, display, PromptAction, promptAction, router, window } from '@kit.ArkUI';
|
|
import { Animator, curves, display, PromptAction, promptAction, router, window } from '@kit.ArkUI';
|
|
|
import { VideoItem } from '../viewmodel/VideoItem';
|
|
import { VideoItem } from '../viewmodel/VideoItem';
|
|
|
-import { HomeConstants } from '../common/constants/HomeConstants';
|
|
|
|
|
import {
|
|
import {
|
|
|
AppUtil,
|
|
AppUtil,
|
|
|
ArrayUtil,
|
|
ArrayUtil,
|
|
@@ -166,6 +165,7 @@ 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 //默认排序方式
|
|
|
|
|
+ @Consume isDarkMode: boolean; // 消耗深色模式状态
|
|
|
|
|
|
|
|
onModeChange() {
|
|
onModeChange() {
|
|
|
if (this.modeType === 2 || this.modeType === 3) {
|
|
if (this.modeType === 2 || this.modeType === 3) {
|
|
@@ -299,12 +299,13 @@ export struct LocalMusic {
|
|
|
.setLeftIconWidth(25)
|
|
.setLeftIconWidth(25)
|
|
|
.setLeftIconHeight(25)
|
|
.setLeftIconHeight(25)
|
|
|
.setTitleName('首页')
|
|
.setTitleName('首页')
|
|
|
- .setLeftTitleFontSize(13)
|
|
|
|
|
- .setRightIcon($r('app.media.add'))
|
|
|
|
|
- .setTitleFontColor(Color.White)
|
|
|
|
|
- .setTitleBarBackground($r('app.color.title_bar_bg'))
|
|
|
|
|
|
|
+ .setTitleFontSize(19)
|
|
|
|
|
+ .setTitleFontColor($r('app.color.text_color'))
|
|
|
|
|
+ // 根据深色模式状态动态设置标题栏背景色
|
|
|
|
|
+ .setTitleBarBackground(this.isDarkMode ? '#121212' : '#FF4081')
|
|
|
.setTitleBarBottomLineColor($r('app.color.title_bar_bg'))
|
|
.setTitleBarBottomLineColor($r('app.color.title_bar_bg'))
|
|
|
.setRightTitleBackground($r('app.color.title_bar_bg'))
|
|
.setRightTitleBackground($r('app.color.title_bar_bg'))
|
|
|
|
|
+ .setRightIcon($r('app.media.add'))
|
|
|
.setOnRightClickListener(() => {
|
|
.setOnRightClickListener(() => {
|
|
|
|
|
|
|
|
this.showSheelDialog()
|
|
this.showSheelDialog()
|
|
@@ -1814,7 +1815,7 @@ export struct LocalMusic {
|
|
|
}
|
|
}
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
.height('100%')
|
|
.height('100%')
|
|
|
- .backgroundColor($r('app.color.white'))
|
|
|
|
|
|
|
+ .backgroundColor($r('app.color.index_background'))
|
|
|
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
|
|
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -2077,18 +2078,19 @@ export struct LocalMusic {
|
|
|
translate: { x: 160 }
|
|
translate: { x: 160 }
|
|
|
})
|
|
})
|
|
|
.margin({ left: 10, right: 20 })
|
|
.margin({ left: 10, right: 20 })
|
|
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
Row() {
|
|
Row() {
|
|
|
Text(`${this.artistMap.get(item.name)?.length ?? 0}首`)
|
|
Text(`${this.artistMap.get(item.name)?.length ?? 0}首`)
|
|
|
.fontSize(11)
|
|
.fontSize(11)
|
|
|
.padding({ top: 8 })
|
|
.padding({ top: 8 })
|
|
|
.visibility(this.modeType === 2 ? Visibility.Visible : Visibility.None)
|
|
.visibility(this.modeType === 2 ? Visibility.Visible : Visibility.None)
|
|
|
- .fontColor(Color.Gray)
|
|
|
|
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
.margin({ left: 10 })
|
|
.margin({ left: 10 })
|
|
|
Text(`${this.albumMap.get(item.name)?.length ?? 0}首`)
|
|
Text(`${this.albumMap.get(item.name)?.length ?? 0}首`)
|
|
|
.fontSize(11)
|
|
.fontSize(11)
|
|
|
.padding({ top: 8 })
|
|
.padding({ top: 8 })
|
|
|
.visibility(this.modeType === 3 ? Visibility.Visible : Visibility.None)
|
|
.visibility(this.modeType === 3 ? Visibility.Visible : Visibility.None)
|
|
|
- .fontColor(Color.Gray)
|
|
|
|
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
.margin({ left: 10 })
|
|
.margin({ left: 10 })
|
|
|
Blank()
|
|
Blank()
|
|
|
|
|
|
|
@@ -2145,21 +2147,20 @@ export struct LocalMusic {
|
|
|
duration: 555,
|
|
duration: 555,
|
|
|
curve: 'Linear',
|
|
curve: 'Linear',
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
- .fontColor(this.currentSong?.filePath === item.filePath ? $r('app.color.title_bar_bg') : Color.Black)
|
|
|
|
|
|
|
+ .fontColor(this.currentSong?.filePath === item.filePath ? $r('app.color.title_bar_bg') : $r('app.color.text_color'))
|
|
|
.margin({ left: 10 })
|
|
.margin({ left: 10 })
|
|
|
Row() {
|
|
Row() {
|
|
|
Text(StrUtil.isEmpty(item.artist) ? item.cTime : item.artist + ' ' + item?.album)
|
|
Text(StrUtil.isEmpty(item.artist) ? item.cTime : item.artist + ' ' + item?.album)
|
|
|
.fontSize(11)
|
|
.fontSize(11)
|
|
|
.padding({ top: 8 })
|
|
.padding({ top: 8 })
|
|
|
- .fontColor(this.currentSong?.filePath === item.filePath ? $r('app.color.title_bar_bg') : Color.Gray)
|
|
|
|
|
|
|
+ .fontColor(this.currentSong?.filePath === item.filePath ? $r('app.color.title_bar_bg') : $r('app.color.text_color'))
|
|
|
.margin({ left: 10 })
|
|
.margin({ left: 10 })
|
|
|
Blank()
|
|
Blank()
|
|
|
Text(item.size)
|
|
Text(item.size)
|
|
|
.fontSize(11)
|
|
.fontSize(11)
|
|
|
.padding({ top: 8 })
|
|
.padding({ top: 8 })
|
|
|
.visibility(StrUtil.isEmpty(item.artist) ? Visibility.Visible : Visibility.None)
|
|
.visibility(StrUtil.isEmpty(item.artist) ? Visibility.Visible : Visibility.None)
|
|
|
- .fontColor(Color.Gray)
|
|
|
|
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
.margin({ left: 10 })
|
|
.margin({ left: 10 })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2251,7 +2252,7 @@ export struct LocalMusic {
|
|
|
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) {
|
|
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) {
|
|
|
Text(item)
|
|
Text(item)
|
|
|
.fontSize(16)
|
|
.fontSize(16)
|
|
|
- .fontColor(this.modeType === index ? Color.White : '#666')
|
|
|
|
|
|
|
+ .fontColor(this.modeType === index ? Color.White : $r('app.color.text_color'))
|
|
|
.padding(15)
|
|
.padding(15)
|
|
|
.onClick(() => {
|
|
.onClick(() => {
|
|
|
this.modeType = index;
|
|
this.modeType = index;
|
|
@@ -2292,12 +2293,12 @@ export struct LocalMusic {
|
|
|
.fillColor('#ff5186')
|
|
.fillColor('#ff5186')
|
|
|
|
|
|
|
|
Text(`共找到${this.artistList.length}位艺术家`)
|
|
Text(`共找到${this.artistList.length}位艺术家`)
|
|
|
- .fontColor(Color.Black)
|
|
|
|
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
.fontSize(14)
|
|
.fontSize(14)
|
|
|
.opacity(this.opacityItem)
|
|
.opacity(this.opacityItem)
|
|
|
.visibility(this.modeType === 2 ? Visibility.Visible : Visibility.None)
|
|
.visibility(this.modeType === 2 ? Visibility.Visible : Visibility.None)
|
|
|
Text(`共找到${this.albumList.length}张专辑`)
|
|
Text(`共找到${this.albumList.length}张专辑`)
|
|
|
- .fontColor(Color.Black)
|
|
|
|
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
.opacity(this.opacityItem)
|
|
.opacity(this.opacityItem)
|
|
|
.visibility(this.modeType === 3 ? Visibility.Visible : Visibility.None)
|
|
.visibility(this.modeType === 3 ? Visibility.Visible : Visibility.None)
|
|
|
.fontSize(14)
|
|
.fontSize(14)
|
|
@@ -2319,7 +2320,7 @@ export struct LocalMusic {
|
|
|
.layoutWeight(1)
|
|
.layoutWeight(1)
|
|
|
Text(`取消`)
|
|
Text(`取消`)
|
|
|
.margin({ left: 10, right: 10 })
|
|
.margin({ left: 10, right: 10 })
|
|
|
- .fontColor(Color.Black)
|
|
|
|
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
.fontSize(16)
|
|
.fontSize(16)
|
|
|
.onClick(() => {
|
|
.onClick(() => {
|
|
|
this.isSearchMode = false
|
|
this.isSearchMode = false
|
|
@@ -2380,14 +2381,14 @@ export struct LocalMusic {
|
|
|
.margin({ left: 8 })
|
|
.margin({ left: 8 })
|
|
|
.fillColor('#ff5186')
|
|
.fillColor('#ff5186')
|
|
|
Text(`播放全部`)
|
|
Text(`播放全部`)
|
|
|
- .fontColor(Color.Black)
|
|
|
|
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
.fontSize(14)
|
|
.fontSize(14)
|
|
|
.animation({
|
|
.animation({
|
|
|
duration: 666,
|
|
duration: 666,
|
|
|
curve: 'ease-in-out' // 可选动画曲线
|
|
curve: 'ease-in-out' // 可选动画曲线
|
|
|
})
|
|
})
|
|
|
Text(`(${Utility.getGlobalList(this.videoLocalList, CommonConstants.TYPE_LOCAL).length}首)`)
|
|
Text(`(${Utility.getGlobalList(this.videoLocalList, CommonConstants.TYPE_LOCAL).length}首)`)
|
|
|
- .fontColor(Color.Black)
|
|
|
|
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
.fontSize(14)
|
|
.fontSize(14)
|
|
|
.opacity(this.opacityItem)
|
|
.opacity(this.opacityItem)
|
|
|
.animation({
|
|
.animation({
|
|
@@ -2400,7 +2401,7 @@ export struct LocalMusic {
|
|
|
duration: 666,
|
|
duration: 666,
|
|
|
curve: 'ease-in-out' // 可选动画曲线
|
|
curve: 'ease-in-out' // 可选动画曲线
|
|
|
})
|
|
})
|
|
|
- .backgroundColor(this.isClickedPLayAll ? '#d0d0d0' : '#ffffff')
|
|
|
|
|
|
|
+ .backgroundColor(this.isClickedPLayAll ? $r('app.color.silvery') : $r('app.color.index_background'))
|
|
|
.onTouch((event: TouchEvent) => {
|
|
.onTouch((event: TouchEvent) => {
|
|
|
if (event.type === TouchType.Down) {
|
|
if (event.type === TouchType.Down) {
|
|
|
this.isClickedPLayAll = true;
|
|
this.isClickedPLayAll = true;
|
|
@@ -2431,7 +2432,7 @@ export struct LocalMusic {
|
|
|
.layoutWeight(1)
|
|
.layoutWeight(1)
|
|
|
Text(`取消`)
|
|
Text(`取消`)
|
|
|
.margin({ left: 10, right: 10 })
|
|
.margin({ left: 10, right: 10 })
|
|
|
- .fontColor(Color.Black)
|
|
|
|
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
.fontSize(16)
|
|
.fontSize(16)
|
|
|
.onClick(() => {
|
|
.onClick(() => {
|
|
|
this.isSearchMode = false
|
|
this.isSearchMode = false
|
|
@@ -2743,7 +2744,7 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
}, (item: VideoItem) => item.filePath)
|
|
}, (item: VideoItem) => item.filePath)
|
|
|
}
|
|
}
|
|
|
- .backgroundColor($r('app.color.white'))
|
|
|
|
|
|
|
+ .backgroundColor($r('app.color.index_background'))
|
|
|
.divider({ strokeWidth: 1, color: '#ffe9f0f0' })
|
|
.divider({ strokeWidth: 1, color: '#ffe9f0f0' })
|
|
|
.margin({ bottom: this.isPuraWP() ? 50 : 108 })
|
|
.margin({ bottom: this.isPuraWP() ? 50 : 108 })
|
|
|
.cachedCount(30)
|
|
.cachedCount(30)
|
|
@@ -3027,7 +3028,7 @@ export struct LocalMusic {
|
|
|
.height(this.bottomBarHeight)
|
|
.height(this.bottomBarHeight)
|
|
|
.justifyContent(FlexAlign.Center)
|
|
.justifyContent(FlexAlign.Center)
|
|
|
.hitTestBehavior(HitTestMode.Transparent)
|
|
.hitTestBehavior(HitTestMode.Transparent)
|
|
|
- .backgroundColor($r('app.color.white'))
|
|
|
|
|
|
|
+ .backgroundColor($r('app.color.index_background'))
|
|
|
.bindContentCover($$this.isShowPlay, this.MusicPlayBuilder(), {
|
|
.bindContentCover($$this.isShowPlay, this.MusicPlayBuilder(), {
|
|
|
// modalTransition: ModalTransition.DEFAULT,
|
|
// modalTransition: ModalTransition.DEFAULT,
|
|
|
transition: AnimationHelper.transitionInDown(666),
|
|
transition: AnimationHelper.transitionInDown(666),
|
|
@@ -3577,7 +3578,7 @@ export struct LocalMusic {
|
|
|
// 文字描述区域
|
|
// 文字描述区域
|
|
|
Text(this.getDisplayText(minutes))
|
|
Text(this.getDisplayText(minutes))
|
|
|
.fontSize(15)
|
|
.fontSize(15)
|
|
|
- .fontColor(minutes === this.selectedMinutes ? $r('app.color.title_bar_bg') : 0x333333)// 选中态颜色变化
|
|
|
|
|
|
|
+ .fontColor(minutes === this.selectedMinutes ? $r('app.color.title_bar_bg') : $r('app.color.text_color'))// 选中态颜色变化
|
|
|
.textAlign(TextAlign.Start)
|
|
.textAlign(TextAlign.Start)
|
|
|
.layoutWeight(1); // 占据剩余空间
|
|
.layoutWeight(1); // 占据剩余空间
|
|
|
|
|
|
|
@@ -3741,7 +3742,7 @@ export struct LocalMusic {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
Button() {
|
|
Button() {
|
|
|
- Image($r('app.media.ic_close'))
|
|
|
|
|
|
|
+ Image($r('app.media.close'))
|
|
|
.fillColor(Color.White)
|
|
.fillColor(Color.White)
|
|
|
.width(13)
|
|
.width(13)
|
|
|
}
|
|
}
|
|
@@ -5725,7 +5726,7 @@ export struct LocalMusic {
|
|
|
.onClick(() => {
|
|
.onClick(() => {
|
|
|
this.isJumpSetting = !this.isJumpSetting;
|
|
this.isJumpSetting = !this.isJumpSetting;
|
|
|
})
|
|
})
|
|
|
- } else if (more.id === 12) {
|
|
|
|
|
|
|
+ } else if (more.id === 12) { //投播
|
|
|
AVCastPicker({
|
|
AVCastPicker({
|
|
|
customPicker: (): void => this.TPImageBuilder(more),
|
|
customPicker: (): void => this.TPImageBuilder(more),
|
|
|
onStateChange: (state) => {
|
|
onStateChange: (state) => {
|
|
@@ -6044,16 +6045,16 @@ export struct LocalMusic {
|
|
|
Column() {
|
|
Column() {
|
|
|
Text('仅对本播放列表有效')
|
|
Text('仅对本播放列表有效')
|
|
|
.fontSize(16)
|
|
.fontSize(16)
|
|
|
- .fontColor(Color.White)
|
|
|
|
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
// 跳过头尾
|
|
// 跳过头尾
|
|
|
Column() {
|
|
Column() {
|
|
|
Row() {
|
|
Row() {
|
|
|
Text('跳过片头:')
|
|
Text('跳过片头:')
|
|
|
.fontSize(16)
|
|
.fontSize(16)
|
|
|
- .fontColor(Color.White)
|
|
|
|
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
Text(this.jumpTopTime + 's')
|
|
Text(this.jumpTopTime + 's')
|
|
|
.fontSize(16)
|
|
.fontSize(16)
|
|
|
- .fontColor(Color.White)
|
|
|
|
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
}
|
|
}
|
|
|
.margin({ bottom: 5 })
|
|
.margin({ bottom: 5 })
|
|
|
|
|
|
|
@@ -6083,10 +6084,10 @@ export struct LocalMusic {
|
|
|
Row() {
|
|
Row() {
|
|
|
Text('跳过片尾:')
|
|
Text('跳过片尾:')
|
|
|
.fontSize(16)
|
|
.fontSize(16)
|
|
|
- .fontColor(Color.White)
|
|
|
|
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
Text(this.jumpEndTime + 's')
|
|
Text(this.jumpEndTime + 's')
|
|
|
.fontSize(16)
|
|
.fontSize(16)
|
|
|
- .fontColor(Color.White)
|
|
|
|
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
}
|
|
}
|
|
|
.margin({ bottom: 5 })
|
|
.margin({ bottom: 5 })
|
|
|
|
|
|