mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: vip color
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:PiliPalaX/utils/storage.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -57,8 +58,10 @@ class AuthorPanel extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
color: item.modules.moduleAuthor!.vip != null &&
|
||||
item.modules.moduleAuthor!.vip['status'] > 0
|
||||
? const Color.fromARGB(255, 251, 100, 163)
|
||||
: Theme.of(context).colorScheme.onBackground,
|
||||
? GStorage.brightness == Brightness.light
|
||||
? const Color(0xFFFF6699)
|
||||
: const Color(0xFFD44E7D)
|
||||
: Theme.of(context).colorScheme.onSurface,
|
||||
fontSize: Theme.of(context).textTheme.titleSmall!.fontSize,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -188,7 +188,9 @@ class ReplyItem extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
color: (replyItem!.member!.vip!['vipStatus'] > 0 &&
|
||||
replyItem!.member!.vip!['vipType'] == 2)
|
||||
? const Color.fromARGB(255, 251, 100, 163)
|
||||
? GStorage.brightness == Brightness.light
|
||||
? const Color(0xFFFF6699)
|
||||
: const Color(0xFFD44E7D)
|
||||
: Theme.of(context).colorScheme.outline,
|
||||
fontSize: 13,
|
||||
),
|
||||
@@ -1040,7 +1042,6 @@ class MorePanel extends StatelessWidget {
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
title: const Text('自由复制'),
|
||||
content: SelectableText(message),
|
||||
);
|
||||
},
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'dart:ui';
|
||||
import 'package:PiliPalaX/models/common/theme_type.dart';
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:PiliPalaX/models/model_owner.dart';
|
||||
@@ -14,6 +16,19 @@ class GStorage {
|
||||
static late final Box<dynamic> setting;
|
||||
static late final Box<dynamic> video;
|
||||
|
||||
static Brightness get brightness {
|
||||
switch (setting.get(SettingBoxKey.themeMode,
|
||||
defaultValue: ThemeType.system.code)) {
|
||||
case 0:
|
||||
return Brightness.light;
|
||||
case 1:
|
||||
return Brightness.dark;
|
||||
case 2:
|
||||
default:
|
||||
return PlatformDispatcher.instance.platformBrightness;
|
||||
}
|
||||
}
|
||||
|
||||
static Future<void> init() async {
|
||||
final Directory dir = await getApplicationSupportDirectory();
|
||||
final String path = dir.path;
|
||||
|
||||
Reference in New Issue
Block a user