浏览代码

导入音乐UI优化,添加下导入疑问

onecold 7 月之前
父节点
当前提交
10d57908ac
共有 2 个文件被更改,包括 43 次插入52 次删除
  1. 0 28
      entry/src/main/ets/pages/SettingPage.ets
  2. 43 24
      entry/src/main/ets/view/LocalMusic.ets

+ 0 - 28
entry/src/main/ets/pages/SettingPage.ets

@@ -1026,34 +1026,6 @@ export struct SettingPage {
 
 
             Line().width('100%').height(0.3).backgroundColor($r('app.color.index_tab_unselected_font_color'))
             Line().width('100%').height(0.3).backgroundColor($r('app.color.index_tab_unselected_font_color'))
 
 
-            // 滚动隐藏'
-            // Row() {
-            //   Text('滚动隐藏')
-            //     .margin({ left: 18 })
-            //     .fontSize(15)
-            //     .fontColor(Color.Gray)
-            //     .fontWeight(480)
-            //     .layoutWeight(1)
-            //   Toggle({ type: ToggleType.Switch, isOn: this.isScrollHide })
-            //     .selectedColor(this.themeColor)
-            //     .switchPointColor(Color.White)
-            //     .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
-            //     .margin({ right: 18 })
-            //     .onChange((checked: boolean) => {
-            //       this.isScrollHide = checked;
-            //       PreferencesUtil.put(SettingPage.IS_SCROLL_HIDE, this.isScrollHide)
-            //       this.sendChangeEvent()
-            //     })
-            //     .width(50)
-            //     .height(30);
-            // }
-            // .height(55)
-            // .visibility(Visibility.None)
-            // .clickEffect({ level: ClickEffectLevel.HEAVY })
-            //
-            // Line().width('100%').height(0.3).backgroundColor($r('app.color.index_tab_unselected_font_color'))
-            //   .visibility(Visibility.None)
-            // 网格布局
             // 网格布局
             // 网格布局
             Row() {
             Row() {
               SymbolGlyph($r('sys.symbol.more'))
               SymbolGlyph($r('sys.symbol.more'))

+ 43 - 24
entry/src/main/ets/view/LocalMusic.ets

@@ -2895,22 +2895,6 @@ export struct LocalMusic {
       let code = (error as BusinessError).code;
       let code = (error as BusinessError).code;
       console.error(`showDialog args error code is ${code}, message is ${message}`);
       console.error(`showDialog args error code is ${code}, message is ${message}`);
     };
     };
-    // DialogHelper.showTipsDialog({
-    //   title: '使用提示:自动导入教程',
-    //
-    //   content: '用系统自带的文件管理器将:\n\n1、音频文件放入' + '\n\n我的设备/Download/'
-    //     + this.appName + '\n\n2、无需繁琐的勾选和分类步骤。\n\n3、每个子文件夹将被组成一个分组。' +
-    //     '\n\n4、歌词文件的文件名必须和目标歌曲文件名相同(不包含后缀名)。\n\n5、歌词文件和目标歌曲文件必须同个目录。' +
-    //     '\n\n6、电脑上Download的目录是\nDownload/' + this.packName + '。\n\n7、放好文件后如果没显示点击刷新按钮。\n',
-    //   onAction: (action) => {
-    //     if (action == DialogAction.TWO) {
-    //       PreferencesUtil.putSync('isFirstMusic', false)
-    //       router.pushUrl({
-    //         url: 'pages/ScanFilePage'
-    //       });
-    //     }
-    //   }
-    // })
 
 
 
 
   }
   }
