mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: vip color
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
import 'package:PiliPalaX/utils/storage.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -58,9 +57,7 @@ class AuthorPanel extends StatelessWidget {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: item.modules.moduleAuthor!.vip != null &&
|
color: item.modules.moduleAuthor!.vip != null &&
|
||||||
item.modules.moduleAuthor!.vip['status'] > 0
|
item.modules.moduleAuthor!.vip['status'] > 0
|
||||||
? GStorage.brightness == Brightness.light
|
? Utils.vipColor
|
||||||
? const Color(0xFFFF6699)
|
|
||||||
: const Color(0xFFD44E7D)
|
|
||||||
: Theme.of(context).colorScheme.onSurface,
|
: Theme.of(context).colorScheme.onSurface,
|
||||||
fontSize: Theme.of(context).textTheme.titleSmall!.fontSize,
|
fontSize: Theme.of(context).textTheme.titleSmall!.fontSize,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -94,9 +94,8 @@ class _MemberPageState extends State<MemberPage>
|
|||||||
() => Text(
|
() => Text(
|
||||||
_memberController.memberInfo.value.name ?? '',
|
_memberController.memberInfo.value.name ?? '',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context)
|
color:
|
||||||
.colorScheme
|
Theme.of(context).colorScheme.onSurface,
|
||||||
.onBackground,
|
|
||||||
fontSize: 14),
|
fontSize: 14),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -152,6 +151,9 @@ class _MemberPageState extends State<MemberPage>
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
|
physics: const AlwaysScrollableScrollPhysics(
|
||||||
|
parent: BouncingScrollPhysics(),
|
||||||
|
),
|
||||||
controller: _extendNestCtr,
|
controller: _extendNestCtr,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
@@ -353,10 +355,14 @@ class _MemberPageState extends State<MemberPage>
|
|||||||
_memberController.memberInfo.value.name ?? '',
|
_memberController.memberInfo.value.name ?? '',
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: Theme.of(context)
|
style: Theme.of(context).textTheme.titleMedium!.copyWith(
|
||||||
.textTheme
|
fontWeight: FontWeight.bold,
|
||||||
.titleMedium!
|
color: _memberController.memberInfo.value.vip?.status !=
|
||||||
.copyWith(fontWeight: FontWeight.bold),
|
null &&
|
||||||
|
_memberController.memberInfo.value.vip!.status! > 0
|
||||||
|
? Utils.vipColor
|
||||||
|
: Theme.of(context).colorScheme.onSurface,
|
||||||
|
),
|
||||||
)),
|
)),
|
||||||
const SizedBox(width: 2),
|
const SizedBox(width: 2),
|
||||||
if (_memberController.memberInfo.value.sex == '女')
|
if (_memberController.memberInfo.value.sex == '女')
|
||||||
@@ -403,22 +409,37 @@ class _MemberPageState extends State<MemberPage>
|
|||||||
_memberController.memberInfo.value.vip!.label!['text'],
|
_memberController.memberInfo.value.vip!.label!['text'],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
TextButton(
|
const SizedBox(width: 5),
|
||||||
child: Text("UID ${_memberController.mid}",
|
GestureDetector(
|
||||||
style: TextStyle(
|
onTap: () {
|
||||||
color: Theme.of(context)
|
|
||||||
.colorScheme
|
|
||||||
.secondary
|
|
||||||
.withOpacity(0.5),
|
|
||||||
fontSize: 12,
|
|
||||||
// fontWeight: FontWeight.w200,
|
|
||||||
)),
|
|
||||||
onPressed: () {
|
|
||||||
Clipboard.setData(
|
Clipboard.setData(
|
||||||
ClipboardData(text: _memberController.mid.toString()),
|
ClipboardData(text: _memberController.mid.toString()),
|
||||||
);
|
);
|
||||||
SmartDialog.showToast('已复制${_memberController.mid}至剪贴板');
|
SmartDialog.showToast('已复制${_memberController.mid}至剪贴板');
|
||||||
}),
|
},
|
||||||
|
child: Container(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.symmetric(horizontal: 8, vertical: 2.5),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Theme.of(context).colorScheme.secondaryContainer,
|
||||||
|
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
'UID: ${_memberController.mid}',
|
||||||
|
style: TextStyle(
|
||||||
|
height: 1,
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Theme.of(context).colorScheme.onSecondaryContainer,
|
||||||
|
),
|
||||||
|
strutStyle: const StrutStyle(
|
||||||
|
height: 1,
|
||||||
|
leading: 0,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
if (_memberController.memberInfo.value.official != null &&
|
if (_memberController.memberInfo.value.official != null &&
|
||||||
|
|||||||
@@ -188,9 +188,7 @@ class ReplyItem extends StatelessWidget {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: (replyItem!.member!.vip!['vipStatus'] > 0 &&
|
color: (replyItem!.member!.vip!['vipStatus'] > 0 &&
|
||||||
replyItem!.member!.vip!['vipType'] == 2)
|
replyItem!.member!.vip!['vipType'] == 2)
|
||||||
? GStorage.brightness == Brightness.light
|
? Utils.vipColor
|
||||||
? const Color(0xFFFF6699)
|
|
||||||
: const Color(0xFFD44E7D)
|
|
||||||
: Theme.of(context).colorScheme.outline,
|
: Theme.of(context).colorScheme.outline,
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -21,6 +21,12 @@ import '../models/github/latest.dart';
|
|||||||
class Utils {
|
class Utils {
|
||||||
static final Random random = Random();
|
static final Random random = Random();
|
||||||
|
|
||||||
|
static Color get vipColor {
|
||||||
|
return GStorage.brightness == Brightness.light
|
||||||
|
? const Color(0xFFFF6699)
|
||||||
|
: const Color(0xFFD44E7D);
|
||||||
|
}
|
||||||
|
|
||||||
static Future<String> getCookiePath() async {
|
static Future<String> getCookiePath() async {
|
||||||
final Directory tempDir = await getApplicationSupportDirectory();
|
final Directory tempDir = await getApplicationSupportDirectory();
|
||||||
final String tempPath = "${tempDir.path}/.plpl/";
|
final String tempPath = "${tempDir.path}/.plpl/";
|
||||||
|
|||||||
Reference in New Issue
Block a user