Merge branch 'design'
This commit is contained in:
@ -15,4 +15,5 @@ class Constants {
|
|||||||
// 59b43e04ad6965f34319062b478f83dd TV端
|
// 59b43e04ad6965f34319062b478f83dd TV端
|
||||||
static const String appSec = '59b43e04ad6965f34319062b478f83dd';
|
static const String appSec = '59b43e04ad6965f34319062b478f83dd';
|
||||||
static const String thirdSign = '04224646d1fea004e79606d3b038c84a';
|
static const String thirdSign = '04224646d1fea004e79606d3b038c84a';
|
||||||
|
static const List<int> publicFavFolder = <int>[0, 2, 22];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -124,7 +124,7 @@ class _AboutPageState extends State<AboutPage> {
|
|||||||
onTap: () => _aboutController.webSiteUrl(),
|
onTap: () => _aboutController.webSiteUrl(),
|
||||||
title: const Text('访问官网'),
|
title: const Text('访问官网'),
|
||||||
trailing: Text(
|
trailing: Text(
|
||||||
'https://pilipalanet.mysxl.cn',
|
'https://pilipala.life',
|
||||||
style: subTitleStyle,
|
style: subTitleStyle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -96,7 +96,9 @@ class VideoContent extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Text(
|
Text(
|
||||||
[22, 0].contains(favFolderItem.attr) ? '公开' : '私密',
|
Constants.publicFavFolder.contains(favFolderItem.attr)
|
||||||
|
? '公开'
|
||||||
|
: '私密',
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: Theme.of(context).textTheme.labelMedium!.fontSize,
|
fontSize: Theme.of(context).textTheme.labelMedium!.fontSize,
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:hive/hive.dart';
|
import 'package:hive/hive.dart';
|
||||||
|
import 'package:pilipala/common/constants.dart';
|
||||||
import 'package:pilipala/common/widgets/http_error.dart';
|
import 'package:pilipala/common/widgets/http_error.dart';
|
||||||
import 'package:pilipala/utils/feed_back.dart';
|
import 'package:pilipala/utils/feed_back.dart';
|
||||||
import 'package:pilipala/utils/storage.dart';
|
import 'package:pilipala/utils/storage.dart';
|
||||||
@ -66,16 +67,14 @@ class _FavPanelState extends State<FavPanel> {
|
|||||||
onTap: () =>
|
onTap: () =>
|
||||||
widget.ctr!.onChoose(item.favState != 1, index),
|
widget.ctr!.onChoose(item.favState != 1, index),
|
||||||
dense: true,
|
dense: true,
|
||||||
leading: Icon([22, 0].contains(item.attr)
|
leading: Icon(
|
||||||
? Icons.lock_outline
|
Constants.publicFavFolder.contains(item.attr)
|
||||||
: Icons.folder_outlined),
|
? Icons.folder_outlined
|
||||||
|
: Icons.lock_outline),
|
||||||
minLeadingWidth: 0,
|
minLeadingWidth: 0,
|
||||||
title: Text(item.title!),
|
title: Text(item.title!),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
'${item.mediaCount}个内容 - ${[
|
'${item.mediaCount}个内容 - ${Constants.publicFavFolder.contains(item.attr) ? '公开' : '私密'}',
|
||||||
22,
|
|
||||||
0
|
|
||||||
].contains(item.attr) ? '公开' : '私密'}',
|
|
||||||
),
|
),
|
||||||
trailing: Transform.scale(
|
trailing: Transform.scale(
|
||||||
scale: 0.9,
|
scale: 0.9,
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:appscheme/appscheme.dart';
|
|
||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
@ -46,7 +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;
|
final bool replySave;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -56,7 +55,7 @@ class ReplyItem extends StatelessWidget {
|
|||||||
child: InkWell(
|
child: InkWell(
|
||||||
// 点击整个评论区 评论详情/回复
|
// 点击整个评论区 评论详情/回复
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (replySave!) {
|
if (replySave) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
feedBack();
|
feedBack();
|
||||||
@ -65,7 +64,7 @@ class ReplyItem extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLongPress: () {
|
onLongPress: () {
|
||||||
if (replySave!) {
|
if (replySave) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
feedBack();
|
feedBack();
|
||||||
@ -238,14 +237,17 @@ class ReplyItem extends StatelessWidget {
|
|||||||
// title
|
// title
|
||||||
Container(
|
Container(
|
||||||
margin: const EdgeInsets.only(top: 10, left: 45, right: 6, bottom: 4),
|
margin: const EdgeInsets.only(top: 10, left: 45, right: 6, bottom: 4),
|
||||||
child: LayoutBuilder(
|
child: !replySave
|
||||||
builder: (BuildContext context, BoxConstraints boxConstraints) {
|
? LayoutBuilder(builder:
|
||||||
|
(BuildContext context, BoxConstraints boxConstraints) {
|
||||||
String text = replyItem?.content?.message ?? '';
|
String text = replyItem?.content?.message ?? '';
|
||||||
bool didExceedMaxLines = false;
|
bool didExceedMaxLines = false;
|
||||||
final double maxWidth = boxConstraints.maxWidth;
|
final double maxWidth = boxConstraints.maxWidth;
|
||||||
TextPainter? textPainter;
|
TextPainter? textPainter;
|
||||||
final int maxLines =
|
final int maxLines =
|
||||||
replyItem!.content!.isText! && replyLevel == '1' ? 6 : 999;
|
replyItem!.content!.isText! && replyLevel == '1'
|
||||||
|
? 6
|
||||||
|
: 999;
|
||||||
try {
|
try {
|
||||||
textPainter = TextPainter(
|
textPainter = TextPainter(
|
||||||
text: TextSpan(text: text),
|
text: TextSpan(text: text),
|
||||||
@ -258,6 +260,33 @@ class ReplyItem extends StatelessWidget {
|
|||||||
debugPrint('Error while measuring text: $e');
|
debugPrint('Error while measuring text: $e');
|
||||||
didExceedMaxLines = false;
|
didExceedMaxLines = false;
|
||||||
}
|
}
|
||||||
|
return replyContent(context, didExceedMaxLines, textPainter);
|
||||||
|
})
|
||||||
|
: replyContent(context, false, null),
|
||||||
|
),
|
||||||
|
// 操作区域
|
||||||
|
bottonAction(context, replyItem!.replyControl, replySave),
|
||||||
|
// 一楼的评论
|
||||||
|
if ((replyItem!.replyControl!.isShow! ||
|
||||||
|
replyItem!.replies!.isNotEmpty) &&
|
||||||
|
showReplyRow!) ...[
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 5, bottom: 12),
|
||||||
|
child: ReplyItemRow(
|
||||||
|
replies: replyItem!.replies,
|
||||||
|
replyControl: replyItem!.replyControl,
|
||||||
|
// f_rpid: replyItem!.rpid,
|
||||||
|
replyItem: replyItem,
|
||||||
|
replyReply: replyReply,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget replyContent(
|
||||||
|
BuildContext context, bool? didExceedMaxLines, TextPainter? textPainter) {
|
||||||
return Text.rich(
|
return Text.rich(
|
||||||
style: const TextStyle(height: 1.75),
|
style: const TextStyle(height: 1.75),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
@ -278,33 +307,12 @@ class ReplyItem extends StatelessWidget {
|
|||||||
replyItem!,
|
replyItem!,
|
||||||
replyReply,
|
replyReply,
|
||||||
null,
|
null,
|
||||||
didExceedMaxLines,
|
didExceedMaxLines ?? false,
|
||||||
textPainter,
|
textPainter,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
|
||||||
),
|
|
||||||
// 操作区域
|
|
||||||
bottonAction(context, replyItem!.replyControl, replySave),
|
|
||||||
// 一楼的评论
|
|
||||||
if ((replyItem!.replyControl!.isShow! ||
|
|
||||||
replyItem!.replies!.isNotEmpty) &&
|
|
||||||
showReplyRow!) ...[
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 5, bottom: 12),
|
|
||||||
child: ReplyItemRow(
|
|
||||||
replies: replyItem!.replies,
|
|
||||||
replyControl: replyItem!.replyControl,
|
|
||||||
// f_rpid: replyItem!.rpid,
|
|
||||||
replyItem: replyItem,
|
|
||||||
replyReply: replyReply,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 感谢、回复、复制
|
// 感谢、回复、复制
|
||||||
|
|||||||
@ -153,6 +153,7 @@ class ChatItem extends StatelessWidget {
|
|||||||
jsonDecode(content['content'])
|
jsonDecode(content['content'])
|
||||||
.map((m) => m['text'] as String)
|
.map((m) => m['text'] as String)
|
||||||
.join("\n"),
|
.join("\n"),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
letterSpacing: 0.6,
|
letterSpacing: 0.6,
|
||||||
height: 5,
|
height: 5,
|
||||||
@ -391,7 +392,8 @@ class ChatItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user