|
|
@@ -99,7 +99,7 @@ export struct SettingPage {
|
|
|
static readonly IS_AUTO_HIDE_PROGRESS: string = 'IS_AUTO_HIDE_PROGRESS';
|
|
|
public static OPEN_SKIPSONG_ANIMATE: string = 'openSkipSongAnimate';
|
|
|
@State autoParseMusicName: boolean = false
|
|
|
- @State idDefaultMediaKu: boolean = false
|
|
|
+ @State defalut_home_type:number = 0
|
|
|
private fastForwardSecond: FastForwardSecondInterface[] = [
|
|
|
{ label: '5秒', value: '5' },
|
|
|
{ label: '10秒', value: '10' },
|
|
|
@@ -256,6 +256,7 @@ export struct SettingPage {
|
|
|
|
|
|
// 组件生命周期
|
|
|
aboutToAppear() {
|
|
|
+ this.defalut_home_type = PreferencesUtil.getNumberSync('defalut_home_type', 0)
|
|
|
this.showZMIndex = PreferencesUtil.getBooleanSync('showZMIndex', false)
|
|
|
this.autoHideTitle = PreferencesUtil.getBooleanSync('autoHideTitle', true)
|
|
|
this.isShowPrecious = PreferencesUtil.getBooleanSync('isShowPrecious', false)
|
|
|
@@ -295,7 +296,6 @@ export struct SettingPage {
|
|
|
this.openSkipSongAnimate = PreferencesUtil.getBooleanSync(SettingPage.OPEN_SKIPSONG_ANIMATE, true)
|
|
|
this.volumeSmall = PreferencesUtil.getBooleanSync('volumeSmall', false)
|
|
|
this.autoParseMusicName = PreferencesUtil.getBooleanSync('autoParseMusicName', true)
|
|
|
- this.idDefaultMediaKu = PreferencesUtil.getBooleanSync('idDefaultMediaKu', false)
|
|
|
this.isShowFileName = PreferencesUtil.getBooleanSync('isShowFileName', false)
|
|
|
this.isLongNameRoLL = PreferencesUtil.getBooleanSync('isLongNameRoLL', true)
|
|
|
this.isShowBackFast = PreferencesUtil.getBooleanSync('isShowBackFast', false)
|
|
|
@@ -1652,35 +1652,45 @@ 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() {
|
|
|
- SymbolGlyph($r('sys.symbol.identify_song'))
|
|
|
+ SymbolGlyph($r('sys.symbol.home_button'))
|
|
|
.fontSize(20)
|
|
|
.fontColor([this.themeColor])
|
|
|
.alignSelf(ItemAlign.Center)
|
|
|
.margin({ left: 15 })
|
|
|
- Text('首页默认媒体库')
|
|
|
+ Text('首页默认')
|
|
|
.margin({ left: 8 })
|
|
|
.fontSize(15)
|
|
|
.fontColor(Color.Gray)
|
|
|
.fontWeight(480)
|
|
|
.layoutWeight(1)
|
|
|
- Toggle({ type: ToggleType.Switch, isOn: this.idDefaultMediaKu })
|
|
|
- .selectedColor(this.themeColor)
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
- .switchPointColor(Color.White)
|
|
|
+ Select([
|
|
|
+ { value: CommonConstants.DEFAULT_HOME_TYPE[0] },
|
|
|
+ { value: CommonConstants.DEFAULT_HOME_TYPE[1] },
|
|
|
+ { value: CommonConstants.DEFAULT_HOME_TYPE[2] },
|
|
|
+ { value: CommonConstants.DEFAULT_HOME_TYPE[3] },
|
|
|
+ { value: CommonConstants.DEFAULT_HOME_TYPE[4] }
|
|
|
+ ])
|
|
|
+ .font({ size: 15, weight: FontWeight.Medium })
|
|
|
+ .fontColor(Color.Gray)
|
|
|
.margin({ right: 18 })
|
|
|
- .onChange((checked: boolean) => {
|
|
|
- this.idDefaultMediaKu = checked;
|
|
|
- PreferencesUtil.put('idDefaultMediaKu', this.idDefaultMediaKu)
|
|
|
+ .selected(this.defalut_home_type)
|
|
|
+ .value(CommonConstants.DEFAULT_HOME_TYPE[this.defalut_home_type])
|
|
|
+ .onSelect(async (_index: number, text?: string | undefined) => {
|
|
|
+ this.defalut_home_type = _index
|
|
|
+ PreferencesUtil.put('defalut_home_type', this.defalut_home_type)
|
|
|
+ this.sendChangeEvent()
|
|
|
})
|
|
|
- .width(50)
|
|
|
- .height(30);
|
|
|
}
|
|
|
.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() {
|
|
|
SymbolGlyph($r('sys.symbol.text_clipboard'))
|