Browse Source

隐私政策和用户协议放到关于我们

onecold 1 year ago
parent
commit
74b8224c85

+ 1 - 1
entry/src/main/ets/common/constants/PlayConstants.ets

@@ -97,7 +97,7 @@ export class PlayConstants {
   static readonly PROGRESS_PROGRESS_VAL: number = 0;
   static readonly PROGRESS_PROGRESS_VAL: number = 0;
   static readonly PROGRESS_INTERVAL: number = -1;
   static readonly PROGRESS_INTERVAL: number = -1;
   static readonly PROGRESS_STEP: number = 1;
   static readonly PROGRESS_STEP: number = 1;
-  static readonly PROGRESS_TRACK_THICKNESS: number = 3;
+  static readonly PROGRESS_TRACK_THICKNESS: number = 5;
   static readonly PROGRESS_SLIDER_WIDTH: string = '68.9%';
   static readonly PROGRESS_SLIDER_WIDTH: string = '68.9%';
   static readonly PROGRESS_MARGIN_LEFT: string = '2.2%';
   static readonly PROGRESS_MARGIN_LEFT: string = '2.2%';
   static readonly PROGRESS_SEEK_TIME: number = 0;
   static readonly PROGRESS_SEEK_TIME: number = 0;

+ 3 - 3
entry/src/main/ets/common/util/Utility.ets

@@ -941,10 +941,10 @@ export class Utility {
             videoItem.probe_score  = format.probe_score;
             videoItem.probe_score  = format.probe_score;
             videoItem.nb_streams  = format.nb_streams;
             videoItem.nb_streams  = format.nb_streams;
             videoItem.nb_programs  = format.nb_programs;
             videoItem.nb_programs  = format.nb_programs;
-            videoItem.year  = tags.TYER || tags.date ||tags.DATE|| 'unknown'; // try different tag names for year
+            videoItem.year  = tags.TYER || tags.date ||tags.DATE|| Utility.resourceToString(context, $r('app.string.unknown')); // try different tag names for year
             videoItem.lyricContent  = tags.LYRICS || tags.lyrics  ||  tags.USLT || tags.UNSYNCEDLYRICS || '';
             videoItem.lyricContent  = tags.LYRICS || tags.lyrics  ||  tags.USLT || tags.UNSYNCEDLYRICS || '';
-            videoItem.genre  = tags.genre||tags.GENRE||'unknown';
-            videoItem.track  = tags.track||tags.TRACK||'';
+            videoItem.genre  = tags.genre||tags.GENRE|| Utility.resourceToString(context, $r('app.string.unknown'));
+            videoItem.track  = tags.track||tags.TRACK|| Utility.resourceToString(context, $r('app.string.unknown'));
             // 检查是否有封面图片流
             // 检查是否有封面图片流
             const hasCover = metadata.streams.some(stream  =>
             const hasCover = metadata.streams.some(stream  =>
             stream.disposition?.attached_pic  === 1
             stream.disposition?.attached_pic  === 1

+ 5 - 1
entry/src/main/ets/entryability/EntryAbility.ets

@@ -58,7 +58,11 @@ export default class EntryAbility extends UIAbility {
         LogUtil.info( 'pura onWindowSizeChange currentWidthBreakpoint= '+widthBp);
         LogUtil.info( 'pura onWindowSizeChange currentWidthBreakpoint= '+widthBp);
         AppStorage.setOrCreate('windowWidth', windowSize.width);
         AppStorage.setOrCreate('windowWidth', windowSize.width);
         AppStorage.setOrCreate('windowHeight', windowSize.height);
         AppStorage.setOrCreate('windowHeight', windowSize.height);
-
+        if(windowSize.width > windowSize.height){
+            AppStorage.setOrCreate('isLandscape', true);
+        }else{
+            AppStorage.setOrCreate('isLandscape', false);
+        }
         LogUtil.info('hicar onWindowSizeChange width= '+windowSize.width);
         LogUtil.info('hicar onWindowSizeChange width= '+windowSize.width);
         LogUtil.info( 'hicar onWindowSizeChange height= '+windowSize.height);
         LogUtil.info( 'hicar onWindowSizeChange height= '+windowSize.height);
 
 

+ 38 - 21
entry/src/main/ets/pages/AboutPage.ets

@@ -143,46 +143,64 @@ export struct AboutPage{
         Column(){
         Column(){
 
 
           Image($r('app.media.icon'))
           Image($r('app.media.icon'))
-            .width(150)
-            .height(150)
+            .width(120)
+            .height(120)
             .borderRadius('100%')
             .borderRadius('100%')
             .clip(true)
             .clip(true)
-            .margin({top:55})
           Text(this.appName+'V:'+this.verName)
           Text(this.appName+'V:'+this.verName)
             .fontColor(this.isDarkMode ? Color.White : Color.Black)
             .fontColor(this.isDarkMode ? Color.White : Color.Black)
             .fontWeight(480)
             .fontWeight(480)
             .fontSize(17)
             .fontSize(17)
-            .margin({top:20,bottom:20})
+            .margin({top:20,bottom:10})
 
 
           Text(CommonConstants.ICP_NO)
           Text(CommonConstants.ICP_NO)
             .fontColor(this.isDarkMode ? Color.White : Color.Black)
             .fontColor(this.isDarkMode ? Color.White : Color.Black)
             .fontWeight(480)
             .fontWeight(480)
             .decoration({ type: TextDecorationType.Underline, color: this.isDarkMode ? Color.White : Color.Black })
             .decoration({ type: TextDecorationType.Underline, color: this.isDarkMode ? Color.White : Color.Black })
-            .fontSize(18)
-            .margin({top:20,bottom:20})
+            .fontSize(17)
+            .margin({top:10,bottom:10})
             .onClick(()=>{
             .onClick(()=>{
-              // let want = {
-              //   action: "ohos.want.action.viewData",
-              //   uri: CommonConstants.ICP_URL
-              // };
-
                 let context = this.getUIContext().getHostContext() as common.UIAbilityContext;
                 let context = this.getUIContext().getHostContext() as common.UIAbilityContext;
                 context.openLink(CommonConstants.ICP_URL, {})
                 context.openLink(CommonConstants.ICP_URL, {})
             })
             })
 
 
-          Button('加入Q群:685109858', { type: ButtonType.Capsule, stateEffect: false })
+          Button('用户协议', { type: ButtonType.Capsule, stateEffect: false })
+            .width(this.currentBreakpoint !== BreakpointTypeEnum.SM?'25%':'60%')
+            .height(55)
+            .margin({top:10,bottom:10})
+            .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.7})
+            .stateEffect(true)
+            .backgroundColor(this.themeColor)
+            .onClick(()=>{
+              router.pushUrl({
+                url: 'pages/WebIndex',
+                params: { titleName: '用户协议', webUrl: CommonConstants.NEW_DUTY }
+              });
+            })
+          Button('隐私政策', { type: ButtonType.Capsule, stateEffect: false })
             .width(this.currentBreakpoint !== BreakpointTypeEnum.SM?'25%':'60%')
             .width(this.currentBreakpoint !== BreakpointTypeEnum.SM?'25%':'60%')
             .height(55)
             .height(55)
-            .margin({top:50,bottom:20})
-              // .visibility(Visibility.None)
+            .margin({top:10,bottom:10})
+            .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.7})
             .stateEffect(true)
             .stateEffect(true)
             .backgroundColor(this.themeColor)
             .backgroundColor(this.themeColor)
-            .stateStyles({
-              pressed: { opacity: 0.6 }
+            .onClick(()=>{
+              router.pushUrl({
+                url: 'pages/WebIndex',
+                params: { titleName: '隐私政策', webUrl: CommonConstants.NEW_YS_HW }
+              });
             })
             })
+
+          Button('粉丝QQ群', { type: ButtonType.Capsule, stateEffect: false })
+            .width(this.currentBreakpoint !== BreakpointTypeEnum.SM?'25%':'60%')
+            .height(55)
+            .margin({top:10,bottom:20})
+            .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.7})
+            .stateEffect(true)
+            .backgroundColor(this.themeColor)
             .onClick(()=>{
             .onClick(()=>{
-              // ToastUtil.showToast('复制群号成功!')
-              // Utility.copyText('685109858')
+              ToastUtil.showToast('复制群号成功!')
+              Utility.copyText('685109858')
               const qqUrl = `mqqapi://card/show_pslcard?src_type=internal&version=1&uin=${CommonConstants.QQ_GROUP}&card_type=group&source=external`;
               const qqUrl = `mqqapi://card/show_pslcard?src_type=internal&version=1&uin=${CommonConstants.QQ_GROUP}&card_type=group&source=external`;
               let context = this.getUIContext().getHostContext() as common.UIAbilityContext;
               let context = this.getUIContext().getHostContext() as common.UIAbilityContext;
               context.openLink(qqUrl, {})
               context.openLink(qqUrl, {})
@@ -193,10 +211,8 @@ export struct AboutPage{
             .height(55)
             .height(55)
             .stateEffect(true)
             .stateEffect(true)
             .margin({bottom:20})
             .margin({bottom:20})
+            .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.7})
             .backgroundColor(this.themeColor)
             .backgroundColor(this.themeColor)
-            .stateStyles({
-              pressed: { opacity: 0.6 }
-            })
             .onClick(()=>{
             .onClick(()=>{
               AlertDialog.show({
               AlertDialog.show({
                 title:'发送邮件',
                 title:'发送邮件',
@@ -216,6 +232,7 @@ export struct AboutPage{
               })
               })
             })
             })
         }
         }
+        .justifyContent(FlexAlign.Start)
         .width('100%')
         .width('100%')
 
 
       }
       }

+ 15 - 7
entry/src/main/ets/view/LocalMusic.ets

@@ -206,6 +206,7 @@ export struct LocalMusic {
   @StorageProp('windowWidth') windowWidth: number = 0;
   @StorageProp('windowWidth') windowWidth: number = 0;
   @StorageProp('windowHeight') windowHeight: number = 0;
   @StorageProp('windowHeight') windowHeight: number = 0;
   @StorageProp('isHiCarStatus') isHiCarStatus: boolean = false;
   @StorageProp('isHiCarStatus') isHiCarStatus: boolean = false;
+  private UNKONWN:string = '';
   private listArea: Area = {
   private listArea: Area = {
     width: 0,
     width: 0,
     height: 0,
     height: 0,
@@ -448,6 +449,7 @@ export struct LocalMusic {
   // 组件生命周期
   // 组件生命周期
   aboutToAppear() {
   aboutToAppear() {
     this.initSetting()
     this.initSetting()
+    this.UNKONWN = Utility.resourceToString(this.context, $r('app.string.unknown'));
     this.topRectHeight = px2vp(AppUtil.getStatusBarHeight());
     this.topRectHeight = px2vp(AppUtil.getStatusBarHeight());
     Utility.getAppName(getContext(this)).then((appName: string) => {
     Utility.getAppName(getContext(this)).then((appName: string) => {
       this.appName = appName
       this.appName = appName
@@ -2820,7 +2822,8 @@ export struct LocalMusic {
                     .padding({ top: 8 })
                     .padding({ top: 8 })
                     .maxLines(1)
                     .maxLines(1)
                     .visibility(StrUtil.isEmpty(this.videoLocalList[0].genre)||
                     .visibility(StrUtil.isEmpty(this.videoLocalList[0].genre)||
-                    this.videoLocalList[0].genre.includes('unknown')?Visibility.None:Visibility.Visible)
+                    this.videoLocalList[0].genre.includes(this.UNKONWN)
+                      ?Visibility.None:Visibility.Visible)
                     .fontWeight(FontWeight.Bold)
                     .fontWeight(FontWeight.Bold)
                     .fontColor($r('app.color.text_color'))
                     .fontColor($r('app.color.text_color'))
                     .margin({ left: this.currentLyricAlignMode === 0 ? 18 : 0 })
                     .margin({ left: this.currentLyricAlignMode === 0 ? 18 : 0 })
@@ -2831,7 +2834,8 @@ export struct LocalMusic {
                     .padding({ top: 8 })
                     .padding({ top: 8 })
                     .maxLines(1)
                     .maxLines(1)
                     .visibility(StrUtil.isEmpty(this.videoLocalList[0].year)||
                     .visibility(StrUtil.isEmpty(this.videoLocalList[0].year)||
-                    this.videoLocalList[0].year.includes('unknown')?Visibility.None:Visibility.Visible)
+                       this.videoLocalList[0].year.includes(this.UNKONWN)
+                      ?Visibility.None:Visibility.Visible)
                     .fontWeight(FontWeight.Bold)
                     .fontWeight(FontWeight.Bold)
                     .fontColor($r('app.color.text_color'))
                     .fontColor($r('app.color.text_color'))
                     .margin({ left: this.currentLyricAlignMode === 0 ? 18 : 0 })
                     .margin({ left: this.currentLyricAlignMode === 0 ? 18 : 0 })
@@ -6118,7 +6122,11 @@ export struct LocalMusic {
     .backgroundBrightness({ rate: this.isPuraWP() ? 0.1 : 0, lightUpDegree: -0.1 })
     .backgroundBrightness({ rate: this.isPuraWP() ? 0.1 : 0, lightUpDegree: -0.1 })
     .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
     .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
     .onClick(() => {
     .onClick(() => {
-      this.startAutoHide()
+      // this.startAutoHide()
+      this.is_auto_hide_progress = false
+      setTimeout(() => {
+        this.is_auto_hide_progress = true
+      }, 6000)
     })
     })
   }
   }
 
 
@@ -6163,7 +6171,7 @@ export struct LocalMusic {
   private positionX: number = PlayConstants.POSITION_X;
   private positionX: number = PlayConstants.POSITION_X;
   private positionY: number = PlayConstants.POSITION_Y;
   private positionY: number = PlayConstants.POSITION_Y;
   private windowClass: window.Window = globalThis.windowClass
   private windowClass: window.Window = globalThis.windowClass
-  @State volume: number = 0.5;
+  @State volume: number = 0.3;
   @State volumeShow: boolean = PlayConstants.VOLUME_SHOW;
   @State volumeShow: boolean = PlayConstants.VOLUME_SHOW;
   @State bright: number = PlayConstants.BRIGHT;
   @State bright: number = PlayConstants.BRIGHT;
   @State brightShow: boolean = PlayConstants.BRIGHT_SHOW;
   @State brightShow: boolean = PlayConstants.BRIGHT_SHOW;
@@ -7070,13 +7078,13 @@ export struct LocalMusic {
         style: SliderStyle.OutSet
         style: SliderStyle.OutSet
       })
       })
         .width('600px')
         .width('600px')
-        .blockColor(Color.White)
-        .trackColor($r('app.color.track_color'))
+        .blockColor('rgba(255,255,255,1)')
+        .trackColor('rgba(255,255,255,0.3)')
         .selectedColor(Color.White)
         .selectedColor(Color.White)
         .trackThickness(PlayConstants.PROGRESS_TRACK_THICKNESS)
         .trackThickness(PlayConstants.PROGRESS_TRACK_THICKNESS)
         .layoutWeight(1)
         .layoutWeight(1)
         .margin({ left: PlayConstants.PROGRESS_MARGIN_LEFT })
         .margin({ left: PlayConstants.PROGRESS_MARGIN_LEFT })
-        .showSteps(true)
+        .showSteps(false)
         .showTips(true)
         .showTips(true)
         .enabled(this.slideEnable)
         .enabled(this.slideEnable)
         .onChange((value: number, mode: SliderChangeMode) => {
         .onChange((value: number, mode: SliderChangeMode) => {

+ 4 - 4
entry/src/main/ets/viewmodel/MainViewModel.ets

@@ -56,8 +56,8 @@ export  class  MainViewModel{
       new ItemData($r('app.string.setting'),  { type: 'symbol', value: $r('sys.symbol.gearshape') },MainViewModel.MENU_SETTING,false),
       new ItemData($r('app.string.setting'),  { type: 'symbol', value: $r('sys.symbol.gearshape') },MainViewModel.MENU_SETTING,false),
       new ItemData($r('app.string.about_me'), { type: 'symbol', value: $r('sys.symbol.info_shield') },MainViewModel.MENU_ABOUT,false),
       new ItemData($r('app.string.about_me'), { type: 'symbol', value: $r('sys.symbol.info_shield') },MainViewModel.MENU_ABOUT,false),
       new ItemData($r('app.string.haoping'), { type: 'symbol', value: $r('sys.symbol.flower') },MainViewModel.MENU_HAOPING,false),
       new ItemData($r('app.string.haoping'), { type: 'symbol', value: $r('sys.symbol.flower') },MainViewModel.MENU_HAOPING,false),
-      new ItemData($r('app.string.persion_duty'),{ type: 'symbol', value: $r('sys.symbol.doc_plaintext') },MainViewModel.MENU_DUTY,false),
-      new ItemData($r('app.string.yszc'), { type: 'symbol', value: $r('sys.symbol.lock') },MainViewModel.MENU_YSZC,false),
+      // new ItemData($r('app.string.persion_duty'),{ type: 'symbol', value: $r('sys.symbol.doc_plaintext') },MainViewModel.MENU_DUTY,false),
+      // new ItemData($r('app.string.yszc'), { type: 'symbol', value: $r('sys.symbol.lock') },MainViewModel.MENU_YSZC,false),
       new ItemData($r('app.string.share_tt'),  { type: 'symbol', value: $r('sys.symbol.share') },MainViewModel.MENU_SHARE,false),
       new ItemData($r('app.string.share_tt'),  { type: 'symbol', value: $r('sys.symbol.share') },MainViewModel.MENU_SHARE,false),
       // new ItemData($r('app.string.nor_setting'), $r('app.media.hm_gps'),MainViewModel.MENU_SETTING,false),
       // new ItemData($r('app.string.nor_setting'), $r('app.media.hm_gps'),MainViewModel.MENU_SETTING,false),
     ];
     ];
@@ -73,8 +73,8 @@ export  class  MainViewModel{
       new ItemData($r('app.string.about_me'), { type: 'symbol', value: $r('sys.symbol.info_shield') },MainViewModel.MENU_ABOUT,false),
       new ItemData($r('app.string.about_me'), { type: 'symbol', value: $r('sys.symbol.info_shield') },MainViewModel.MENU_ABOUT,false),
       // new ItemData($r('app.string.vip'), { type: 'symbol', value: $r('sys.symbol.vip_hand') }, MainViewModel.MENU_VIP, false),
       // new ItemData($r('app.string.vip'), { type: 'symbol', value: $r('sys.symbol.vip_hand') }, MainViewModel.MENU_VIP, false),
       new ItemData($r('app.string.haoping'), { type: 'symbol', value: $r('sys.symbol.flower') },MainViewModel.MENU_HAOPING,false),
       new ItemData($r('app.string.haoping'), { type: 'symbol', value: $r('sys.symbol.flower') },MainViewModel.MENU_HAOPING,false),
-      new ItemData($r('app.string.persion_duty'),{ type: 'symbol', value: $r('sys.symbol.doc_plaintext') },MainViewModel.MENU_DUTY,false),
-      new ItemData($r('app.string.yszc'), { type: 'symbol', value: $r('sys.symbol.lock') },MainViewModel.MENU_YSZC,false),
+      // new ItemData($r('app.string.persion_duty'),{ type: 'symbol', value: $r('sys.symbol.doc_plaintext') },MainViewModel.MENU_DUTY,false),
+      // new ItemData($r('app.string.yszc'), { type: 'symbol', value: $r('sys.symbol.lock') },MainViewModel.MENU_YSZC,false),
       new ItemData($r('app.string.share_tt'),  { type: 'symbol', value: $r('sys.symbol.share') },MainViewModel.MENU_SHARE,false),
       new ItemData($r('app.string.share_tt'),  { type: 'symbol', value: $r('sys.symbol.share') },MainViewModel.MENU_SHARE,false),
     ];
     ];
     return drawerGridData;
     return drawerGridData;

+ 4 - 0
entry/src/main/resources/base/element/string.json

@@ -451,6 +451,10 @@
     {
     {
       "name": "sync_dataing",
       "name": "sync_dataing",
       "value": "正在校正数据"
       "value": "正在校正数据"
+    },
+    {
+      "name": "unknown",
+      "value": "unknown"
     }
     }
   ]
   ]
 }
 }

+ 3 - 2
entry/src/main/resources/zh_CN/element/string.json

@@ -200,9 +200,10 @@
       "name": "current_play_list",
       "name": "current_play_list",
       "value": "播放列表"
       "value": "播放列表"
     },
     },
+
     {
     {
-      "name": "reason_copymusic",
-      "value": ""
+      "name": "unknown",
+      "value": "未知"
     }
     }
   ]
   ]
 }
 }