Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-20 16:58:42 +08:00
parent 3099bd6ca1
commit 9b5457ffc0
20 changed files with 102 additions and 109 deletions

View File

@@ -3,27 +3,25 @@
import 'package:flutter/widgets.dart';
class CustomIcon {
static const _kFontFam = 'custom_icon';
static const IconData coin = IconData(0xe800, fontFamily: _kFontFam);
static const IconData dm_off = IconData(0xe801, fontFamily: _kFontFam);
static const IconData dm_on = IconData(0xe802, fontFamily: _kFontFam);
static const IconData dm_settings = IconData(0xe803, fontFamily: _kFontFam);
static const IconData dyn = IconData(0xe804, fontFamily: _kFontFam);
static const IconData fav = IconData(0xe805, fontFamily: _kFontFam);
static const IconData share = IconData(0xe806, fontFamily: _kFontFam);
static const IconData share_line = IconData(0xe807, fontFamily: _kFontFam);
static const IconData share_node = IconData(0xe808, fontFamily: _kFontFam);
static const IconData star_favorite_line =
IconData(0xe809, fontFamily: _kFontFam);
static const IconData thumbs_down = IconData(0xe80a, fontFamily: _kFontFam);
static const IconData thumbs_down_outline =
IconData(0xe80b, fontFamily: _kFontFam);
static const IconData thumbs_up = IconData(0xe80c, fontFamily: _kFontFam);
static const IconData thumbs_up_line =
IconData(0xe80d, fontFamily: _kFontFam);
static const IconData thumbs_up_outline =
IconData(0xe80e, fontFamily: _kFontFam);
static const IconData topic_tag = IconData(0xe80f, fontFamily: _kFontFam);
static const IconData watch_later = IconData(0xe810, fontFamily: _kFontFam);
static const IconData coin = _CustomIconData(0xe800);
static const IconData dm_off = _CustomIconData(0xe801);
static const IconData dm_on = _CustomIconData(0xe802);
static const IconData dm_settings = _CustomIconData(0xe803);
static const IconData dyn = _CustomIconData(0xe804);
static const IconData fav = _CustomIconData(0xe805);
static const IconData share = _CustomIconData(0xe806);
static const IconData share_line = _CustomIconData(0xe807);
static const IconData share_node = _CustomIconData(0xe808);
static const IconData star_favorite_line = _CustomIconData(0xe809);
static const IconData thumbs_down = _CustomIconData(0xe80a);
static const IconData thumbs_down_outline = _CustomIconData(0xe80b);
static const IconData thumbs_up = _CustomIconData(0xe80c);
static const IconData thumbs_up_line = _CustomIconData(0xe80d);
static const IconData thumbs_up_outline = _CustomIconData(0xe80e);
static const IconData topic_tag = _CustomIconData(0xe80f);
static const IconData watch_later = _CustomIconData(0xe810);
}
class _CustomIconData extends IconData {
const _CustomIconData(super.codePoint) : super(fontFamily: 'custom_icon');
}

View File

@@ -33,7 +33,7 @@ class VideoCustomActions {
VideoCustomAction(
videoItem.bvid!,
'copy',
Stack(
const Stack(
clipBehavior: Clip.none,
children: [
Icon(MdiIcons.identifier, size: 16),
@@ -47,7 +47,7 @@ class VideoCustomActions {
VideoCustomAction(
'稍后再看',
'pause',
Icon(MdiIcons.clockTimeEightOutline, size: 16),
const Icon(MdiIcons.clockTimeEightOutline, size: 16),
() async {
var res = await UserHttp.toViewLater(bvid: videoItem.bvid);
SmartDialog.showToast(res['msg']);
@@ -58,7 +58,7 @@ class VideoCustomActions {
VideoCustomAction(
'访问:${videoItem.owner.name}',
'visit',
Icon(MdiIcons.accountCircleOutline, size: 16),
const Icon(MdiIcons.accountCircleOutline, size: 16),
() {
Get.toNamed('/member?mid=${videoItem.owner.mid}', arguments: {
'heroTag': '${videoItem.owner.mid}',
@@ -69,7 +69,7 @@ class VideoCustomActions {
VideoCustomAction(
'不感兴趣',
'dislike',
Icon(MdiIcons.thumbDownOutline, size: 16),
const Icon(MdiIcons.thumbDownOutline, size: 16),
() {
String? accessKey = Accounts.get(AccountType.recommend).accessKey;
if (accessKey == null || accessKey == "") {
@@ -233,7 +233,7 @@ class VideoCustomActions {
VideoCustomAction(
'拉黑:${videoItem.owner.name}',
'block',
Icon(MdiIcons.cancel, size: 16),
const Icon(MdiIcons.cancel, size: 16),
() {
showDialog(
context: context,
@@ -274,12 +274,9 @@ class VideoCustomActions {
VideoCustomAction(
"${MineController.anonymity.value ? '退出' : '进入'}无痕模式",
'anonymity',
Icon(
MineController.anonymity.value
? MdiIcons.incognitoOff
: MdiIcons.incognito,
size: 16,
),
MineController.anonymity.value
? const Icon(MdiIcons.incognitoOff, size: 16)
: const Icon(MdiIcons.incognito, size: 16),
() => MineController.onChangeAnonymity(context),
)
];