mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-08 02:00:13 +08:00
tweaks (#2426)
* opt: danmaku weight
* opt: cache clean
* opt: level img
* opt: play icon
* opt: svg big-vip
* opt: webview ua
* opt: simple dialog
* feat: export vtt
* tweak
* opt: mapIndexed
* feat: more subtitle
* refa: settings page
* feat: codec list options
* drawPath
Signed-off-by: dom <githubaccount56556@proton.me>
* custom dialog option
Signed-off-by: dom <githubaccount56556@proton.me>
* update
Signed-off-by: dom <githubaccount56556@proton.me>
* Revert "drawPath"
This reverts commit e8a4b19f0f.
* opt: _initStreamIndex
* fix: avoid gap
* fix: scale [skip ci]
* fix: hide repost menu not login
* tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
---------
Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
committed by
GitHub
parent
3dee6a85e5
commit
9d94c72e95
@@ -4,12 +4,7 @@ import 'package:PiliPlus/http/login.dart';
|
||||
import 'package:PiliPlus/models/common/setting_type.dart';
|
||||
import 'package:PiliPlus/pages/about/view.dart';
|
||||
import 'package:PiliPlus/pages/login/controller.dart';
|
||||
import 'package:PiliPlus/pages/setting/extra_setting.dart';
|
||||
import 'package:PiliPlus/pages/setting/play_setting.dart';
|
||||
import 'package:PiliPlus/pages/setting/privacy_setting.dart';
|
||||
import 'package:PiliPlus/pages/setting/recommend_setting.dart';
|
||||
import 'package:PiliPlus/pages/setting/style_setting.dart';
|
||||
import 'package:PiliPlus/pages/setting/video_setting.dart';
|
||||
import 'package:PiliPlus/pages/setting/common_setting.dart';
|
||||
import 'package:PiliPlus/pages/setting/widgets/multi_select_dialog.dart';
|
||||
import 'package:PiliPlus/pages/webdav/view.dart';
|
||||
import 'package:PiliPlus/utils/accounts.dart';
|
||||
@@ -43,6 +38,7 @@ class _SettingPageState extends State<SettingPage> {
|
||||
late SettingType _type = SettingType.privacySetting;
|
||||
final RxBool _noAccount = Accounts.account.isEmpty.obs;
|
||||
late bool _isPortrait;
|
||||
late ThemeData theme;
|
||||
|
||||
static const List<_SettingsModel> _items = [
|
||||
_SettingsModel(
|
||||
@@ -86,9 +82,15 @@ class _SettingPageState extends State<SettingPage> {
|
||||
];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
|
||||
theme = Theme.of(context);
|
||||
_isPortrait = MediaQuery.sizeOf(context).isPortrait;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
@@ -111,28 +113,19 @@ class _SettingPageState extends State<SettingPage> {
|
||||
Expanded(
|
||||
flex: 6,
|
||||
child: switch (_type) {
|
||||
SettingType.privacySetting => const PrivacySetting(
|
||||
.privacySetting ||
|
||||
.recommendSetting ||
|
||||
.videoSetting ||
|
||||
.playSetting ||
|
||||
.styleSetting ||
|
||||
.extraSetting => CommonSetting(
|
||||
settingType: _type,
|
||||
showAppBar: false,
|
||||
),
|
||||
SettingType.recommendSetting => const RecommendSetting(
|
||||
.webdavSetting => const WebDavSettingPage(
|
||||
showAppBar: false,
|
||||
),
|
||||
SettingType.videoSetting => const VideoSetting(
|
||||
showAppBar: false,
|
||||
),
|
||||
SettingType.playSetting => const PlaySetting(
|
||||
showAppBar: false,
|
||||
),
|
||||
SettingType.styleSetting => const StyleSetting(
|
||||
showAppBar: false,
|
||||
),
|
||||
SettingType.extraSetting => const ExtraSetting(
|
||||
showAppBar: false,
|
||||
),
|
||||
SettingType.webdavSetting => const WebDavSettingPage(
|
||||
showAppBar: false,
|
||||
),
|
||||
SettingType.about => const AboutPage(showAppBar: false),
|
||||
.about => const AboutPage(showAppBar: false),
|
||||
},
|
||||
),
|
||||
],
|
||||
@@ -149,7 +142,18 @@ class _SettingPageState extends State<SettingPage> {
|
||||
|
||||
void _toPage(SettingType type) {
|
||||
if (_isPortrait) {
|
||||
Get.toNamed('/${type.name}');
|
||||
Get.to(
|
||||
() => switch (type) {
|
||||
.privacySetting ||
|
||||
.recommendSetting ||
|
||||
.videoSetting ||
|
||||
.playSetting ||
|
||||
.styleSetting ||
|
||||
.extraSetting => CommonSetting(settingType: type),
|
||||
.webdavSetting => const WebDavSettingPage(),
|
||||
.about => const AboutPage(),
|
||||
},
|
||||
);
|
||||
} else {
|
||||
_type = type;
|
||||
setState(() {});
|
||||
|
||||
Reference in New Issue
Block a user