mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: 默认启动页设置 issues #483
This commit is contained in:
@@ -14,6 +14,7 @@ import 'package:PiliPalaX/utils/storage.dart';
|
||||
|
||||
import '../../models/common/dynamic_badge_mode.dart';
|
||||
import '../../plugin/pl_player/utils/fullscreen.dart';
|
||||
import '../../models/common/nav_bar_config.dart';
|
||||
import 'controller.dart';
|
||||
import 'widgets/switch_item.dart';
|
||||
|
||||
@@ -31,7 +32,6 @@ class _StyleSettingState extends State<StyleSetting> {
|
||||
|
||||
Box setting = GStrorage.setting;
|
||||
late int picQuality;
|
||||
late double toastOpacity;
|
||||
late ThemeType _tempThemeValue;
|
||||
late double maxRowWidth;
|
||||
|
||||
@@ -39,7 +39,6 @@ class _StyleSettingState extends State<StyleSetting> {
|
||||
void initState() {
|
||||
super.initState();
|
||||
picQuality = setting.get(SettingBoxKey.defaultPicQa, defaultValue: 10);
|
||||
toastOpacity = setting.get(SettingBoxKey.defaultToastOp, defaultValue: 1.0);
|
||||
_tempThemeValue = settingController.themeType.value;
|
||||
maxRowWidth = setting.get(SettingBoxKey.maxRowWidth, defaultValue: 240.0) as double;
|
||||
}
|
||||
@@ -264,6 +263,14 @@ class _StyleSettingState extends State<StyleSetting> {
|
||||
'当前主题:${colorSelectController.type.value == 0 ? '动态取色' : '指定颜色'}',
|
||||
style: subTitleStyle)),
|
||||
),
|
||||
ListTile(
|
||||
dense: false,
|
||||
onTap: () => settingController.seteDefaultHomePage(context),
|
||||
title: Text('默认启动页', style: titleStyle),
|
||||
subtitle: Obx(() => Text(
|
||||
'当前启动页:${defaultNavigationBars.firstWhere((e) => e['id'] == settingController.defaultHomePage.value)['label']}',
|
||||
style: subTitleStyle)),
|
||||
),
|
||||
ListTile(
|
||||
dense: false,
|
||||
onTap: () => Get.toNamed('/fontSizeSetting'),
|
||||
|
||||
Reference in New Issue
Block a user