|
@@ -51,6 +51,7 @@ export struct SettingPage {
|
|
|
static readonly IS_COVER_TOP_BIG: string = 'IS_COVER_TOP_BIG';
|
|
static readonly IS_COVER_TOP_BIG: string = 'IS_COVER_TOP_BIG';
|
|
|
public static THEME_COLOR_KEY: string = 'THEME_COLOR';
|
|
public static THEME_COLOR_KEY: string = 'THEME_COLOR';
|
|
|
public static TWO_FINGER_TYPE: string = 'twoFingerType';
|
|
public static TWO_FINGER_TYPE: string = 'twoFingerType';
|
|
|
|
|
+ public static LONG_PRESS_SPEED: string = 'longPressSpeed';
|
|
|
public static THEME_COLOR_LIST: Array<ThemeColorItem> = [
|
|
public static THEME_COLOR_LIST: Array<ThemeColorItem> = [
|
|
|
{ name: '玫瑰粉', color: '#FF4081', isVip: false },
|
|
{ name: '玫瑰粉', color: '#FF4081', isVip: false },
|
|
|
{ name: '经典蓝', color: '#0A59F7', isVip: false },
|
|
{ name: '经典蓝', color: '#0A59F7', isVip: false },
|
|
@@ -92,6 +93,7 @@ export struct SettingPage {
|
|
|
@State isCustomizeBgSheet: boolean = false //自定义背景界面
|
|
@State isCustomizeBgSheet: boolean = false //自定义背景界面
|
|
|
@State isShowTitleBar: boolean = true //是否显示分类导航条
|
|
@State isShowTitleBar: boolean = true //是否显示分类导航条
|
|
|
@State isShowAllBar: boolean = true //是否显示播放全部条
|
|
@State isShowAllBar: boolean = true //是否显示播放全部条
|
|
|
|
|
+ @State longPressSpeed: number = 3 //长按默认倍数
|
|
|
@State blurValue: number = 0 //背景模糊
|
|
@State blurValue: number = 0 //背景模糊
|
|
|
@State bgBrightness: number = 0 //背景亮度
|
|
@State bgBrightness: number = 0 //背景亮度
|
|
|
@State isGridMusic: boolean = true //是否网格布局
|
|
@State isGridMusic: boolean = true //是否网格布局
|
|
@@ -216,6 +218,7 @@ export struct SettingPage {
|
|
|
this.isShowPlayPageBack = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_PLAYPAGE_BACK, false)
|
|
this.isShowPlayPageBack = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_PLAYPAGE_BACK, false)
|
|
|
this.isShowSingleLineLyric = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_SLLYRIC, false)
|
|
this.isShowSingleLineLyric = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_SLLYRIC, false)
|
|
|
this.isCoverTopBig = PreferencesUtil.getBooleanSync(SettingPage.IS_COVER_TOP_BIG, false)
|
|
this.isCoverTopBig = PreferencesUtil.getBooleanSync(SettingPage.IS_COVER_TOP_BIG, false)
|
|
|
|
|
+ this.longPressSpeed = PreferencesUtil.getNumberSync(SettingPage.LONG_PRESS_SPEED, 3)
|
|
|
// 只用 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)
|
|
@@ -891,6 +894,46 @@ 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'))
|
|
|
|
|
+
|
|
|
|
|
+ // 长按默认倍数
|
|
|
|
|
+ Row() {
|
|
|
|
|
+ Text('长按默认倍数')
|
|
|
|
|
+ .margin({ left: 18 })
|
|
|
|
|
+ .fontSize(15)
|
|
|
|
|
+ .fontColor(Color.Gray)
|
|
|
|
|
+ .fontWeight(480)
|
|
|
|
|
+ .layoutWeight(1)
|
|
|
|
|
+ Select([//倍速
|
|
|
|
|
+ { value: '0.25x' },
|
|
|
|
|
+ { value: '0.5x' },
|
|
|
|
|
+ { value: '0.75x' },
|
|
|
|
|
+ { value: '1x' },
|
|
|
|
|
+ { value: '1.25x' },
|
|
|
|
|
+ { value: '1.5x' },
|
|
|
|
|
+ { value: '1.75x' },
|
|
|
|
|
+ { value: '2x' },
|
|
|
|
|
+ { value: '2.5x' },
|
|
|
|
|
+ { value: '3x' }])
|
|
|
|
|
+ .font({ size: 15, weight: FontWeight.Medium })
|
|
|
|
|
+ .fontColor(Color.Gray)
|
|
|
|
|
+ .margin({right:18})
|
|
|
|
|
+ .selected(CommonConstants.video_speed_list.indexOf(this.longPressSpeed))
|
|
|
|
|
+ .value(Utility.optimizedFormat(this.longPressSpeed))
|
|
|
|
|
+ .onSelect(async (_index: number, text?: string | undefined) => {
|
|
|
|
|
+ let speed = parseFloat(text?.replace('x', '') || '1');
|
|
|
|
|
+ if (!CommonConstants.video_speed_list.includes(speed)) {
|
|
|
|
|
+ speed = 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.longPressSpeed = speed
|
|
|
|
|
+ PreferencesUtil.put(SettingPage.LONG_PRESS_SPEED, this.longPressSpeed)
|
|
|
|
|
+ this.sendChangeEvent()
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ .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() {
|