mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-25 12:55:53 +08:00
@@ -62,7 +62,7 @@ class _BarSetPageState extends State<BarSetPage> {
|
||||
title: Text('$title编辑'),
|
||||
actions: [
|
||||
TextButton(onPressed: saveEdit, child: const Text('保存')),
|
||||
const SizedBox(width: 12)
|
||||
const SizedBox(width: 12),
|
||||
],
|
||||
),
|
||||
body: ReorderableListView(
|
||||
@@ -70,23 +70,27 @@ class _BarSetPageState extends State<BarSetPage> {
|
||||
footer: SizedBox(
|
||||
height: MediaQuery.paddingOf(context).bottom + 30,
|
||||
child: const Align(
|
||||
alignment: Alignment.centerRight, child: Text('*长按拖动排序 ')),
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text('*长按拖动排序 '),
|
||||
),
|
||||
),
|
||||
children: defaultBars
|
||||
.map((i) => CheckboxListTile(
|
||||
key: Key(i.label),
|
||||
value: barIndex.containsKey(i.index),
|
||||
onChanged: (bool? value) {
|
||||
if (value!) {
|
||||
barIndex[i.index] = -1;
|
||||
} else {
|
||||
barIndex.remove(i.index);
|
||||
}
|
||||
setState(() {});
|
||||
},
|
||||
title: Text(i.label),
|
||||
secondary: const Icon(Icons.drag_indicator_rounded),
|
||||
))
|
||||
.map(
|
||||
(i) => CheckboxListTile(
|
||||
key: Key(i.label),
|
||||
value: barIndex.containsKey(i.index),
|
||||
onChanged: (bool? value) {
|
||||
if (value!) {
|
||||
barIndex[i.index] = -1;
|
||||
} else {
|
||||
barIndex.remove(i.index);
|
||||
}
|
||||
setState(() {});
|
||||
},
|
||||
title: Text(i.label),
|
||||
secondary: const Icon(Icons.drag_indicator_rounded),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -50,8 +50,9 @@ class _ColorSelectPageState extends State<ColorSelectPage> {
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
TextStyle titleStyle = theme.textTheme.titleMedium!;
|
||||
TextStyle subTitleStyle =
|
||||
theme.textTheme.labelMedium!.copyWith(color: theme.colorScheme.outline);
|
||||
TextStyle subTitleStyle = theme.textTheme.labelMedium!.copyWith(
|
||||
color: theme.colorScheme.outline,
|
||||
);
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text('选择应用主题')),
|
||||
body: SafeArea(
|
||||
@@ -64,10 +65,10 @@ class _ColorSelectPageState extends State<ColorSelectPage> {
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return SelectDialog<ThemeType>(
|
||||
title: '主题模式',
|
||||
value: ctr.themeType.value,
|
||||
values:
|
||||
ThemeType.values.map((e) => (e, e.desc)).toList());
|
||||
title: '主题模式',
|
||||
value: ctr.themeType.value,
|
||||
values: ThemeType.values.map((e) => (e, e.desc)).toList(),
|
||||
);
|
||||
},
|
||||
);
|
||||
if (result != null) {
|
||||
@@ -85,8 +86,12 @@ class _ColorSelectPageState extends State<ColorSelectPage> {
|
||||
child: const Icon(Icons.flashlight_on_outlined),
|
||||
),
|
||||
title: Text('主题模式', style: titleStyle),
|
||||
subtitle: Obx(() => Text('当前模式:${ctr.themeType.value.desc}',
|
||||
style: subTitleStyle)),
|
||||
subtitle: Obx(
|
||||
() => Text(
|
||||
'当前模式:${ctr.themeType.value.desc}',
|
||||
style: subTitleStyle,
|
||||
),
|
||||
),
|
||||
),
|
||||
Obx(
|
||||
() => ListTile(
|
||||
@@ -100,15 +105,19 @@ class _ColorSelectPageState extends State<ColorSelectPage> {
|
||||
initialValue: _dynamicSchemeVariant,
|
||||
onSelected: (item) {
|
||||
_dynamicSchemeVariant = item;
|
||||
GStorage.setting
|
||||
.put(SettingBoxKey.schemeVariant, item.index);
|
||||
GStorage.setting.put(
|
||||
SettingBoxKey.schemeVariant,
|
||||
item.index,
|
||||
);
|
||||
Get.forceAppUpdate();
|
||||
},
|
||||
itemBuilder: (context) => FlexSchemeVariant.values
|
||||
.map((item) => PopupMenuItem<FlexSchemeVariant>(
|
||||
value: item,
|
||||
child: Text(item.variantName),
|
||||
))
|
||||
.map(
|
||||
(item) => PopupMenuItem<FlexSchemeVariant>(
|
||||
value: item,
|
||||
child: Text(item.variantName),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -119,8 +128,9 @@ class _ColorSelectPageState extends State<ColorSelectPage> {
|
||||
height: 1,
|
||||
fontSize: 13,
|
||||
color: ctr.type.value == 0
|
||||
? theme.colorScheme.outline
|
||||
.withValues(alpha: 0.8)
|
||||
? theme.colorScheme.outline.withValues(
|
||||
alpha: 0.8,
|
||||
)
|
||||
: theme.colorScheme.secondary,
|
||||
),
|
||||
strutStyle: const StrutStyle(leading: 0, height: 1),
|
||||
@@ -129,10 +139,11 @@ class _ColorSelectPageState extends State<ColorSelectPage> {
|
||||
size: 20,
|
||||
Icons.keyboard_arrow_right,
|
||||
color: ctr.type.value == 0
|
||||
? theme.colorScheme.outline
|
||||
.withValues(alpha: 0.8)
|
||||
? theme.colorScheme.outline.withValues(
|
||||
alpha: 0.8,
|
||||
)
|
||||
: theme.colorScheme.secondary,
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -86,10 +86,13 @@ class _SetDisplayModeState extends State<SetDisplayMode> {
|
||||
: Text('$mode${mode == active ? ' [系统]' : ''}'),
|
||||
groupValue: preferred,
|
||||
onChanged: (DisplayMode? newMode) {
|
||||
FlutterDisplayMode.setPreferredMode(newMode!)
|
||||
.whenComplete(() =>
|
||||
Future.delayed(const Duration(milliseconds: 100))
|
||||
.whenComplete(fetchAll));
|
||||
FlutterDisplayMode.setPreferredMode(
|
||||
newMode!,
|
||||
).whenComplete(
|
||||
() => Future.delayed(
|
||||
const Duration(milliseconds: 100),
|
||||
).whenComplete(fetchAll),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
@@ -31,13 +31,14 @@ class _FontSizeSelectPageState extends State<FontSizeSelectPage> {
|
||||
appBar: AppBar(
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
currentSize = 1.0;
|
||||
setFontSize();
|
||||
},
|
||||
child: const Text('重置')),
|
||||
onPressed: () {
|
||||
currentSize = 1.0;
|
||||
setFontSize();
|
||||
},
|
||||
child: const Text('重置'),
|
||||
),
|
||||
TextButton(onPressed: setFontSize, child: const Text('确定')),
|
||||
const SizedBox(width: 12)
|
||||
const SizedBox(width: 12),
|
||||
],
|
||||
),
|
||||
body: SafeArea(
|
||||
@@ -56,9 +57,10 @@ class _FontSizeSelectPageState extends State<FontSizeSelectPage> {
|
||||
padding: const EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color:
|
||||
theme.colorScheme.primary.withValues(alpha: 0.3))),
|
||||
top: BorderSide(
|
||||
color: theme.colorScheme.primary.withValues(alpha: 0.3),
|
||||
),
|
||||
),
|
||||
color: theme.colorScheme.surface,
|
||||
),
|
||||
child: Row(
|
||||
@@ -84,7 +86,7 @@ class _FontSizeSelectPageState extends State<FontSizeSelectPage> {
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -54,8 +54,9 @@ class _LogsPageState extends State<LogsPage> {
|
||||
List contentList = fileContent.split(splitToken).map((item) {
|
||||
return item
|
||||
.replaceAll(
|
||||
'============================== CATCHER 2 LOG ==============================',
|
||||
'PiliPlus错误日志\n********************')
|
||||
'============================== CATCHER 2 LOG ==============================',
|
||||
'PiliPlus错误日志\n********************',
|
||||
)
|
||||
.replaceAll('DEVICE INFO', '设备信息')
|
||||
.replaceAll('APP INFO', '应用信息')
|
||||
.replaceAll('ERROR', '错误信息')
|
||||
@@ -129,7 +130,8 @@ class _LogsPageState extends State<LogsPage> {
|
||||
break;
|
||||
case 'feedback':
|
||||
PageUtils.launchURL(
|
||||
'https://github.com/bggRGjQaUbCoE/PiliPlus/issues');
|
||||
'https://github.com/bggRGjQaUbCoE/PiliPlus/issues',
|
||||
);
|
||||
break;
|
||||
case 'clear':
|
||||
clearLogsHandle();
|
||||
@@ -185,10 +187,9 @@ class _LogsPageState extends State<LogsPage> {
|
||||
Text(
|
||||
log['date'].toString(),
|
||||
style: TextStyle(
|
||||
fontSize: Theme.of(context)
|
||||
.textTheme
|
||||
.titleMedium!
|
||||
.fontSize,
|
||||
fontSize: Theme.of(
|
||||
context,
|
||||
).textTheme.titleMedium!.fontSize,
|
||||
),
|
||||
),
|
||||
TextButton.icon(
|
||||
@@ -197,8 +198,10 @@ class _LogsPageState extends State<LogsPage> {
|
||||
visualDensity: VisualDensity.compact,
|
||||
),
|
||||
onPressed: () {
|
||||
Utils.copyText('```\n${log['body']}\n```',
|
||||
needToast: false);
|
||||
Utils.copyText(
|
||||
'```\n${log['body']}\n```',
|
||||
needToast: false,
|
||||
);
|
||||
if (context.mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
@@ -211,7 +214,7 @@ class _LogsPageState extends State<LogsPage> {
|
||||
},
|
||||
icon: const Icon(Icons.copy_outlined, size: 16),
|
||||
label: const Text('复制'),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
Card(
|
||||
|
||||
@@ -65,8 +65,9 @@ class _PlaySpeedPageState extends State<PlaySpeedPage> {
|
||||
const SizedBox(height: 12),
|
||||
TextField(
|
||||
autofocus: true,
|
||||
keyboardType:
|
||||
const TextInputType.numberWithOptions(decimal: true),
|
||||
keyboardType: const TextInputType.numberWithOptions(
|
||||
decimal: true,
|
||||
),
|
||||
decoration: const InputDecoration(
|
||||
labelText: '自定义倍速',
|
||||
border: OutlineInputBorder(
|
||||
@@ -106,7 +107,7 @@ class _PlaySpeedPageState extends State<PlaySpeedPage> {
|
||||
}
|
||||
},
|
||||
child: const Text('确认'),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
@@ -130,8 +131,9 @@ class _PlaySpeedPageState extends State<PlaySpeedPage> {
|
||||
const SizedBox(height: 10),
|
||||
...sheetMenu.map(
|
||||
(item) => ListTile(
|
||||
enabled:
|
||||
enableAutoLongPressSpeed && item.id == 2 ? false : true,
|
||||
enabled: enableAutoLongPressSpeed && item.id == 2
|
||||
? false
|
||||
: true,
|
||||
onTap: () {
|
||||
Get.back();
|
||||
menuAction(index, item.id);
|
||||
@@ -202,8 +204,12 @@ class _PlaySpeedPageState extends State<PlaySpeedPage> {
|
||||
child: ListView(
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 14, right: 14, top: 6, bottom: 0),
|
||||
padding: const EdgeInsets.only(
|
||||
left: 14,
|
||||
right: 14,
|
||||
top: 6,
|
||||
bottom: 0,
|
||||
),
|
||||
child: Text(
|
||||
'点击下方按钮设置默认(长按)倍速',
|
||||
style: TextStyle(color: theme.colorScheme.outline),
|
||||
|
||||
Reference in New Issue
Block a user