diff --git a/lib/pages/dynamics/view.dart b/lib/pages/dynamics/view.dart index 68691e81b..45833f9ab 100644 --- a/lib/pages/dynamics/view.dart +++ b/lib/pages/dynamics/view.dart @@ -79,7 +79,7 @@ class _DynamicsPageState extends State Widget upPanelPart(ThemeData theme) { bool isTop = upPanelPosition == UpPanelPosition.top; - bool needBg = isTop || upPanelPosition.index > 1; + bool needBg = upPanelPosition.index > 1; return Material( color: needBg ? theme.colorScheme.surface : null, type: needBg ? MaterialType.canvas : MaterialType.transparency, diff --git a/lib/pages/dynamics/widgets/module_panel.dart b/lib/pages/dynamics/widgets/module_panel.dart index a6832469e..8345465f0 100644 --- a/lib/pages/dynamics/widgets/module_panel.dart +++ b/lib/pages/dynamics/widgets/module_panel.dart @@ -11,6 +11,7 @@ import 'package:PiliPlus/pages/dynamics/widgets/live_panel.dart'; import 'package:PiliPlus/pages/dynamics/widgets/live_panel_sub.dart'; import 'package:PiliPlus/pages/dynamics/widgets/live_rcmd_panel.dart'; import 'package:PiliPlus/pages/dynamics/widgets/video_panel.dart'; +import 'package:PiliPlus/utils/extension.dart'; import 'package:PiliPlus/utils/page_utils.dart'; import 'package:PiliPlus/utils/utils.dart'; import 'package:cached_network_image/cached_network_image.dart'; @@ -228,7 +229,8 @@ Widget module( width: 45, height: 45, fit: BoxFit.cover, - imageUrl: item.modules.moduleDynamic!.major!.common!.cover!, + imageUrl: item.modules.moduleDynamic!.major!.common!.cover! + .http2https, ), Expanded( child: Column( diff --git a/lib/pages/dynamics/widgets/vote.dart b/lib/pages/dynamics/widgets/vote.dart index eeab9785e..dbe094037 100644 --- a/lib/pages/dynamics/widgets/vote.dart +++ b/lib/pages/dynamics/widgets/vote.dart @@ -204,7 +204,7 @@ class PercentageChip extends StatelessWidget { labelPadding: EdgeInsets.zero, padding: EdgeInsets.zero, showCheckmark: false, - clipBehavior: Clip.antiAlias, + clipBehavior: Clip.hardEdge, label: Stack( clipBehavior: Clip.none, alignment: Alignment.center, diff --git a/lib/pages/member/controller.dart b/lib/pages/member/controller.dart index ce8464af8..72b9dfd63 100644 --- a/lib/pages/member/controller.dart +++ b/lib/pages/member/controller.dart @@ -6,6 +6,7 @@ import 'package:PiliPlus/http/user.dart'; import 'package:PiliPlus/http/video.dart'; import 'package:PiliPlus/models/common/member/tab_type.dart'; import 'package:PiliPlus/models_new/space/space/data.dart'; +import 'package:PiliPlus/models_new/space/space/live.dart'; import 'package:PiliPlus/models_new/space/space/setting.dart'; import 'package:PiliPlus/models_new/space/space/tab2.dart'; import 'package:PiliPlus/pages/common/common_data_controller.dart'; @@ -29,7 +30,7 @@ class MemberController extends CommonDataController AccountService accountService = Get.find(); - dynamic live; + Live? live; int? silence; String? endTime; diff --git a/lib/pages/member/widget/user_info_card.dart b/lib/pages/member/widget/user_info_card.dart index 93867c37d..dcd8153fc 100644 --- a/lib/pages/member/widget/user_info_card.dart +++ b/lib/pages/member/widget/user_info_card.dart @@ -3,6 +3,7 @@ import 'package:PiliPlus/common/widgets/pendant_avatar.dart'; import 'package:PiliPlus/models/common/image_preview_type.dart'; import 'package:PiliPlus/models_new/space/space/card.dart'; import 'package:PiliPlus/models_new/space/space/images.dart'; +import 'package:PiliPlus/models_new/space/space/live.dart'; import 'package:PiliPlus/utils/extension.dart'; import 'package:PiliPlus/utils/page_utils.dart'; import 'package:PiliPlus/utils/storage.dart' show Accounts; @@ -31,7 +32,7 @@ class UserInfoCard extends StatelessWidget { final SpaceCard card; final SpaceImages images; final VoidCallback onFollow; - final dynamic live; + final Live? live; final int? silence; final String? endTime; @@ -419,7 +420,7 @@ class UserInfoCard extends StatelessWidget { officialType: card.officialVerify?.type, isVip: (card.vip?.status ?? -1) > 0, garbPendantImage: card.pendant!.image!, - roomId: live is Map && live['liveStatus'] == 1 ? live['roomid'] : null, + roomId: live?.liveStatus == 1 ? live!.roomid : null, onTap: () => context .imageView(imgList: [SourceModel(url: card.face.http2https)]), )); diff --git a/lib/pages/search/view.dart b/lib/pages/search/view.dart index d1313bfba..5e1569581 100644 --- a/lib/pages/search/view.dart +++ b/lib/pages/search/view.dart @@ -159,6 +159,13 @@ class _SearchPageState extends State { style: theme.textTheme.titleMedium! .copyWith(height: 1, fontWeight: FontWeight.bold), ); + final outline = theme.colorScheme.outline; + final secondary = theme.colorScheme.secondary; + final style = TextStyle( + height: 1, + fontSize: 13, + color: outline, + ); return Padding( padding: EdgeInsets.fromLTRB(10, isHot ? 25 : 4, 4, 25), child: Column( @@ -177,43 +184,47 @@ class _SearchPageState extends State { const SizedBox(width: 14), SizedBox( height: 34, - child: TextButton.icon( + child: TextButton( onPressed: () => Get.toNamed( '/searchTrending', parameters: {'tag': _tag}, ), - label: Text( - '完整榜单', - style: TextStyle( - fontSize: 13, - color: theme.colorScheme.outline, - ), + child: Row( + children: [ + Text( + '完整榜单', + strutStyle: + const StrutStyle(leading: 0, height: 1), + style: style, + ), + Icon( + size: 18, + Icons.keyboard_arrow_right, + color: outline, + ), + ], ), - icon: Icon( - size: 16, - Icons.keyboard_arrow_right, - color: theme.colorScheme.outline, - ), - iconAlignment: IconAlignment.end, ), ), SizedBox( height: 34, - child: TextButton.icon( + child: TextButton( onPressed: () => Get.toNamed('/dynTopicRcmd'), - label: Text( - '话题', - style: TextStyle( - fontSize: 13, - color: theme.colorScheme.outline, - ), + child: Row( + children: [ + Text( + '话题', + strutStyle: + const StrutStyle(leading: 0, height: 1), + style: style, + ), + Icon( + size: 18, + Icons.keyboard_arrow_right, + color: outline, + ), + ], ), - icon: Icon( - size: 16, - Icons.keyboard_arrow_right, - color: theme.colorScheme.outline, - ), - iconAlignment: IconAlignment.end, ), ), ], @@ -232,12 +243,14 @@ class _SearchPageState extends State { icon: Icon( Icons.refresh_outlined, size: 18, - color: theme.colorScheme.secondary, + color: secondary, ), label: Text( '刷新', + strutStyle: const StrutStyle(leading: 0, height: 1), style: TextStyle( - color: theme.colorScheme.secondary, + height: 1, + color: secondary, ), ), ), @@ -257,6 +270,7 @@ class _SearchPageState extends State { } Widget _history(ThemeData theme) { + final secondary = theme.colorScheme.secondary; return Obx( () => Padding( padding: EdgeInsets.fromLTRB( @@ -324,11 +338,11 @@ class _SearchPageState extends State { icon: Icon( Icons.clear_all_outlined, size: 18, - color: theme.colorScheme.secondary, + color: secondary, ), label: Text( '清空', - style: TextStyle(color: theme.colorScheme.secondary), + style: TextStyle(color: secondary), ), ), ) diff --git a/lib/pages/search_trending/view.dart b/lib/pages/search_trending/view.dart index 891f3cc8a..2f4f49f2f 100644 --- a/lib/pages/search_trending/view.dart +++ b/lib/pages/search_trending/view.dart @@ -75,7 +75,7 @@ class _SearchTrendingPageState extends State { title: Opacity( opacity: _scrollRatio.value, child: Text( - 'B站热搜', + 'bilibili热搜', style: TextStyle( color: flag ? null : Colors.white, ), diff --git a/lib/pages/video/controller.dart b/lib/pages/video/controller.dart index 3ebb2fbfc..ee66150ef 100644 --- a/lib/pages/video/controller.dart +++ b/lib/pages/video/controller.dart @@ -696,8 +696,7 @@ class VideoDetailController extends GetxController void handleSBData(List list) { if (list.isNotEmpty) { try { - final duration = list.first.videoDuration ?? - plPlayerController.duration.value.inMilliseconds; + final duration = list.first.videoDuration ?? data.timeLength!; // segmentList segmentList.addAll(list .where((item) => diff --git a/lib/utils/page_utils.dart b/lib/utils/page_utils.dart index 761177201..4291a3ba8 100644 --- a/lib/utils/page_utils.dart +++ b/lib/utils/page_utils.dart @@ -210,9 +210,10 @@ class PageUtils { ], const SizedBox(height: 10), Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ + const SizedBox(width: 18), const Text('倒计时结束:', style: titleStyle), + const Spacer(), ActionRowLineItem( onTap: () { shutdownTimerService.exitApp = false; @@ -221,6 +222,7 @@ class PageUtils { text: " 暂停视频 ", selectStatus: !shutdownTimerService.exitApp, ), + const Spacer(), ActionRowLineItem( onTap: () { shutdownTimerService.exitApp = true; @@ -228,7 +230,8 @@ class PageUtils { }, text: " 退出APP ", selectStatus: shutdownTimerService.exitApp, - ) + ), + const SizedBox(width: 25), ], ), ], diff --git a/lib/utils/theme_utils.dart b/lib/utils/theme_utils.dart index b1c8b08f6..a99dff4fe 100644 --- a/lib/utils/theme_utils.dart +++ b/lib/utils/theme_utils.dart @@ -110,11 +110,13 @@ class ThemeUtils { ), ), ); - if (isDark && GStorage.isPureBlackTheme) { - themeData = darkenTheme(themeData); - } - if (isDark && GStorage.darkVideoPage) { - MyApp.darkThemeData = themeData; + if (isDark) { + if (GStorage.isPureBlackTheme) { + themeData = darkenTheme(themeData); + } + if (GStorage.darkVideoPage) { + MyApp.darkThemeData = themeData; + } } return themeData; }