mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-31 16:00:13 +08:00
@@ -26,6 +26,7 @@ Widget dynTextMenuBuilder(
|
||||
},
|
||||
),
|
||||
);
|
||||
state.addLaunchMenuIfNeeded(buttonItems, index: 5);
|
||||
return AdaptiveTextSelectionToolbar.buttonItems(
|
||||
buttonItems: buttonItems,
|
||||
anchors: state.contextMenuAnchors,
|
||||
|
||||
@@ -53,9 +53,7 @@ void showReplyCopyDialog(
|
||||
},
|
||||
),
|
||||
);
|
||||
if (showEmote) {
|
||||
state.addLaunchMenuIfNeeded(buttonItems, index: 4);
|
||||
}
|
||||
state.addLaunchMenuIfNeeded(buttonItems, index: 4);
|
||||
}
|
||||
if (state.isUncollapsed) {
|
||||
buttonItems.add(
|
||||
|
||||
@@ -499,7 +499,7 @@ class ImageGridRenderObjectElement extends RenderObjectElement {
|
||||
List<ImageModel> picArr,
|
||||
BoxConstraints layoutInfo,
|
||||
) {
|
||||
final maxWidth = layoutInfo.maxWidth;
|
||||
final maxWidth = math.min(525.0, layoutInfo.maxWidth);
|
||||
double imageWidth;
|
||||
double imageHeight;
|
||||
final length = picArr.length;
|
||||
|
||||
@@ -609,13 +609,13 @@ class _GalleryViewerState extends State<GalleryViewer>
|
||||
items: [
|
||||
PopupMenuItem(
|
||||
height: 42,
|
||||
onTap: () => Utils.copyText(item.url),
|
||||
child: const Text('复制链接', style: TextStyle(fontSize: 14)),
|
||||
onTap: () => ImageUtils.downloadImg([item.url]),
|
||||
child: const Text('保存图片', style: TextStyle(fontSize: 14)),
|
||||
),
|
||||
PopupMenuItem(
|
||||
height: 42,
|
||||
onTap: () => ImageUtils.downloadImg([item.url]),
|
||||
child: const Text('保存图片', style: TextStyle(fontSize: 14)),
|
||||
onTap: () => Utils.copyText(item.url),
|
||||
child: const Text('复制链接', style: TextStyle(fontSize: 14)),
|
||||
),
|
||||
PopupMenuItem(
|
||||
height: 42,
|
||||
|
||||
@@ -5,7 +5,6 @@ import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/common/widgets/video_popup_menu.dart';
|
||||
import 'package:PiliPlus/http/search.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models/home/rcmd/result.dart';
|
||||
import 'package:PiliPlus/models/model_rec_video_item.dart';
|
||||
import 'package:PiliPlus/models_new/video/video_detail/dimension.dart';
|
||||
@@ -97,7 +96,7 @@ class VideoCardV extends StatelessWidget {
|
||||
onLongPress: onLongPress,
|
||||
onSecondaryTap: PlatformUtils.isMobile ? null : onLongPress,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment: .start,
|
||||
children: [
|
||||
AspectRatio(
|
||||
aspectRatio: Style.aspectRatio,
|
||||
@@ -154,21 +153,19 @@ class VideoCardV extends StatelessWidget {
|
||||
final theme = Theme.of(context);
|
||||
return Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(6, 5, 6, 5),
|
||||
padding: const .fromLTRB(6, 5, 6, 5),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment: .start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"${videoItem.title}\n",
|
||||
videoItem.title,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
height: 1.38,
|
||||
),
|
||||
overflow: .ellipsis,
|
||||
style: const TextStyle(height: 1.38),
|
||||
),
|
||||
),
|
||||
videoStat(context, theme),
|
||||
videoStat(theme),
|
||||
Row(
|
||||
spacing: 2,
|
||||
children: [
|
||||
@@ -207,7 +204,7 @@ class VideoCardV extends StatelessWidget {
|
||||
child: Text(
|
||||
videoItem.owner.name.toString(),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.clip,
|
||||
overflow: .clip,
|
||||
semanticsLabel: 'UP:${videoItem.owner.name}',
|
||||
style: TextStyle(
|
||||
height: 1.5,
|
||||
@@ -228,17 +225,17 @@ class VideoCardV extends StatelessWidget {
|
||||
static final shortFormat = DateFormat('M-d');
|
||||
static final longFormat = DateFormat('yy-M-d');
|
||||
|
||||
Widget videoStat(BuildContext context, ThemeData theme) {
|
||||
Widget videoStat(ThemeData theme) {
|
||||
return Row(
|
||||
children: [
|
||||
StatWidget(
|
||||
type: StatType.play,
|
||||
type: .play,
|
||||
value: videoItem.stat.view,
|
||||
),
|
||||
if (videoItem.goto != 'picture') ...[
|
||||
const SizedBox(width: 4),
|
||||
StatWidget(
|
||||
type: StatType.danmaku,
|
||||
type: .danmaku,
|
||||
value: videoItem.stat.danmu,
|
||||
),
|
||||
],
|
||||
@@ -260,23 +257,6 @@ class VideoCardV extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 2),
|
||||
],
|
||||
// deprecated
|
||||
// else if (videoItem is RcmdVideoItemAppModel &&
|
||||
// videoItem.desc != null &&
|
||||
// videoItem.desc!.contains(' · ')) ...[
|
||||
// const Spacer(),
|
||||
// Text.rich(
|
||||
// maxLines: 1,
|
||||
// TextSpan(
|
||||
// style: TextStyle(
|
||||
// fontSize: theme.textTheme.labelSmall!.fontSize,
|
||||
// color: theme.colorScheme.outline.withValues(alpha: 0.8),
|
||||
// ),
|
||||
// text: Utils.shortenChineseDateString(
|
||||
// videoItem.desc!.split(' · ').last)),
|
||||
// ),
|
||||
// const SizedBox(width: 2),
|
||||
// ]
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user