Ver Fonte

调整UI

onecold há 5 meses atrás
pai
commit
12b5d58910

+ 9 - 5
entry/src/main/ets/pages/WebDavMainPage.ets

@@ -2297,6 +2297,13 @@ export struct WebDavMainPage {
     }
     .padding({ top: this.topSafeHeight + 10, left: 10, right: 10, bottom: 2 })
     .width('100%')
+    .bindContentCover($$this.isShowDownloadCenter, this.DownloadCenterBuilder(),
+      {
+        modalTransition:ModalTransition.DEFAULT,
+        onWillDisappear: () => {
+          this.isShowDownloadCenter = false
+        },
+      })
   }
 
 
@@ -2500,6 +2507,7 @@ export struct WebDavMainPage {
     if (this.songForPropertySheet) {
       Scroll() {
         Column({ space: 10 }) {
+          this.SongPropertyCoverRow('音乐封面', this.songForPropertySheet?.pixelMapPath)
           this.SongPropertyRow('歌曲名称', this.getSongPropertyValue(this.songForPropertySheet?.name))
           this.SongPropertyRow('文件名称', this.getSongPropertyValue(this.songForPropertySheet?.fileName))
           this.SongPropertyRow('艺术家', this.getSongPropertyValue(this.songForPropertySheet?.artist))
@@ -2508,7 +2516,6 @@ export struct WebDavMainPage {
           this.SongPropertyRow('文件大小', this.getSongPropertyValue(this.songForPropertySheet?.size))
           this.SongPropertyRow('比特率', this.getSongPropertyValue(this.songForPropertySheet?.bit_rate))
           this.SongPropertyRow('采样率', this.getSongPropertyValue(this.songForPropertySheet?.sampleRate))
-          this.SongPropertyCoverRow('音乐封面', this.songForPropertySheet?.pixelMapPath)
           this.SongPropertyLyricRow('内嵌歌词', this.songForPropertySheet?.lyricContent)
           this.SongPropertyRow('创建时间', this.getSongPropertyValue(this.songForPropertySheet?.cTime))
           this.SongPropertyRow('来源类型', this.getSongTypeLabel(this.songForPropertySheet))
@@ -2571,16 +2578,13 @@ export struct WebDavMainPage {
     .backdropBlur(this.blurValue)
     .backgroundBrightness({rate:this.isCustomizeBg?0.1:0,lightUpDegree:this.bgBrightness})
     .bindSheet($$this.isShowSongPropertySheet, this.SongPropertySheetBuilder(), {
-      height: '88%',
+      height: '99%',
       dragBar: true,
       showClose: true,
       preferType: SheetType.CENTER,
       blurStyle: BlurStyle.Thin,
       title: { title: '歌曲属性' }
     })
-    .bindContentCover($$this.isShowDownloadCenter, this.DownloadCenterBuilder(), {
-      transition: TransitionEffect.translate({ x: 500 }).animation({ curve: curves.springMotion(0.6, 0.8) })
-    })
     .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
   }
 

+ 18 - 2
entry/src/main/ets/view/LocalMusic.ets

@@ -12656,7 +12656,7 @@ export struct LocalMusic {
           this.musicNameInfo(false)
 
           if (this.isPhoneLan()) {
-            Text(this.name)
+            Text(this.name+"--"+this.artist)
               .fontSize(18)
               .fontWeight(FontWeight.Bold)
               .margin({ top: 13 })
@@ -12914,7 +12914,7 @@ export struct LocalMusic {
           .maxLines(1)
       }
       .zIndex(1)
-      .width('100%')
+      .layoutWeight(1)
       .margin({ left: 15 })
       Blank()
       Row(){
@@ -17163,6 +17163,22 @@ export struct LocalMusic {
       .height(this.isCoverOpacity() ? 80 : 100)
       .margin({bottom: 3 })
       .clip(true)
+      .zIndex(-2)
+      .onClick(()=>{
+        this.cycleSpectrumMode();
+      })
+  }
+
+  private cycleSpectrumMode(): void {
+    const modeNames: string[] = ['柱状', '波形', '圆形', '粒子', '脉冲', '镜像柱', '影子柱', '轨道线', '点阵', '星爆'];
+    if (modeNames.length <= 0) {
+      return;
+    }
+    const nextIndex: number = (this.spectrumModeIndex + 1) % modeNames.length;
+    this.spectrumModeIndex = nextIndex;
+    PreferencesUtil.putSync('spectrumModeIndex', nextIndex);
+    AppStorage.setOrCreate<number>('spectrumMode', nextIndex);
+    Logger.info('heanup-LocalMusic', `频谱特效已顺序切换为: ${modeNames[nextIndex]}`);
   }
 
   private getSongDurationMs(song?: VideoItem): number {