|
@@ -22,6 +22,8 @@ import { FastForwardSecondInterface } from './FastForwardSecondInterface'
|
|
|
// @Entry
|
|
// @Entry
|
|
|
@Component
|
|
@Component
|
|
|
export struct SettingPage {
|
|
export struct SettingPage {
|
|
|
|
|
+ @State isCopyFileToDownLoad: boolean = false
|
|
|
|
|
+ static readonly IS_COPYFILE_TO_DOWNLOAD: string = 'isCopyFileToDownLoad';
|
|
|
@State fastForwardSeconds: string = '10'
|
|
@State fastForwardSeconds: string = '10'
|
|
|
@State isShowBackFast: boolean = true//快进快退按钮
|
|
@State isShowBackFast: boolean = true//快进快退按钮
|
|
|
@Consume isShowDrawer: boolean;
|
|
@Consume isShowDrawer: boolean;
|
|
@@ -261,6 +263,7 @@ export struct SettingPage {
|
|
|
this.isLongNameRoLL = PreferencesUtil.getBooleanSync('isLongNameRoLL', true)
|
|
this.isLongNameRoLL = PreferencesUtil.getBooleanSync('isLongNameRoLL', true)
|
|
|
this.isShowBackFast = PreferencesUtil.getBooleanSync('isShowBackFast', false)
|
|
this.isShowBackFast = PreferencesUtil.getBooleanSync('isShowBackFast', false)
|
|
|
this.fastForwardSeconds = PreferencesUtil.getStringSync('fastForwardSeconds', '10')
|
|
this.fastForwardSeconds = PreferencesUtil.getStringSync('fastForwardSeconds', '10')
|
|
|
|
|
+ this.isCopyFileToDownLoad = PreferencesUtil.getBooleanSync(SettingPage.IS_COPYFILE_TO_DOWNLOAD, false)
|
|
|
// 只用 themeMode 控制主题
|
|
// 只用 themeMode 控制主题
|
|
|
this.themeMode = PreferencesUtil.getNumberSync(SettingPage.THEME_MODE, 0)
|
|
this.themeMode = PreferencesUtil.getNumberSync(SettingPage.THEME_MODE, 0)
|
|
|
this.applyThemeMode(this.themeMode)
|
|
this.applyThemeMode(this.themeMode)
|
|
@@ -585,13 +588,6 @@ export struct SettingPage {
|
|
|
Scroll() {
|
|
Scroll() {
|
|
|
Column() {
|
|
Column() {
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- // API设置分组
|
|
|
|
|
- this.apiBuilder()
|
|
|
|
|
- //设置教程
|
|
|
|
|
- this.jcBuilder()
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
// 主题设置分组
|
|
// 主题设置分组
|
|
|
Column() {
|
|
Column() {
|
|
|
Row() {
|
|
Row() {
|
|
@@ -797,6 +793,39 @@ export struct SettingPage {
|
|
|
.height(55)
|
|
.height(55)
|
|
|
.clickEffect({ level: ClickEffectLevel.HEAVY })
|
|
.clickEffect({ level: ClickEffectLevel.HEAVY })
|
|
|
|
|
|
|
|
|
|
+ Line().width('100%').height(0.3).backgroundColor($r('app.color.index_tab_unselected_font_color'))
|
|
|
|
|
+
|
|
|
|
|
+ //导入视频复制一份到DownLoad目录
|
|
|
|
|
+ Row() {
|
|
|
|
|
+ SymbolGlyph($r('sys.symbol.save'))
|
|
|
|
|
+ .fontSize(20)
|
|
|
|
|
+ .fontColor([this.themeColor])
|
|
|
|
|
+ .alignSelf(ItemAlign.Center)
|
|
|
|
|
+ .margin({ left: 15 })
|
|
|
|
|
+ Text('导入音乐复制到DownLoad目录')
|
|
|
|
|
+ .margin({ left: 8 })
|
|
|
|
|
+ .fontSize(15)
|
|
|
|
|
+ .fontColor(Color.Gray)
|
|
|
|
|
+ .fontWeight(480)
|
|
|
|
|
+ .layoutWeight(1)
|
|
|
|
|
+ Toggle({ type: ToggleType.Switch, isOn: this.isCopyFileToDownLoad })
|
|
|
|
|
+ .selectedColor(this.themeColor)
|
|
|
|
|
+ .switchPointColor(Color.White)
|
|
|
|
|
+ .margin({ right: 18 })
|
|
|
|
|
+ .onChange((checked: boolean) => {
|
|
|
|
|
+ // if(!this.isCopyFileToDownLoad){
|
|
|
|
|
+ // ToastUtil.showToast("读取内嵌封面和歌词功能需要开启导入复制开关,不然没有权限读取。")
|
|
|
|
|
+ // }
|
|
|
|
|
+ this.isCopyFileToDownLoad = checked;
|
|
|
|
|
+ PreferencesUtil.put(SettingPage.IS_COPYFILE_TO_DOWNLOAD, this.isCopyFileToDownLoad)
|
|
|
|
|
+ this.sendChangeEvent()
|
|
|
|
|
+ })
|
|
|
|
|
+ .width(50)
|
|
|
|
|
+ .height(30);
|
|
|
|
|
+ }
|
|
|
|
|
+ .height(55)
|
|
|
|
|
+ .clickEffect({level:ClickEffectLevel.HEAVY})
|
|
|
|
|
+
|
|
|
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() {
|
|
Row() {
|
|
@@ -1546,6 +1575,11 @@ export struct SettingPage {
|
|
|
})
|
|
})
|
|
|
.padding(0)
|
|
.padding(0)
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // API设置分组
|
|
|
|
|
+ this.apiBuilder()
|
|
|
|
|
+ //设置教程
|
|
|
|
|
+ this.jcBuilder()
|
|
|
//显示与隐藏设置
|
|
//显示与隐藏设置
|
|
|
this.xsBuilder()
|
|
this.xsBuilder()
|
|
|
|
|
|