|
|
@@ -66,7 +66,7 @@ export struct TagsContentCover {
|
|
|
}
|
|
|
.height('100%')
|
|
|
.width('100%')
|
|
|
- .backgroundColor($r('app.color.start_window_background'))
|
|
|
+ .backgroundColor($r('app.color.index_background'))
|
|
|
}
|
|
|
|
|
|
@Builder
|
|
|
@@ -74,18 +74,18 @@ export struct TagsContentCover {
|
|
|
Column(){
|
|
|
List({ scroller: this.listScroller }) {
|
|
|
ListItemGroup({ header: this.listHeader() }) {
|
|
|
- LazyForEach(this.dataSource, (item: VideoItem, index: number) => {
|
|
|
- ListItem() {
|
|
|
- Column() {
|
|
|
- this.MusicItem(item, index)
|
|
|
+ LazyForEach(this.dataSource, (item: VideoItem, index: number) => {
|
|
|
+ ListItem() {
|
|
|
+ Column() {
|
|
|
+ this.MusicItem(item, index)
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- .transition(TransitionEffect.asymmetric(
|
|
|
- TransitionEffect.scale({ x: 1.2, y: 1.2 }).animation({ duration: 500 }),
|
|
|
- TransitionEffect.scale({ x: 0, y: 0 })
|
|
|
- ))
|
|
|
- .clickEffect({ level: ClickEffectLevel.LIGHT })
|
|
|
- }, (item: VideoItem) => item.filePath)
|
|
|
+ .transition(TransitionEffect.asymmetric(
|
|
|
+ TransitionEffect.scale({ x: 1.2, y: 1.2 }).animation({ duration: 500 }),
|
|
|
+ TransitionEffect.scale({ x: 0, y: 0 })
|
|
|
+ ))
|
|
|
+ .clickEffect({ level: ClickEffectLevel.LIGHT })
|
|
|
+ }, (item: VideoItem) => item.filePath)
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -101,7 +101,7 @@ export struct TagsContentCover {
|
|
|
.borderRadius(20)
|
|
|
.padding({top:10,bottom:6})
|
|
|
.height('auto')
|
|
|
- .backgroundColor($r('app.color.index_background'))
|
|
|
+ .backgroundColor($r('app.color.start_window_background'))
|
|
|
.margin({top:20,right:20,left:20})
|
|
|
.layoutWeight(1)
|
|
|
.height('100%')
|
|
|
@@ -178,7 +178,7 @@ export struct TagsContentCover {
|
|
|
|
|
|
}
|
|
|
.borderRadius(20)
|
|
|
- .backgroundColor($r('app.color.index_background'))
|
|
|
+ .backgroundColor($r('app.color.start_window_background'))
|
|
|
.margin({top:20,right:20,left:20})
|
|
|
}
|
|
|
|
|
|
@@ -216,7 +216,7 @@ export struct TagsContentCover {
|
|
|
.margin({top:20,right:20,left:20})
|
|
|
.height(55)
|
|
|
.enabled(!this.isEmbedding)
|
|
|
- .backgroundColor(Color.Transparent)
|
|
|
+ .backgroundColor($r('app.color.start_window_background'))
|
|
|
.clickEffect({ level: ClickEffectLevel.MIDDLE,scale:0.6 })
|
|
|
.onClick(()=>{
|
|
|
this.startEmbed()
|
|
|
@@ -235,6 +235,18 @@ export struct TagsContentCover {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (this.isCover&&PreferencesUtil.getStringSync('COVER_API', '') === '') {
|
|
|
+ ToastUtil.showToast('请到设置界面配置封面Api')
|
|
|
+ return; // Return empty string when no API is configured
|
|
|
+ }
|
|
|
+
|
|
|
+ //判断有没有设置api
|
|
|
+ let apiUrl = PreferencesUtil.getStringSync('LRC_API', '')
|
|
|
+ if (this.isLyric&&StrUtil.isEmpty(apiUrl)) {
|
|
|
+ ToastUtil.showToast('请到设置界面配置歌词Api')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
this.isEmbedding = true;
|
|
|
this.currentProgress = 0;
|
|
|
this.currentFileIndex = 0;
|
|
|
@@ -435,43 +447,43 @@ export struct TagsContentCover {
|
|
|
@Builder
|
|
|
private MusicItem(item: VideoItem, index?: number) {
|
|
|
Button({ type: ButtonType.Normal, stateEffect: true }) {
|
|
|
- Column() {
|
|
|
- Row() {
|
|
|
- SymbolGlyph($r('sys.symbol.music'))
|
|
|
- .fontSize(20)
|
|
|
- .fontColor([this.themeColor])
|
|
|
- .alignSelf(ItemAlign.Center)
|
|
|
- .padding({ left: 25 })
|
|
|
- Text(item.name)
|
|
|
- .fontSize(14)
|
|
|
- .maxLines(1)
|
|
|
- .padding({ left: 5 })
|
|
|
- .textOverflow({ overflow: TextOverflow.MARQUEE })
|
|
|
- .animation({
|
|
|
- duration: 555,
|
|
|
- curve: 'Linear',
|
|
|
- })
|
|
|
- .fontColor(Color.Gray)
|
|
|
- .margin({ left: 8 })
|
|
|
- Blank()
|
|
|
- // 根据嵌入状态显示勾选图标
|
|
|
- SymbolGlyph($r('sys.symbol.checkmark_circle'))
|
|
|
- .fontSize(20)
|
|
|
- .fontColor([this.themeColor])
|
|
|
- .alignSelf(ItemAlign.Center)
|
|
|
- .padding({ right: 25 })
|
|
|
- .animation({
|
|
|
- duration: 666,
|
|
|
- curve: 'ease-in-out' // 可选动画曲线
|
|
|
- })
|
|
|
- .visibility(this.embedStatusMap.get(item.filePath)?Visibility.Visible:Visibility.None)
|
|
|
-
|
|
|
- }
|
|
|
- .layoutWeight(1)
|
|
|
- .height('100%')
|
|
|
- .width('100%')
|
|
|
+ Column() {
|
|
|
+ Row() {
|
|
|
+ SymbolGlyph($r('sys.symbol.music'))
|
|
|
+ .fontSize(20)
|
|
|
+ .fontColor([this.themeColor])
|
|
|
+ .alignSelf(ItemAlign.Center)
|
|
|
+ .padding({ left: 25 })
|
|
|
+ Text(item.name)
|
|
|
+ .fontSize(14)
|
|
|
+ .maxLines(1)
|
|
|
+ .padding({ left: 5 })
|
|
|
+ .textOverflow({ overflow: TextOverflow.MARQUEE })
|
|
|
+ .animation({
|
|
|
+ duration: 555,
|
|
|
+ curve: 'Linear',
|
|
|
+ })
|
|
|
+ .fontColor(Color.Gray)
|
|
|
+ .margin({ left: 8 })
|
|
|
+ Blank()
|
|
|
+ // 根据嵌入状态显示勾选图标
|
|
|
+ SymbolGlyph($r('sys.symbol.checkmark_circle'))
|
|
|
+ .fontSize(20)
|
|
|
+ .fontColor([this.themeColor])
|
|
|
+ .alignSelf(ItemAlign.Center)
|
|
|
+ .padding({ right: 25 })
|
|
|
+ .animation({
|
|
|
+ duration: 666,
|
|
|
+ curve: 'ease-in-out' // 可选动画曲线
|
|
|
+ })
|
|
|
+ .visibility(this.embedStatusMap.get(item.filePath)?Visibility.Visible:Visibility.None)
|
|
|
|
|
|
}
|
|
|
+ .layoutWeight(1)
|
|
|
+ .height('100%')
|
|
|
+ .width('100%')
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
.backgroundColor(Color.Transparent)
|
|
|
.width('100%')
|