mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-08-01 16:26:26 +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
@@ -1,3 +1,4 @@
|
||||
import 'package:PiliPlus/common/widgets/dialog/simple_dialog_option.dart';
|
||||
import 'package:PiliPlus/common/widgets/loading_widget/loading_widget.dart';
|
||||
import 'package:PiliPlus/grpc/bilibili/app/im/v1.pb.dart'
|
||||
show IMSettingType, Setting;
|
||||
@@ -82,49 +83,45 @@ class _WhisperSettingsPageState extends State<WhisperSettingsPage> {
|
||||
String? selected;
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
builder: (context) => SimpleDialog(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 12),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: item.redirect.windowSelect.item.map(
|
||||
(e) {
|
||||
if (e.selected) {
|
||||
selected ??= e.text;
|
||||
}
|
||||
return ListTile(
|
||||
dense: true,
|
||||
onTap: () async {
|
||||
if (!e.selected) {
|
||||
Get.back();
|
||||
for (final j in item.redirect.windowSelect.item) {
|
||||
j.selected = false;
|
||||
}
|
||||
item.redirect.selectedSummary = e.text;
|
||||
e.selected = true;
|
||||
_controller.loadingState.refresh();
|
||||
final settings = {key: item};
|
||||
final res = await _controller.onSet(settings);
|
||||
if (!res) {
|
||||
for (final j in item.redirect.windowSelect.item) {
|
||||
j.selected = j.text == selected;
|
||||
}
|
||||
item.redirect.selectedSummary = selected!;
|
||||
_controller.loadingState.refresh();
|
||||
}
|
||||
children: item.redirect.windowSelect.item.map(
|
||||
(e) {
|
||||
if (e.selected) {
|
||||
selected ??= e.text;
|
||||
}
|
||||
return DialogOption(
|
||||
onPressed: () async {
|
||||
if (!e.selected) {
|
||||
Get.back();
|
||||
for (final j in item.redirect.windowSelect.item) {
|
||||
j.selected = false;
|
||||
}
|
||||
},
|
||||
title: Text(
|
||||
e.text,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: e.selected ? theme.colorScheme.primary : null,
|
||||
),
|
||||
item.redirect.selectedSummary = e.text;
|
||||
e.selected = true;
|
||||
_controller.loadingState.refresh();
|
||||
final settings = {key: item};
|
||||
final res = await _controller.onSet(settings);
|
||||
if (!res) {
|
||||
for (final j in item.redirect.windowSelect.item) {
|
||||
j.selected = j.text == selected;
|
||||
}
|
||||
item.redirect.selectedSummary = selected!;
|
||||
_controller.loadingState.refresh();
|
||||
}
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
e.text,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: e.selected ? theme.colorScheme.primary : null,
|
||||
),
|
||||
);
|
||||
},
|
||||
).toList(),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
).toList(),
|
||||
),
|
||||
);
|
||||
} else if (item.redirect.otherPage.hasUrl()) {
|
||||
|
||||
Reference in New Issue
Block a user