mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-20 09:06:36 +08:00
opt: member info widget
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -274,7 +274,7 @@ class UserInfoCard extends StatelessWidget {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: List.generate(
|
children: List.generate(
|
||||||
5,
|
5,
|
||||||
(index) => index % 2 == 0
|
(index) => index % 2 == 0
|
||||||
@@ -305,6 +305,7 @@ class UserInfoCard extends StatelessWidget {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
|
const SizedBox(width: 20),
|
||||||
if (!isOwner)
|
if (!isOwner)
|
||||||
IconButton.outlined(
|
IconButton.outlined(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
@@ -338,50 +339,52 @@ class UserInfoCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
FilledButton.tonal(
|
Expanded(
|
||||||
onPressed: onFollow,
|
child: FilledButton.tonal(
|
||||||
style: FilledButton.styleFrom(
|
onPressed: onFollow,
|
||||||
backgroundColor: relation == -1 || isFollow
|
style: FilledButton.styleFrom(
|
||||||
? Theme.of(context).colorScheme.onInverseSurface
|
backgroundColor: relation == -1 || isFollow
|
||||||
: null,
|
? Theme.of(context).colorScheme.onInverseSurface
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 50),
|
|
||||||
visualDensity: const VisualDensity(
|
|
||||||
horizontal: -2,
|
|
||||||
vertical: -2,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Text.rich(
|
|
||||||
style: TextStyle(
|
|
||||||
color: relation == -1 || isFollow
|
|
||||||
? Theme.of(context).colorScheme.outline
|
|
||||||
: null,
|
: null,
|
||||||
|
visualDensity: const VisualDensity(
|
||||||
|
horizontal: -2,
|
||||||
|
vertical: -2,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
TextSpan(
|
child: Text.rich(
|
||||||
children: [
|
style: TextStyle(
|
||||||
if (isFollow)
|
color: relation == -1 || isFollow
|
||||||
WidgetSpan(
|
? Theme.of(context).colorScheme.outline
|
||||||
alignment: PlaceholderAlignment.top,
|
: null,
|
||||||
child: Icon(
|
),
|
||||||
Icons.sort,
|
TextSpan(
|
||||||
size: 16,
|
children: [
|
||||||
color: Theme.of(context).colorScheme.outline,
|
if (isFollow)
|
||||||
|
WidgetSpan(
|
||||||
|
alignment: PlaceholderAlignment.top,
|
||||||
|
child: Icon(
|
||||||
|
Icons.sort,
|
||||||
|
size: 16,
|
||||||
|
color: Theme.of(context).colorScheme.outline,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
TextSpan(
|
||||||
|
text: isOwner
|
||||||
|
? '编辑资料'
|
||||||
|
: relation == -1
|
||||||
|
? '移除黑名单'
|
||||||
|
: relation == 2
|
||||||
|
? ' 特别关注'
|
||||||
|
: isFollow
|
||||||
|
? ' 已关注'
|
||||||
|
: '关注',
|
||||||
),
|
),
|
||||||
TextSpan(
|
],
|
||||||
text: isOwner
|
),
|
||||||
? '编辑资料'
|
|
||||||
: relation == -1
|
|
||||||
? '移除黑名单'
|
|
||||||
: relation == 2
|
|
||||||
? ' 特别关注'
|
|
||||||
: isFollow
|
|
||||||
? ' 已关注'
|
|
||||||
: '关注',
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(width: 20),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -737,7 +737,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
return TextButton(
|
return TextButton(
|
||||||
onPressed: () => videoIntroController.actionRelationMod(context),
|
onPressed: () => videoIntroController.actionRelationMod(context),
|
||||||
style: TextButton.styleFrom(
|
style: TextButton.styleFrom(
|
||||||
visualDensity: const VisualDensity(horizontal: -2, vertical: -3),
|
visualDensity: const VisualDensity(vertical: -3),
|
||||||
foregroundColor: attr != 0
|
foregroundColor: attr != 0
|
||||||
? t.colorScheme.outline
|
? t.colorScheme.outline
|
||||||
: t.colorScheme.onSecondaryContainer,
|
: t.colorScheme.onSecondaryContainer,
|
||||||
|
|||||||
Reference in New Issue
Block a user