opt: video reply

This commit is contained in:
bggRGjQaUbCoE
2024-09-21 11:25:30 +08:00
parent e78662672b
commit 3263ff8949
3 changed files with 14 additions and 11 deletions

View File

@@ -50,12 +50,12 @@ class PBadge extends StatelessWidget {
}
EdgeInsets paddingStyle =
const EdgeInsets.symmetric(vertical: 1, horizontal: 3);
const EdgeInsets.symmetric(vertical: 2, horizontal: 3);
double fontSize = 11;
BorderRadius br = BorderRadius.circular(4);
if (size == 'small') {
paddingStyle = const EdgeInsets.symmetric(vertical: 1, horizontal: 3);
paddingStyle = const EdgeInsets.symmetric(vertical: 2, horizontal: 3);
fontSize = 11;
br = BorderRadius.circular(3);
}

View File

@@ -262,7 +262,7 @@ class ReplyItem extends StatelessWidget {
children: [
if (replyItem!.isTop!) ...[
const WidgetSpan(
alignment: PlaceholderAlignment.middle,
alignment: PlaceholderAlignment.top,
child: PBadge(
text: 'TOP',
size: 'small',
@@ -467,7 +467,7 @@ class ReplyItemRow extends StatelessWidget {
if (replies![i].isUp!) ...[
const TextSpan(text: ' '),
const WidgetSpan(
alignment: PlaceholderAlignment.middle,
alignment: PlaceholderAlignment.top,
child: PBadge(
text: 'UP',
size: 'small',
@@ -1160,7 +1160,7 @@ class MorePanel extends StatelessWidget {
),
),
// 已登录用户才显示删除
if (GStorage.userInfo.get('userInfoCache') != null)
if (GStorage.userInfo.get('userInfoCache') != null) ...[
ListTile(
onTap: () async => await menuActionHandler('delete'),
minLeadingWidth: 0,
@@ -1171,7 +1171,6 @@ class MorePanel extends StatelessWidget {
.titleSmall!
.copyWith(color: errorColor)),
),
if (GStorage.userInfo.get('userInfoCache') != null)
ListTile(
onTap: () async => await menuActionHandler('report'),
minLeadingWidth: 0,
@@ -1182,6 +1181,7 @@ class MorePanel extends StatelessWidget {
.titleSmall!
.copyWith(color: errorColor)),
),
],
ListTile(
onTap: () async => await menuActionHandler('copyAll'),
minLeadingWidth: 0,

View File

@@ -242,11 +242,14 @@ class PiliScheme {
final int cid = await SearchHttp.ab2c(bvid: bvidVal, aid: aidVal);
SmartDialog.dismiss();
final String heroTag = Utils.makeHeroTag(aid);
Get.toNamed<dynamic>('/video?bvid=$bvid&cid=$cid',
Get.toNamed<dynamic>(
'/video?bvid=$bvid&cid=$cid',
arguments: <String, String?>{
'pic': null,
'heroTag': heroTag,
});
},
preventDuplicates: false,
);
} catch (e) {
SmartDialog.dismiss();
SmartDialog.showToast('video获取失败: $e');