diff --git a/lib/pages/dynamics/widgets/author_panel.dart b/lib/pages/dynamics/widgets/author_panel.dart index d784dc48..ec0f7ead 100644 --- a/lib/pages/dynamics/widgets/author_panel.dart +++ b/lib/pages/dynamics/widgets/author_panel.dart @@ -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, ), ), diff --git a/lib/pages/video/detail/reply/widgets/reply_item.dart b/lib/pages/video/detail/reply/widgets/reply_item.dart index b9e9e9f0..a4d409bb 100644 --- a/lib/pages/video/detail/reply/widgets/reply_item.dart +++ b/lib/pages/video/detail/reply/widgets/reply_item.dart @@ -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), ); }, diff --git a/lib/utils/storage.dart b/lib/utils/storage.dart index 61883da1..f109255d 100644 --- a/lib/utils/storage.dart +++ b/lib/utils/storage.dart @@ -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 setting; static late final Box 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 init() async { final Directory dir = await getApplicationSupportDirectory(); final String path = dir.path;