diff --git a/lib/pages/video/widgets/header_control.dart b/lib/pages/video/widgets/header_control.dart index 50243fd2c..5bf8d67f6 100644 --- a/lib/pages/video/widgets/header_control.dart +++ b/lib/pages/video/widgets/header_control.dart @@ -324,18 +324,19 @@ class HeaderControlState extends State { leading: const Icon(Icons.hourglass_top_outlined, size: 20), title: const Text('定时关闭', style: titleStyle), ), - ListTile( - dense: true, - onTap: () { - Get.back(); - videoDetailCtr.editPlayUrl(); - }, - leading: const Icon( - Icons.link, - size: 20, + if (!isFileSource) + ListTile( + dense: true, + onTap: () { + Get.back(); + videoDetailCtr.editPlayUrl(); + }, + leading: const Icon( + Icons.link, + size: 20, + ), + title: const Text('播放地址', style: titleStyle), ), - title: const Text('播放地址', style: titleStyle), - ), if (!isFileSource) ListTile( dense: true, diff --git a/lib/pages/whisper_block/view.dart b/lib/pages/whisper_block/view.dart index 4d6e96439..2208974a8 100644 --- a/lib/pages/whisper_block/view.dart +++ b/lib/pages/whisper_block/view.dart @@ -110,12 +110,13 @@ class _WhisperBlockPageState extends State { ), ], ) - : SizedBox.expand( + : Align( + alignment: const Alignment(0, -0.5), child: Column( + spacing: 6, + mainAxisSize: MainAxisSize.min, children: [ - const Spacer(), SvgPicture.asset("assets/images/error.svg", height: 156), - const SizedBox(height: 6), const Text( '还未添加屏蔽词', style: TextStyle( @@ -123,9 +124,7 @@ class _WhisperBlockPageState extends State { fontWeight: FontWeight.bold, ), ), - const SizedBox(height: 6), const Text('添加后,将不再接受包含屏蔽词的消息'), - const SizedBox(height: 6), FilledButton.tonal( onPressed: _onAdd, style: FilledButton.styleFrom( @@ -139,7 +138,6 @@ class _WhisperBlockPageState extends State { ], ), ), - const Spacer(flex: 2), ], ), ), diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index 3cdaded12..b897fdf90 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -878,7 +878,7 @@ class _PLVideoPlayerState extends State if (plPlayerController.isAnim) BottomControlType.superResolution, if (isNotFileSource && plPlayerController.showViewPoints) BottomControlType.viewPoints, - if (isNotFileSource || anySeason) BottomControlType.episode, + if (isNotFileSource && anySeason) BottomControlType.episode, if (flag) BottomControlType.fit, if (isNotFileSource) BottomControlType.aiTranslate, BottomControlType.subtitle, diff --git a/lib/utils/em.dart b/lib/utils/em.dart index 352dd26b2..3b7c7dd7f 100644 --- a/lib/utils/em.dart +++ b/lib/utils/em.dart @@ -1,5 +1,3 @@ -import 'package:html/parser.dart' show parse; - abstract class Em { static final _exp = RegExp('<[^>]*>([^<]*)]*>'); @@ -19,7 +17,13 @@ abstract class Em { }, onNonMatch: (String str) { if (str != '') { - str = decodeHtmlEntities(str); + str = str + .replaceAll('<', '<') + .replaceAll('>', '>') + .replaceAll('"', '"') + .replaceAll(''', "'") + .replaceAll(' ', " ") + .replaceAll('&', "&"); res.add((isEm: false, text: str)); } return ''; @@ -27,8 +31,4 @@ abstract class Em { ); return res; } - - static String decodeHtmlEntities(String title) { - return parse(title).body?.text ?? title; - } } diff --git a/lib/utils/page_utils.dart b/lib/utils/page_utils.dart index 136649fcc..7e2af9917 100644 --- a/lib/utils/page_utils.dart +++ b/lib/utils/page_utils.dart @@ -654,25 +654,29 @@ abstract class PageUtils { barrierLabel: '', barrierDismissible: true, pageBuilder: (buildContext, animation, secondaryAnimation) { - return Get.context!.isPortrait - ? SafeArea( - child: Column( - children: [ - const Spacer(flex: 3), - Expanded(flex: 7, child: child), - if (isFullScreen() && padding != null) - SizedBox(height: padding), - ], - ), - ) - : SafeArea( - child: Row( - children: [ - const Spacer(), - Expanded(child: child), - ], - ), - ); + if (Get.context!.isPortrait) { + return SafeArea( + child: FractionallySizedBox( + heightFactor: 0.7, + widthFactor: 1.0, + alignment: Alignment.bottomCenter, + child: isFullScreen() && padding != null + ? Padding( + padding: EdgeInsets.only(bottom: padding), + child: child, + ) + : child, + ), + ); + } + return SafeArea( + child: FractionallySizedBox( + widthFactor: 0.5, + heightFactor: 1.0, + alignment: Alignment.centerRight, + child: child, + ), + ); }, transitionDuration: const Duration(milliseconds: 350), transitionBuilder: (context, animation, secondaryAnimation, child) {