Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-21 14:26:29 +08:00
parent 0b1f6c4d0e
commit 7a65b777c9
21 changed files with 486 additions and 507 deletions

View File

@@ -182,69 +182,66 @@ class HistoryItem extends StatelessWidget {
Positioned(
right: 12,
bottom: 0,
child: SizedBox(
width: 29,
height: 29,
child: PopupMenuButton(
padding: EdgeInsets.zero,
tooltip: '功能菜单',
icon: Icon(
Icons.more_vert_outlined,
color: theme.colorScheme.outline,
size: 18,
),
position: PopupMenuPosition.under,
itemBuilder: (_) => [
if (item.authorMid != null &&
item.authorName?.isNotEmpty == true)
PopupMenuItem(
onTap: () =>
Get.toNamed('/member?mid=${item.authorMid}'),
height: 38,
child: Row(
children: [
const Icon(
MdiIcons.accountCircleOutline,
size: 16,
),
const SizedBox(width: 6),
Text(
'访问:${item.authorName}',
style: const TextStyle(fontSize: 13),
),
],
),
),
if (business != 'pgc' &&
item.badge != '番剧' &&
item.tagName?.contains('动画') != true &&
business != 'live' &&
business?.contains('article') != true)
PopupMenuItem(
onTap: () =>
UserHttp.toViewLater(bvid: item.history.bvid),
height: 38,
child: const Row(
children: [
Icon(Icons.watch_later_outlined, size: 16),
SizedBox(width: 6),
Text('稍后再看', style: TextStyle(fontSize: 13)),
],
),
),
width: 29,
height: 29,
child: PopupMenuButton(
padding: EdgeInsets.zero,
tooltip: '功能菜单',
icon: Icon(
Icons.more_vert_outlined,
color: theme.colorScheme.outline,
size: 18,
),
position: PopupMenuPosition.under,
itemBuilder: (_) => [
if (item.authorMid != null &&
item.authorName?.isNotEmpty == true)
PopupMenuItem(
onTap: () => onDelete(item.kid!, business!),
onTap: () => Get.toNamed('/member?mid=${item.authorMid}'),
height: 38,
child: const Row(
child: Row(
children: [
Icon(Icons.close_outlined, size: 16),
SizedBox(width: 6),
Text('删除记录', style: TextStyle(fontSize: 13)),
const Icon(
MdiIcons.accountCircleOutline,
size: 16,
),
const SizedBox(width: 6),
Text(
'访问:${item.authorName}',
style: const TextStyle(fontSize: 13),
),
],
),
),
],
),
if (business != 'pgc' &&
item.badge != '番剧' &&
item.tagName?.contains('动画') != true &&
business != 'live' &&
business?.contains('article') != true)
PopupMenuItem(
onTap: () =>
UserHttp.toViewLater(bvid: item.history.bvid),
height: 38,
child: const Row(
children: [
Icon(Icons.watch_later_outlined, size: 16),
SizedBox(width: 6),
Text('稍后再看', style: TextStyle(fontSize: 13)),
],
),
),
PopupMenuItem(
onTap: () => onDelete(item.kid!, business!),
height: 38,
child: const Row(
children: [
Icon(Icons.close_outlined, size: 16),
SizedBox(width: 6),
Text('删除记录', style: TextStyle(fontSize: 13)),
],
),
),
],
),
),
],