mod: memberpage: show silent status

Closes #158

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-14 09:50:18 +08:00
parent 0c08fe1a90
commit 471c95abe8
3 changed files with 59 additions and 11 deletions

View File

@@ -19,6 +19,8 @@ class UserInfoCard extends StatelessWidget {
required this.isFollow,
required this.onFollow,
this.live,
this.silence,
this.endTime,
});
final bool isV;
@@ -29,6 +31,8 @@ class UserInfoCard extends StatelessWidget {
final space.Images images;
final VoidCallback onFollow;
final dynamic live;
final int? silence;
final String? endTime;
@override
Widget build(BuildContext context) {
@@ -259,17 +263,45 @@ class UserInfoCard extends StatelessWidget {
],
),
),
// if (card.spaceTagBottom != null && card.spaceTagBottom!.isNotEmpty)
// Padding(
// padding: const EdgeInsets.only(left: 20, top: 8, right: 20),
// child: Wrap(
// spacing: 5,
// runSpacing: 8,
// children: card.spaceTagBottom!
// .map((item) => Text(item.title ?? ''))
// .toList(),
// ),
// ),
if (silence == 1)
Builder(builder: (context) {
bool isLight = Theme.of(context).brightness == Brightness.light;
return GestureDetector(
onTap: () {
Utils.handleWebview(
'https://www.bilibili.com/blackroom/ban/${card.mid}');
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
color: isLight
? Theme.of(context).colorScheme.errorContainer
: Theme.of(context).colorScheme.error,
),
margin: const EdgeInsets.only(left: 20, top: 8, right: 20),
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
child: Row(
children: [
Icon(
Icons.info,
size: MediaQuery.textScalerOf(context).scale(18),
color: isLight
? Theme.of(context).colorScheme.onErrorContainer
: Theme.of(context).colorScheme.onError,
),
Text(
' 该账号封禁中${endTime ?? ''}',
style: TextStyle(
color: isLight
? Theme.of(context).colorScheme.onErrorContainer
: Theme.of(context).colorScheme.onError,
),
),
],
),
),
);
}),
];
_buildRight(BuildContext context) => Column(