mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-29 14:56:29 +08:00
show img menu
opt img placeholder opt player gesture opt pref tweaks Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -405,12 +405,18 @@ List<SettingsModel> get extraSettings => [
|
||||
);
|
||||
},
|
||||
),
|
||||
SwitchModel(
|
||||
const SwitchModel(
|
||||
title: '显示视频警告/争议信息',
|
||||
leading: const Icon(Icons.warning_amber_rounded),
|
||||
leading: Icon(Icons.warning_amber_rounded),
|
||||
setKey: SettingBoxKey.showArgueMsg,
|
||||
defaultVal: true,
|
||||
onChanged: (val) => ItemModulesModel.showArgueMsg = val,
|
||||
),
|
||||
SwitchModel(
|
||||
title: '显示动态警告/争议信息',
|
||||
leading: const Icon(Icons.warning_amber_rounded),
|
||||
setKey: SettingBoxKey.showDynDispute,
|
||||
defaultVal: false,
|
||||
onChanged: (val) => ItemModulesModel.showDynDispute = val,
|
||||
),
|
||||
const SwitchModel(
|
||||
title: '分P/合集:倒序播放从首集开始播放',
|
||||
@@ -746,6 +752,13 @@ List<SettingsModel> get extraSettings => [
|
||||
defaultVal: false,
|
||||
onChanged: (value) => ImageUtils.silentDownImg = value,
|
||||
),
|
||||
SwitchModel(
|
||||
title: '长按/右键显示图片菜单',
|
||||
leading: const Icon(Icons.menu),
|
||||
setKey: SettingBoxKey.enableImgMenu,
|
||||
defaultVal: false,
|
||||
onChanged: (value) => CustomGridView.enableImgMenu = value,
|
||||
),
|
||||
SwitchModel(
|
||||
setKey: SettingBoxKey.feedBackEnable,
|
||||
onChanged: (value) {
|
||||
@@ -929,23 +942,20 @@ List<SettingsModel> get extraSettings => [
|
||||
NormalModel(
|
||||
title: '评论展示',
|
||||
leading: const Icon(Icons.whatshot_outlined),
|
||||
getSubtitle: () =>
|
||||
'当前优先展示「${ReplySortType.values[Pref.replySortType].title}」',
|
||||
getSubtitle: () => '当前优先展示「${Pref.replySortType.title}」',
|
||||
onTap: (context, setState) async {
|
||||
final result = await showDialog<int>(
|
||||
final result = await showDialog<ReplySortType>(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
return SelectDialog<ReplySortType>(
|
||||
title: '评论展示',
|
||||
value: Pref.replySortType,
|
||||
values: ReplySortType.values
|
||||
.map((e) => (e.index, e.title))
|
||||
.toList(),
|
||||
values: ReplySortType.values.map((e) => (e, e.title)).toList(),
|
||||
);
|
||||
},
|
||||
);
|
||||
if (result != null) {
|
||||
await GStorage.setting.put(SettingBoxKey.replySortType, result);
|
||||
await GStorage.setting.put(SettingBoxKey.replySortType, result.index);
|
||||
setState();
|
||||
}
|
||||
},
|
||||
@@ -953,24 +963,26 @@ List<SettingsModel> get extraSettings => [
|
||||
NormalModel(
|
||||
title: '动态展示',
|
||||
leading: const Icon(Icons.dynamic_feed_rounded),
|
||||
getSubtitle: () =>
|
||||
'当前优先展示「${DynamicsTabType.values[Pref.defaultDynamicType].label}」',
|
||||
getSubtitle: () => '当前优先展示「${Pref.defaultDynamicType.label}」',
|
||||
onTap: (context, setState) async {
|
||||
final result = await showDialog<int>(
|
||||
final result = await showDialog<DynamicsTabType>(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
return SelectDialog<DynamicsTabType>(
|
||||
title: '动态展示',
|
||||
value: Pref.defaultDynamicType,
|
||||
values: DynamicsTabType.values
|
||||
.take(4)
|
||||
.map((e) => (e.index, e.label))
|
||||
.map((e) => (e, e.label))
|
||||
.toList(),
|
||||
);
|
||||
},
|
||||
);
|
||||
if (result != null) {
|
||||
await GStorage.setting.put(SettingBoxKey.defaultDynamicType, result);
|
||||
await GStorage.setting.put(
|
||||
SettingBoxKey.defaultDynamicType,
|
||||
result.index,
|
||||
);
|
||||
setState();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -119,23 +119,23 @@ List<SettingsModel> get playSettings => [
|
||||
NormalModel(
|
||||
title: '自动启用字幕',
|
||||
leading: const Icon(Icons.closed_caption_outlined),
|
||||
getSubtitle: () =>
|
||||
'当前选择偏好:${SubtitlePrefType.values[Pref.subtitlePreferenceV2].desc}',
|
||||
getSubtitle: () => '当前选择偏好:${Pref.subtitlePreferenceV2.desc}',
|
||||
onTap: (context, setState) async {
|
||||
final result = await showDialog<int>(
|
||||
final result = await showDialog<SubtitlePrefType>(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
return SelectDialog<SubtitlePrefType>(
|
||||
title: '字幕选择偏好',
|
||||
value: Pref.subtitlePreferenceV2,
|
||||
values: SubtitlePrefType.values
|
||||
.map((e) => (e.index, e.desc))
|
||||
.toList(),
|
||||
values: SubtitlePrefType.values.map((e) => (e, e.desc)).toList(),
|
||||
);
|
||||
},
|
||||
);
|
||||
if (result != null) {
|
||||
await GStorage.setting.put(SettingBoxKey.subtitlePreferenceV2, result);
|
||||
await GStorage.setting.put(
|
||||
SettingBoxKey.subtitlePreferenceV2,
|
||||
result.index,
|
||||
);
|
||||
setState();
|
||||
}
|
||||
},
|
||||
@@ -266,23 +266,20 @@ List<SettingsModel> get playSettings => [
|
||||
NormalModel(
|
||||
title: '默认全屏方向',
|
||||
leading: const Icon(Icons.open_with_outlined),
|
||||
getSubtitle: () =>
|
||||
'当前全屏方向:${FullScreenMode.values[Pref.fullScreenMode].desc}',
|
||||
getSubtitle: () => '当前全屏方向:${Pref.fullScreenMode.desc}',
|
||||
onTap: (context, setState) async {
|
||||
final result = await showDialog<int>(
|
||||
final result = await showDialog<FullScreenMode>(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
return SelectDialog<FullScreenMode>(
|
||||
title: '默认全屏方向',
|
||||
value: Pref.fullScreenMode,
|
||||
values: FullScreenMode.values
|
||||
.map((e) => (e.index, e.desc))
|
||||
.toList(),
|
||||
values: FullScreenMode.values.map((e) => (e, e.desc)).toList(),
|
||||
);
|
||||
},
|
||||
);
|
||||
if (result != null) {
|
||||
await GStorage.setting.put(SettingBoxKey.fullScreenMode, result);
|
||||
await GStorage.setting.put(SettingBoxKey.fullScreenMode, result.index);
|
||||
setState();
|
||||
}
|
||||
},
|
||||
@@ -290,23 +287,23 @@ List<SettingsModel> get playSettings => [
|
||||
NormalModel(
|
||||
title: '底部进度条展示',
|
||||
leading: const Icon(Icons.border_bottom_outlined),
|
||||
getSubtitle: () =>
|
||||
'当前展示方式:${BtmProgressBehavior.values[Pref.btmProgressBehavior].desc}',
|
||||
getSubtitle: () => '当前展示方式:${Pref.btmProgressBehavior.desc}',
|
||||
onTap: (context, setState) async {
|
||||
final result = await showDialog<int>(
|
||||
final result = await showDialog<BtmProgressBehavior>(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
return SelectDialog<BtmProgressBehavior>(
|
||||
title: '底部进度条展示',
|
||||
value: Pref.btmProgressBehavior,
|
||||
values: BtmProgressBehavior.values
|
||||
.map((e) => (e.index, e.desc))
|
||||
.toList(),
|
||||
values: BtmProgressBehavior.values.map((e) => (e, e.desc)).toList(),
|
||||
);
|
||||
},
|
||||
);
|
||||
if (result != null) {
|
||||
await GStorage.setting.put(SettingBoxKey.btmProgressBehavior, result);
|
||||
await GStorage.setting.put(
|
||||
SettingBoxKey.btmProgressBehavior,
|
||||
result.index,
|
||||
);
|
||||
setState();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -21,7 +21,7 @@ List<SettingsModel> get recommendSettings => [
|
||||
subtitle: '下拉刷新时保留上次内容',
|
||||
leading: const Icon(Icons.refresh),
|
||||
setKey: SettingBoxKey.enableSaveLastData,
|
||||
defaultVal: false,
|
||||
defaultVal: true,
|
||||
onChanged: (value) {
|
||||
try {
|
||||
Get.find<RcmdController>()
|
||||
|
||||
@@ -33,7 +33,6 @@ import 'package:PiliPlus/utils/storage.dart';
|
||||
import 'package:PiliPlus/utils/storage_key.dart';
|
||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
import 'package:auto_orientation/auto_orientation.dart';
|
||||
import 'package:flex_seed_scheme/flex_seed_scheme.dart';
|
||||
import 'package:flutter/material.dart' hide StatefulBuilder;
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
@@ -593,10 +592,7 @@ List<SettingsModel> get styleSettings => [
|
||||
dimension: 32,
|
||||
child: ColorPalette(
|
||||
colorScheme: colorThemeTypes[Pref.customColor].color
|
||||
.asColorSchemeSeed(
|
||||
FlexSchemeVariant.values[Pref.schemeVariant],
|
||||
Get.theme.brightness,
|
||||
),
|
||||
.asColorSchemeSeed(Pref.schemeVariant, Get.theme.brightness),
|
||||
selected: false,
|
||||
showBgColor: false,
|
||||
),
|
||||
@@ -604,28 +600,25 @@ List<SettingsModel> get styleSettings => [
|
||||
),
|
||||
NormalModel(
|
||||
onTap: (context, setState) async {
|
||||
final result = await showDialog<int>(
|
||||
final result = await showDialog<NavigationBarType>(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
return SelectDialog<NavigationBarType>(
|
||||
title: '首页启动页',
|
||||
value: Pref.defaultHomePage,
|
||||
values: NavigationBarType.values
|
||||
.map((e) => (e.index, e.label))
|
||||
.toList(),
|
||||
values: NavigationBarType.values.map((e) => (e, e.label)).toList(),
|
||||
);
|
||||
},
|
||||
);
|
||||
if (result != null) {
|
||||
await GStorage.setting.put(SettingBoxKey.defaultHomePage, result);
|
||||
await GStorage.setting.put(SettingBoxKey.defaultHomePage, result.index);
|
||||
SmartDialog.showToast('设置成功,重启生效');
|
||||
setState();
|
||||
}
|
||||
},
|
||||
leading: const Icon(Icons.home_outlined),
|
||||
title: '默认启动页',
|
||||
getSubtitle: () =>
|
||||
'当前启动页:${NavigationBarType.values.firstWhere((e) => e.index == Pref.defaultHomePage).label}',
|
||||
getSubtitle: () => '当前启动页:${Pref.defaultHomePage.label}',
|
||||
),
|
||||
NormalModel(
|
||||
title: '滑动动画弹簧参数',
|
||||
|
||||
Reference in New Issue
Block a user