mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-24 02:56:58 +08:00
opt member info
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -28,6 +28,7 @@ class VideoCardHMemberVideo extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
return Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
@@ -99,7 +100,7 @@ class VideoCardHMemberVideo extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 15,
|
||||
letterSpacing: 1.5,
|
||||
letterSpacing: 5,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -166,7 +167,7 @@ class VideoCardHMemberVideo extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
videoContent(context),
|
||||
videoContent(context, theme),
|
||||
],
|
||||
);
|
||||
},
|
||||
@@ -186,8 +187,9 @@ class VideoCardHMemberVideo extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget videoContent(context) {
|
||||
final theme = Theme.of(context);
|
||||
Widget videoContent(BuildContext context, ThemeData theme) {
|
||||
final isCurr = fromViewAid == videoItem.param ||
|
||||
(videoItem.bvid != null && videoItem.bvid == bvid);
|
||||
return Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -197,15 +199,11 @@ class VideoCardHMemberVideo extends StatelessWidget {
|
||||
videoItem.title,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontWeight: videoItem.bvid != null && videoItem.bvid == bvid
|
||||
? FontWeight.bold
|
||||
: null,
|
||||
fontWeight: isCurr ? FontWeight.bold : null,
|
||||
fontSize: theme.textTheme.bodyMedium!.fontSize,
|
||||
height: 1.42,
|
||||
letterSpacing: 0.3,
|
||||
color: videoItem.bvid != null && videoItem.bvid == bvid
|
||||
? theme.colorScheme.primary
|
||||
: null,
|
||||
color: isCurr ? theme.colorScheme.primary : null,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'package:PiliPlus/models/space/card.dart';
|
||||
import 'package:PiliPlus/models/space/images.dart';
|
||||
import 'package:PiliPlus/utils/extension.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart' show Accounts;
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -59,8 +59,8 @@ class UserInfoCard extends StatelessWidget {
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
fontSize: 11,
|
||||
height: 1.2,
|
||||
fontSize: 12,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
),
|
||||
@@ -108,7 +108,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
|
||||
List<Widget> _buildLeft(BuildContext context, ThemeData theme) => [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
padding: const EdgeInsets.only(left: 20, right: 20, top: 5),
|
||||
child: Wrap(
|
||||
spacing: 8,
|
||||
runSpacing: 8,
|
||||
@@ -302,7 +302,6 @@ class UserInfoCard extends StatelessWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: List.generate(
|
||||
5,
|
||||
(index) => index % 2 == 0
|
||||
@@ -323,22 +322,23 @@ class UserInfoCard extends StatelessWidget {
|
||||
}
|
||||
},
|
||||
)
|
||||
: const SizedBox(
|
||||
: const Expanded(
|
||||
child: SizedBox(
|
||||
height: 15,
|
||||
width: 1,
|
||||
child: VerticalDivider(),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const SizedBox(width: 20),
|
||||
if (!isOwner) ...[
|
||||
IconButton.outlined(
|
||||
onPressed: () {
|
||||
if (GStorage.userInfo.get('userInfoCache') != null) {
|
||||
if (Accounts.main.isLogin) {
|
||||
int mid = int.parse(card.mid!);
|
||||
Get.toNamed(
|
||||
'/whisperDetail',
|
||||
@@ -355,7 +355,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
style: IconButton.styleFrom(
|
||||
side: BorderSide(
|
||||
width: 1.0,
|
||||
color: theme.colorScheme.outline.withValues(alpha: 0.5),
|
||||
color: theme.colorScheme.outline.withValues(alpha: 0.3),
|
||||
),
|
||||
padding: EdgeInsets.zero,
|
||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
@@ -371,7 +371,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
backgroundColor: relation != 0
|
||||
? theme.colorScheme.onInverseSurface
|
||||
: null,
|
||||
visualDensity: VisualDensity.compact,
|
||||
visualDensity: const VisualDensity(vertical: -1.8),
|
||||
),
|
||||
child: Text.rich(
|
||||
style: TextStyle(
|
||||
@@ -379,7 +379,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
),
|
||||
TextSpan(
|
||||
children: [
|
||||
if (relation != 0 && relation != 128)
|
||||
if (relation != 0 && relation != 128) ...[
|
||||
WidgetSpan(
|
||||
alignment: PlaceholderAlignment.top,
|
||||
child: Icon(
|
||||
@@ -388,6 +388,8 @@ class UserInfoCard extends StatelessWidget {
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
),
|
||||
const TextSpan(text: ' '),
|
||||
],
|
||||
TextSpan(
|
||||
text: isOwner
|
||||
? '编辑资料'
|
||||
@@ -400,13 +402,13 @@ class UserInfoCard extends StatelessWidget {
|
||||
128 => '移除黑名单',
|
||||
-10 => '特别关注', // 该状态码并不是官方状态码
|
||||
_ => relation.toString(),
|
||||
}),
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 20),
|
||||
],
|
||||
),
|
||||
],
|
||||
@@ -440,7 +442,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
_buildHeader(context, theme),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.textScalerOf(context).scale(30) + 55,
|
||||
height: MediaQuery.textScalerOf(context).scale(30) + 60,
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -450,9 +452,9 @@ class UserInfoCard extends StatelessWidget {
|
||||
child: _buildAvatar(context),
|
||||
),
|
||||
Positioned(
|
||||
left: 140,
|
||||
left: 160,
|
||||
top: 140,
|
||||
right: 20,
|
||||
right: 15,
|
||||
bottom: 0,
|
||||
child: _buildRight(context, theme),
|
||||
),
|
||||
@@ -544,6 +546,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
flex: 5,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -554,7 +557,11 @@ class UserInfoCard extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(child: _buildRight(context, theme)),
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: _buildRight(context, theme),
|
||||
),
|
||||
const SizedBox(width: 20),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -102,15 +102,11 @@ class _MemberOpusState extends State<MemberOpus>
|
||||
},
|
||||
);
|
||||
},
|
||||
label: Row(
|
||||
children: [
|
||||
const Icon(size: 20, Icons.sort),
|
||||
Obx(
|
||||
icon: const Icon(size: 20, Icons.sort),
|
||||
label: Obx(
|
||||
() => Text(_controller.type.value.text ??
|
||||
_controller.type.value.tabName!),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -816,7 +816,8 @@ class _VideoInfoState extends State<VideoInfo> {
|
||||
return TextButton(
|
||||
onPressed: () => videoIntroController.actionRelationMod(context),
|
||||
style: TextButton.styleFrom(
|
||||
visualDensity: const VisualDensity(vertical: -3),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 18),
|
||||
visualDensity: const VisualDensity(vertical: -2.8),
|
||||
foregroundColor: attr != 0
|
||||
? t.colorScheme.outline
|
||||
: t.colorScheme.onSecondaryContainer,
|
||||
@@ -833,7 +834,7 @@ class _VideoInfoState extends State<VideoInfo> {
|
||||
-10 => '特别关注',
|
||||
_ => '关注'
|
||||
},
|
||||
style: TextStyle(fontSize: t.textTheme.labelMedium!.fontSize),
|
||||
style: const TextStyle(fontSize: 13),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user