Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-15 12:24:39 +08:00
parent cb58822009
commit bdc524e486
29 changed files with 223 additions and 248 deletions

View File

@@ -146,21 +146,16 @@ Future<void> showMemberReportDialog(
),
),
TextButton(
onPressed: () async {
onPressed: () {
if (reason.isEmpty) {
SmartDialog.showToast('至少选择一项作为举报内容');
} else {
Get.back();
final result = await MemberHttp.reportMember(
MemberHttp.reportMember(
mid,
reason: reason.join(','),
reasonV2: reasonV2 != null ? reasonV2! + 1 : null,
);
if (result['msg'] is String && result['msg'].isNotEmpty) {
SmartDialog.showToast(result['msg']);
} else {
SmartDialog.showToast('举报失败');
}
}
},
child: const Text('确定'),

View File

@@ -18,21 +18,8 @@ void imageSaveDialog({
SmartDialog.show(
animationType: SmartAnimationType.centerScale_otherSlide,
builder: (context) {
const iconSize = 20.0;
final theme = Theme.of(context);
Widget iconBtn({
String? tooltip,
required Icon icon,
required VoidCallback? onPressed,
}) {
return iconButton(
icon: icon,
iconSize: 20,
tooltip: tooltip,
onPressed: onPressed,
);
}
return Container(
width: imgWidth,
margin: const EdgeInsets.symmetric(horizontal: StyleString.safeSpace),
@@ -94,19 +81,19 @@ void imageSaveDialog({
else
const Spacer(),
if (aid != null || bvid != null)
iconBtn(
iconButton(
iconSize: iconSize,
tooltip: '稍后再看',
onPressed: () => {
SmartDialog.dismiss(),
UserHttp.toViewLater(aid: aid, bvid: bvid).then(
(res) => SmartDialog.showToast(res['msg']),
),
UserHttp.toViewLater(aid: aid, bvid: bvid),
},
icon: const Icon(Icons.watch_later_outlined),
),
if (cover != null && cover.isNotEmpty) ...[
if (PlatformUtils.isMobile)
iconBtn(
iconButton(
iconSize: iconSize,
tooltip: '分享',
onPressed: () {
SmartDialog.dismiss();
@@ -114,7 +101,8 @@ void imageSaveDialog({
},
icon: const Icon(Icons.share),
),
iconBtn(
iconButton(
iconSize: iconSize,
tooltip: '保存封面图',
onPressed: () async {
bool saveStatus = await ImageUtils.downloadImg([cover]);

View File

@@ -327,9 +327,9 @@ class _InteractiveviewerGalleryState extends State<InteractiveviewerGallery>
child: Hero(
tag: item.url,
child: switch (item.sourceType) {
SourceType.fileImage => Image(
SourceType.fileImage => Image.file(
File(item.url),
filterQuality: FilterQuality.low,
image: FileImage(File(item.url)),
),
SourceType.networkImage => CachedNetworkImage(
fadeInDuration: Duration.zero,

View File

@@ -70,12 +70,7 @@ class VideoPopupMenu extends StatelessWidget {
_VideoCustomAction(
'稍后再看',
const Icon(MdiIcons.clockTimeEightOutline, size: 16),
() async {
final res = await UserHttp.toViewLater(
bvid: videoItem.bvid,
);
SmartDialog.showToast(res['msg']);
},
() => UserHttp.toViewLater(bvid: videoItem.bvid),
),
if (videoItem.cid != null && Pref.enableAi)
_VideoCustomAction(