|
|
@@ -41,8 +41,10 @@ export struct SettingPage {
|
|
|
static readonly BG_BRIGHTNESS: string = 'bg_brightness';
|
|
|
static readonly IS_SHOW_ALLBAR: string = 'IS_SHOW_ALLBAR';
|
|
|
static readonly IS_SHOW_TITLTBAR: string = 'IS_SHOW_TITLTBAR';
|
|
|
+ static readonly IS_SHOW_PLAYPAGE_BACK: string = 'IS_SHOW_PLAYPAGE_BACK';
|
|
|
static readonly IS_CIRCLE_BTN: string = 'isCircleBtn';
|
|
|
static readonly IS_COVER_TOP: string = 'IS_COVER_TOP';
|
|
|
+ static readonly IS_COVER_TOP_BIG: string = 'IS_COVER_TOP_BIG';
|
|
|
public static THEME_COLOR_KEY: string = 'THEME_COLOR';
|
|
|
public static TWO_FINGER_TYPE: string = 'twoFingerType';
|
|
|
public static THEME_COLOR_LIST: Array<ThemeColorItem> = [
|
|
|
@@ -80,6 +82,7 @@ export struct SettingPage {
|
|
|
@State isShowSimi: boolean = false //是否显示私密音频
|
|
|
@State isShowFAV: boolean = true //是否显示我的收藏
|
|
|
@State isShowHistory: boolean = true //是否显示最近播放
|
|
|
+ @State isShowPlayPageBack: boolean = false //是否显示播放页返回键
|
|
|
@State isCustomizeBg: boolean = false //自定义背景界面
|
|
|
@State isCustomizeBgSheet: boolean = false //自定义背景界面
|
|
|
@State isShowTitleBar: boolean = true //是否显示分类导航条
|
|
|
@@ -93,6 +96,8 @@ export struct SettingPage {
|
|
|
@State isSameTimePlay: boolean = false //是否和其他app同时播放
|
|
|
@State isSavePlayMode: boolean = true
|
|
|
@State isCoverTop: boolean = true
|
|
|
+ @State isCoverTopBig: boolean = false//顶部大封面部分手机显示会和播放控制页重叠
|
|
|
+
|
|
|
@State customizeBgPath: string | undefined = '';
|
|
|
context = getContext(this);
|
|
|
@State showCoverApiDialog: boolean = false
|
|
|
@@ -203,6 +208,8 @@ export struct SettingPage {
|
|
|
this.isCoverTop = PreferencesUtil.getBooleanSync(SettingPage.IS_COVER_TOP, false)
|
|
|
this.isShowTitleBar = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_TITLTBAR, true)
|
|
|
this.isShowAllBar = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_ALLBAR, true)
|
|
|
+ this.isShowPlayPageBack = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_PLAYPAGE_BACK, false)
|
|
|
+ this.isCoverTopBig = PreferencesUtil.getBooleanSync(SettingPage.IS_COVER_TOP_BIG, false)
|
|
|
// 只用 themeMode 控制主题
|
|
|
this.themeMode = PreferencesUtil.getNumberSync(SettingPage.THEME_MODE, 0)
|
|
|
this.applyThemeMode(this.themeMode)
|
|
|
@@ -665,7 +672,7 @@ export struct SettingPage {
|
|
|
|
|
|
// 网格封面大
|
|
|
Row() {
|
|
|
- Text('大封面')
|
|
|
+ Text('列表封面大小')
|
|
|
.margin({ left: 18 })
|
|
|
.fontSize(15)
|
|
|
.fontColor(Color.Gray)
|
|
|
@@ -714,6 +721,32 @@ export struct SettingPage {
|
|
|
.height(55)
|
|
|
.clickEffect({ level: ClickEffectLevel.HEAVY })
|
|
|
|
|
|
+ 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.isCoverTopBig })
|
|
|
+ .selectedColor(this.themeColor)
|
|
|
+ .switchPointColor(Color.White)
|
|
|
+ .margin({ right: 18 })
|
|
|
+ .onChange((checked: boolean) => {
|
|
|
+ this.isCoverTopBig = checked;
|
|
|
+ if(this.isCoverTopBig){
|
|
|
+ ToastUtil.showToast('启动该开关部分设备封面太大导致和音乐控制重叠!')
|
|
|
+ }
|
|
|
+ PreferencesUtil.put(SettingPage.IS_COVER_TOP_BIG, this.isCoverTopBig)
|
|
|
+ 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'))
|
|
|
@@ -1078,6 +1111,31 @@ export struct SettingPage {
|
|
|
.height(55)
|
|
|
.clickEffect({ level: ClickEffectLevel.HEAVY })
|
|
|
|
|
|
+
|
|
|
+ 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.isShowPlayPageBack })
|
|
|
+ .selectedColor(this.themeColor)
|
|
|
+ .switchPointColor(Color.White)
|
|
|
+ .margin({ right: 18 })
|
|
|
+ .onChange((checked: boolean) => {
|
|
|
+ this.isShowPlayPageBack = checked;
|
|
|
+ PreferencesUtil.put(SettingPage.IS_SHOW_PLAYPAGE_BACK, this.isShowPlayPageBack)
|
|
|
+ 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'))
|
|
|
// 显示我的收藏
|
|
|
Row() {
|