mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-29 13:50:21 +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
@@ -431,41 +431,37 @@ class AuthorPanel extends StatelessWidget {
|
||||
final reply = response.upReply;
|
||||
final enableReply = reply.status == 1;
|
||||
|
||||
return AlertDialog(
|
||||
return SimpleDialog(
|
||||
clipBehavior: .hardEdge,
|
||||
contentPadding: const .symmetric(vertical: 12),
|
||||
content: Column(
|
||||
mainAxisSize: .min,
|
||||
crossAxisAlignment: .start,
|
||||
children: [
|
||||
ListTile(
|
||||
dense: true,
|
||||
enabled: selection.canModify,
|
||||
title: Text(
|
||||
'${enableSelection ? '停止' : '开启'}评论精选',
|
||||
style: const TextStyle(fontSize: 14),
|
||||
),
|
||||
onTap: () {
|
||||
Get.back();
|
||||
onSetReplySubject!(
|
||||
enableSelection ? 2 : 1,
|
||||
);
|
||||
},
|
||||
children: [
|
||||
ListTile(
|
||||
dense: true,
|
||||
enabled: selection.canModify,
|
||||
title: Text(
|
||||
'${enableSelection ? '停止' : '开启'}评论精选',
|
||||
style: const TextStyle(fontSize: 14),
|
||||
),
|
||||
ListTile(
|
||||
dense: true,
|
||||
enabled: reply.canModify,
|
||||
title: Text(
|
||||
'${enableReply ? '关闭' : '恢复'}评论',
|
||||
style: const TextStyle(fontSize: 14),
|
||||
),
|
||||
onTap: () {
|
||||
Get.back();
|
||||
onSetReplySubject!(enableReply ? 3 : 4);
|
||||
},
|
||||
onTap: () {
|
||||
Get.back();
|
||||
onSetReplySubject!(
|
||||
enableSelection ? 2 : 1,
|
||||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
dense: true,
|
||||
enabled: reply.canModify,
|
||||
title: Text(
|
||||
'${enableReply ? '关闭' : '恢复'}评论',
|
||||
style: const TextStyle(fontSize: 14),
|
||||
),
|
||||
],
|
||||
),
|
||||
onTap: () {
|
||||
Get.back();
|
||||
onSetReplySubject!(enableReply ? 3 : 4);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
@@ -504,32 +500,29 @@ class AuthorPanel extends StatelessWidget {
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
builder: (context) => SimpleDialog(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
contentPadding: const .symmetric(vertical: 12),
|
||||
content: Column(
|
||||
mainAxisSize: .min,
|
||||
children: [
|
||||
ListTile(
|
||||
dense: true,
|
||||
enabled: isPrivate,
|
||||
title: const Text(
|
||||
'所有用户可见',
|
||||
style: TextStyle(fontSize: 14),
|
||||
),
|
||||
onTap: onTap,
|
||||
children: [
|
||||
ListTile(
|
||||
dense: true,
|
||||
enabled: isPrivate,
|
||||
title: const Text(
|
||||
'所有用户可见',
|
||||
style: TextStyle(fontSize: 14),
|
||||
),
|
||||
ListTile(
|
||||
dense: true,
|
||||
enabled: !isPrivate,
|
||||
title: const Text(
|
||||
'仅自己可见',
|
||||
style: TextStyle(fontSize: 14),
|
||||
),
|
||||
onTap: onTap,
|
||||
onTap: onTap,
|
||||
),
|
||||
ListTile(
|
||||
dense: true,
|
||||
enabled: !isPrivate,
|
||||
title: const Text(
|
||||
'仅自己可见',
|
||||
style: TextStyle(fontSize: 14),
|
||||
),
|
||||
],
|
||||
),
|
||||
onTap: onTap,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
// 视频or合集
|
||||
import 'package:PiliPlus/common/assets.dart';
|
||||
import 'package:PiliPlus/common/style.dart';
|
||||
import 'package:PiliPlus/common/widgets/badge.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/common/widgets/svg/play_icon.dart';
|
||||
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||
import 'package:PiliPlus/models/dynamics/result.dart';
|
||||
import 'package:PiliPlus/utils/extension/num_ext.dart';
|
||||
import 'package:PiliPlus/utils/num_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -113,12 +112,7 @@ Widget videoSeasonWidget(
|
||||
Text('${NumUtils.numFormat(stat.danmu)}弹幕'),
|
||||
],
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
Assets.play,
|
||||
width: 50,
|
||||
height: 50,
|
||||
cacheHeight: 50.cacheSize(context),
|
||||
),
|
||||
const PlayIcon(size: 50),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -159,57 +159,53 @@ class _VotePanelState extends State<VotePanel> {
|
||||
context: context,
|
||||
builder: (context) {
|
||||
final colorScheme = ColorScheme.of(context);
|
||||
return AlertDialog(
|
||||
return SimpleDialog(
|
||||
clipBehavior: .hardEdge,
|
||||
title: const Text('关注的人的投票'),
|
||||
contentPadding: const .only(top: 10, bottom: 12),
|
||||
content: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: .min,
|
||||
children: list
|
||||
.map(
|
||||
(e) => ListTile(
|
||||
dense: true,
|
||||
onTap: () =>
|
||||
Get.toNamed('/member?mid=${e.mid}'),
|
||||
leading: NetworkImgLayer(
|
||||
src: e.face,
|
||||
width: 40,
|
||||
height: 40,
|
||||
type: .avatar,
|
||||
),
|
||||
title: Text.rich(
|
||||
style: const TextStyle(fontSize: 13),
|
||||
contentPadding: const .only(bottom: 12),
|
||||
titlePadding: const .fromLTRB(20, 20, 20, 10),
|
||||
children: list
|
||||
.map(
|
||||
(e) => ListTile(
|
||||
dense: true,
|
||||
onTap: () =>
|
||||
Get.toNamed('/member?mid=${e.mid}'),
|
||||
leading: NetworkImgLayer(
|
||||
src: e.face,
|
||||
width: 40,
|
||||
height: 40,
|
||||
type: .avatar,
|
||||
),
|
||||
title: Text.rich(
|
||||
style: const TextStyle(fontSize: 13),
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(text: e.name),
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(text: e.name),
|
||||
TextSpan(
|
||||
text: ' 投给了',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: colorScheme.outline,
|
||||
),
|
||||
),
|
||||
],
|
||||
text: ' 投给了',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: colorScheme.outline,
|
||||
),
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
style: const TextStyle(fontSize: 13),
|
||||
e.votes
|
||||
.map(
|
||||
(vote) => _voteInfo.options
|
||||
.firstWhereOrNull(
|
||||
(e) => e.optIdx == vote,
|
||||
)
|
||||
?.optDesc,
|
||||
)
|
||||
.join('、'),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
style: const TextStyle(fontSize: 13),
|
||||
e.votes
|
||||
.map(
|
||||
(vote) => _voteInfo.options
|
||||
.firstWhereOrNull(
|
||||
(e) => e.optIdx == vote,
|
||||
)
|
||||
?.optDesc,
|
||||
)
|
||||
.join('、'),
|
||||
),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user