@@ -4110,12 +4094,12 @@ export struct LocalMusic {
         Column() {
         Column() {
           Row() {
           Row() {
             SymbolGlyph($r('sys.symbol.info_circle'))
             SymbolGlyph($r('sys.symbol.info_circle'))
-              .fontSize(20)
+              .fontSize(22)
               .fontColor([this.themeColor])
               .fontColor([this.themeColor])
               .alignSelf(ItemAlign.Center)
               .alignSelf(ItemAlign.Center)
               .margin({ left: 8 })
               .margin({ left: 8 })
             Text('导入音乐复制到DownLoad目录')
             Text('导入音乐复制到DownLoad目录')
-              .margin({ left: 18 })
+              .margin({ left: 8 })
               .fontSize(14)
               .fontSize(14)
               .fontColor($r('app.color.text_color'))
               .fontColor($r('app.color.text_color'))
               .fontWeight(480)
               .fontWeight(480)
@@ -4124,7 +4108,7 @@ export struct LocalMusic {
               .selectedColor(this.themeColor)
               .selectedColor(this.themeColor)
               .switchPointColor(Color.White)
               .switchPointColor(Color.White)
               .clickEffect({ level: ClickEffectLevel.LIGHT, scale: 0.5 })
               .clickEffect({ level: ClickEffectLevel.LIGHT, scale: 0.5 })
-              .margin({ right: 18 })
+              .margin({ right: 2 })
               .onChange((checked: boolean) => {
               .onChange((checked: boolean) => {
                 this.isCopyFileToDownLoad = checked;
                 this.isCopyFileToDownLoad = checked;
                 PreferencesUtil.put(SettingPage.IS_COPYFILE_TO_DOWNLOAD, this.isCopyFileToDownLoad)
                 PreferencesUtil.put(SettingPage.IS_COPYFILE_TO_DOWNLOAD, this.isCopyFileToDownLoad)
@@ -4132,15 +4116,15 @@ export struct LocalMusic {
               .width(50)
               .width(50)
               .height(30);
               .height(30);
           }
           }
-          .height(88)
+          .height(72)
+          .padding({  left:8,right:8 })
 
 
         }
         }
         .clickEffect({ level: ClickEffectLevel.MIDDLE,scale:0.6 })
         .clickEffect({ level: ClickEffectLevel.MIDDLE,scale:0.6 })
         .backgroundColor($r('app.color.start_window_background'))
         .backgroundColor($r('app.color.start_window_background'))
         .borderRadius(15)
         .borderRadius(15)
+        .width('85%')
         .margin({
         .margin({
-          left: 30,
-          right: 30,
           top: 10,
           top: 10,
           bottom: 10
           bottom: 10
         })
         })
@@ -4160,6 +4144,7 @@ export struct LocalMusic {
               color: '#12ec5c87'
               color: '#12ec5c87'
             })
             })
             .margin(10)
             .margin(10)
+            .height(60)
             .padding({left:15,right:15})
             .padding({left:15,right:15})
             .onClick(async () => {
             .onClick(async () => {
               this.showMkDialog()
               this.showMkDialog()
@@ -4176,6 +4161,7 @@ export struct LocalMusic {
               color: '#12ec5c87'
               color: '#12ec5c87'
             })
             })
             .margin(10)
             .margin(10)
+            .height(60)
             .onClick(async () => {
             .onClick(async () => {
               this.callFilePickerSelectFile()
               this.callFilePickerSelectFile()
               this.showAddSheet = !this.showAddSheet
               this.showAddSheet = !this.showAddSheet
@@ -4194,6 +4180,7 @@ export struct LocalMusic {
               color: '#12ec5c87'
               color: '#12ec5c87'
             })
             })
             .margin(10)
             .margin(10)
+            .height(60)
             .onClick(async () => {
             .onClick(async () => {
               this.goSelectMusic()
               this.goSelectMusic()
               this.showAddSheet = !this.showAddSheet
               this.showAddSheet = !this.showAddSheet
@@ -4209,6 +4196,7 @@ export struct LocalMusic {
               color: '#12ec5c87'
               color: '#12ec5c87'
             })
             })
             .margin(10)
             .margin(10)
+            .height(60)
             .onClick(async () => {
             .onClick(async () => {
               this.showTips()
               this.showTips()
               this.showAddSheet = !this.showAddSheet
               this.showAddSheet = !this.showAddSheet
@@ -4218,6 +4206,7 @@ export struct LocalMusic {
             symbolStartIcon: new SymbolGlyphModifier($r('sys.symbol.questionmark_circle')),
             symbolStartIcon: new SymbolGlyphModifier($r('sys.symbol.questionmark_circle')),
             content: '导入疑问'
             content: '导入疑问'
           })
           })
+            .height(60)
             .padding({left:15,right:15})
             .padding({left:15,right:15})
             .backgroundColor($r('app.color.silvery'))
             .backgroundColor($r('app.color.silvery'))
             .border({
             .border({
@@ -4226,12 +4215,13 @@ export struct LocalMusic {
             })
             })
             .margin(10)
             .margin(10)
             .onClick(async () => {
             .onClick(async () => {
-              this.showTips()
+              this.showProblomTips()
               this.showAddSheet = !this.showAddSheet
               this.showAddSheet = !this.showAddSheet
             })
             })
         }.attributeModifier(new MenuModifier())
         }.attributeModifier(new MenuModifier())
         .margin({bottom:30})
         .margin({bottom:30})
-        .width('100%')
+        .width('90%')
+        .borderRadius(15)
       }
       }
       .layoutWeight(1)
       .layoutWeight(1)
 
 
@@ -4241,6 +4231,35 @@ export struct LocalMusic {
   }
   }
 
 
 
 
+  async showProblomTips() {
+    try {
+      this.getUIContext().getPromptAction().showDialog({
+        title: '导入疑问',
+        message:'为什么有些歌曲导入成功后,内嵌标签或者其他功能不能用?:\n\n1、由于鸿蒙系统的安全策略,文件权限不够,请将文件移动到Download/天天静听目录下。' +
+          '这样内嵌标签功能就没有权限问题。\n\n2、导入可以也选择不复制,这样可以省略空间。\n\n',
+        buttons: [
+          {
+            text: '知道了',
+            color: '#000000'
+          },
+        ]
+      }, (err, data) => {
+        if (err) {
+          console.error('showDialog err: ' + err);
+          return;
+        }
+        console.info('showDialog success callback, click button: ' + data.index);
+      });
+    } catch (error) {
+      let message = (error as BusinessError).message;
+      let code = (error as BusinessError).code;
+      console.error(`showDialog args error code is ${code}, message is ${message}`);
+    };
+
+
+  }
+
+
   @Builder
   @Builder
   TagsContentCoverBuilder() {
   TagsContentCoverBuilder() {
     Scroll() {
     Scroll() {