opt
This commit is contained in:
@ -19,6 +19,7 @@ import 'package:pilipala/plugin/pl_gallery/index.dart';
|
|||||||
import 'package:pilipala/plugin/pl_popup/index.dart';
|
import 'package:pilipala/plugin/pl_popup/index.dart';
|
||||||
import 'package:pilipala/utils/app_scheme.dart';
|
import 'package:pilipala/utils/app_scheme.dart';
|
||||||
import 'package:pilipala/utils/feed_back.dart';
|
import 'package:pilipala/utils/feed_back.dart';
|
||||||
|
import 'package:pilipala/utils/id_utils.dart';
|
||||||
import 'package:pilipala/utils/storage.dart';
|
import 'package:pilipala/utils/storage.dart';
|
||||||
import 'package:pilipala/utils/url_utils.dart';
|
import 'package:pilipala/utils/url_utils.dart';
|
||||||
import 'package:pilipala/utils/utils.dart';
|
import 'package:pilipala/utils/utils.dart';
|
||||||
@ -35,6 +36,7 @@ class ReplyItem extends StatelessWidget {
|
|||||||
this.showReplyRow = true,
|
this.showReplyRow = true,
|
||||||
this.replyReply,
|
this.replyReply,
|
||||||
this.replyType,
|
this.replyType,
|
||||||
|
this.replySave = false,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
final ReplyItemModel? replyItem;
|
final ReplyItemModel? replyItem;
|
||||||
@ -43,6 +45,7 @@ class ReplyItem extends StatelessWidget {
|
|||||||
final bool? showReplyRow;
|
final bool? showReplyRow;
|
||||||
final Function? replyReply;
|
final Function? replyReply;
|
||||||
final ReplyType? replyType;
|
final ReplyType? replyType;
|
||||||
|
final bool? replySave;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -50,12 +53,18 @@ class ReplyItem extends StatelessWidget {
|
|||||||
child: InkWell(
|
child: InkWell(
|
||||||
// 点击整个评论区 评论详情/回复
|
// 点击整个评论区 评论详情/回复
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
if (replySave!) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
feedBack();
|
feedBack();
|
||||||
if (replyReply != null) {
|
if (replyReply != null) {
|
||||||
replyReply!(replyItem, null, replyItem!.replies!.isNotEmpty);
|
replyReply!(replyItem, null, replyItem!.replies!.isNotEmpty);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLongPress: () {
|
onLongPress: () {
|
||||||
|
if (replySave!) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
feedBack();
|
feedBack();
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
@ -238,7 +247,7 @@ class ReplyItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
// 操作区域
|
// 操作区域
|
||||||
bottonAction(context, replyItem!.replyControl),
|
bottonAction(context, replyItem!.replyControl, replySave),
|
||||||
// 一楼的评论
|
// 一楼的评论
|
||||||
if ((replyItem!.replyControl!.isShow! ||
|
if ((replyItem!.replyControl!.isShow! ||
|
||||||
replyItem!.replies!.isNotEmpty) &&
|
replyItem!.replies!.isNotEmpty) &&
|
||||||
@ -259,7 +268,7 @@ class ReplyItem extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 感谢、回复、复制
|
// 感谢、回复、复制
|
||||||
Widget bottonAction(BuildContext context, replyControl) {
|
Widget bottonAction(BuildContext context, replyControl, replySave) {
|
||||||
ColorScheme colorScheme = Theme.of(context).colorScheme;
|
ColorScheme colorScheme = Theme.of(context).colorScheme;
|
||||||
TextTheme textTheme = Theme.of(context).textTheme;
|
TextTheme textTheme = Theme.of(context).textTheme;
|
||||||
return Row(
|
return Row(
|
||||||
@ -292,6 +301,7 @@ class ReplyItem extends StatelessWidget {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Row(children: [
|
child: Row(children: [
|
||||||
|
if (!replySave!) ...[
|
||||||
Icon(Icons.reply,
|
Icon(Icons.reply,
|
||||||
size: 18, color: colorScheme.outline.withOpacity(0.8)),
|
size: 18, color: colorScheme.outline.withOpacity(0.8)),
|
||||||
const SizedBox(width: 3),
|
const SizedBox(width: 3),
|
||||||
@ -301,6 +311,15 @@ class ReplyItem extends StatelessWidget {
|
|||||||
fontSize: textTheme.labelMedium!.fontSize,
|
fontSize: textTheme.labelMedium!.fontSize,
|
||||||
color: colorScheme.outline,
|
color: colorScheme.outline,
|
||||||
),
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
if (replySave!)
|
||||||
|
Text(
|
||||||
|
IdUtils.av2bv(replyItem!.oid!),
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: textTheme.labelMedium!.fontSize,
|
||||||
|
color: colorScheme.outline,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
@ -1097,7 +1116,7 @@ class MorePanel extends StatelessWidget {
|
|||||||
leading: const Icon(Icons.copy_outlined, size: 19),
|
leading: const Icon(Icons.copy_outlined, size: 19),
|
||||||
title: Text('自由复制', style: textTheme.titleSmall),
|
title: Text('自由复制', style: textTheme.titleSmall),
|
||||||
),
|
),
|
||||||
if (mainFloor)
|
if (mainFloor && item.content.pictures.isEmpty)
|
||||||
ListTile(
|
ListTile(
|
||||||
onTap: () async => await menuActionHandler('save'),
|
onTap: () async => await menuActionHandler('save'),
|
||||||
minLeadingWidth: 0,
|
minLeadingWidth: 0,
|
||||||
|
|||||||
@ -76,16 +76,21 @@ class _ReplySaveState extends State<ReplySave> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return SafeArea(
|
||||||
|
top: false,
|
||||||
|
bottom: false,
|
||||||
|
child: BackdropFilter(
|
||||||
|
filter: ImageFilter.blur(sigmaX: 4.0, sigmaY: 4.0),
|
||||||
|
child: Container(
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
height: Get.height,
|
height: Get.height,
|
||||||
margin: EdgeInsets.fromLTRB(
|
padding: EdgeInsets.fromLTRB(
|
||||||
0,
|
0,
|
||||||
MediaQuery.of(context).padding.top + 4,
|
MediaQuery.of(context).padding.top + 4,
|
||||||
0,
|
0,
|
||||||
MediaQuery.of(context).padding.bottom + 4,
|
MediaQuery.of(context).padding.bottom + 4,
|
||||||
),
|
),
|
||||||
color: Colors.transparent,
|
color: Colors.black54,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
@ -104,6 +109,7 @@ class _ReplySaveState extends State<ReplySave> {
|
|||||||
ReplyItem(
|
ReplyItem(
|
||||||
replyItem: widget.replyItem,
|
replyItem: widget.replyItem,
|
||||||
showReplyRow: false,
|
showReplyRow: false,
|
||||||
|
replySave: true,
|
||||||
),
|
),
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
child: Column(
|
child: Column(
|
||||||
@ -135,6 +141,8 @@ class _ReplySaveState extends State<ReplySave> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user