Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-08-26 18:16:32 +08:00
parent fb8a06787b
commit 91627df804
8 changed files with 44 additions and 44 deletions

View File

@@ -71,7 +71,7 @@ class _ArticlePageState extends CommonDynPageState<ArticlePage> {
final theme = Theme.of(context); final theme = Theme.of(context);
final size = MediaQuery.sizeOf(context); final size = MediaQuery.sizeOf(context);
final maxWidth = size.width; final maxWidth = size.width;
final isPortrait = size.height >= maxWidth; isPortrait = size.height >= maxWidth;
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
appBar: _buildAppBar(isPortrait, maxWidth), appBar: _buildAppBar(isPortrait, maxWidth),
@@ -441,7 +441,7 @@ class _ArticlePageState extends CommonDynPageState<ArticlePage> {
replyItem: response[index], replyItem: response[index],
replyLevel: 1, replyLevel: 1,
replyReply: (replyItem, id) => replyReply: (replyItem, id) =>
replyReply(context, replyItem, id), replyReply(context, replyItem, id, theme),
onReply: (replyItem) => controller.onReply( onReply: (replyItem) => controller.onReply(
context, context,
replyItem: replyItem, replyItem: replyItem,

View File

@@ -31,6 +31,7 @@ abstract class CommonDynPageState<T extends CommonDynPage> extends State<T>
dynamic get arguments; dynamic get arguments;
late EdgeInsets padding; late EdgeInsets padding;
late bool isPortrait;
@override @override
void didChangeDependencies() { void didChangeDependencies() {
@@ -127,7 +128,7 @@ abstract class CommonDynPageState<T extends CommonDynPage> extends State<T>
replyItem: response[index], replyItem: response[index],
replyLevel: 1, replyLevel: 1,
replyReply: (replyItem, id) => replyReply: (replyItem, id) =>
replyReply(context, replyItem, id), replyReply(context, replyItem, id, theme),
onReply: (replyItem) => controller.onReply( onReply: (replyItem) => controller.onReply(
context, context,
replyItem: replyItem, replyItem: replyItem,
@@ -159,7 +160,12 @@ abstract class CommonDynPageState<T extends CommonDynPage> extends State<T>
}; };
} }
void replyReply(BuildContext context, ReplyInfo replyItem, int? id) { void replyReply(
BuildContext context,
ReplyInfo replyItem,
int? id,
ThemeData theme,
) {
EasyThrottle.throttle('replyReply', const Duration(milliseconds: 500), () { EasyThrottle.throttle('replyReply', const Duration(milliseconds: 500), () {
int oid = replyItem.oid.toInt(); int oid = replyItem.oid.toInt();
int rpid = replyItem.id.toInt(); int rpid = replyItem.id.toInt();
@@ -182,9 +188,7 @@ abstract class CommonDynPageState<T extends CommonDynPage> extends State<T>
], ],
shape: Border( shape: Border(
bottom: BorderSide( bottom: BorderSide(
color: Theme.of( color: theme.colorScheme.outline.withValues(alpha: 0.1),
context,
).colorScheme.outline.withValues(alpha: 0.1),
), ),
), ),
), ),
@@ -198,7 +202,7 @@ abstract class CommonDynPageState<T extends CommonDynPage> extends State<T>
firstFloor: replyItem, firstFloor: replyItem,
), ),
); );
if (this.context.isPortrait) { if (isPortrait) {
Get.to( Get.to(
replyReplyPage, replyReplyPage,
routeName: 'dynamicDetail-Copy', routeName: 'dynamicDetail-Copy',

View File

@@ -55,7 +55,7 @@ class _DynamicDetailPageState extends CommonDynPageState<DynamicDetailPage> {
final theme = Theme.of(context); final theme = Theme.of(context);
final size = MediaQuery.sizeOf(context); final size = MediaQuery.sizeOf(context);
final maxWidth = size.width; final maxWidth = size.width;
final isPortrait = size.height >= maxWidth; isPortrait = size.height >= maxWidth;
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
appBar: _buildAppBar(isPortrait, maxWidth), appBar: _buildAppBar(isPortrait, maxWidth),

View File

@@ -95,7 +95,7 @@ class _FavPanelState extends State<FavPanel> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final theme = Theme.of(context); final theme = Theme.of(context).colorScheme;
return Column( return Column(
children: [ children: [
AppBar( AppBar(
@@ -117,7 +117,7 @@ class _FavPanelState extends State<FavPanel> {
}), }),
icon: Icon( icon: Icon(
Icons.add, Icons.add,
color: theme.colorScheme.primary, color: theme.primary,
), ),
label: const Text('新建收藏夹'), label: const Text('新建收藏夹'),
style: TextButton.styleFrom( style: TextButton.styleFrom(
@@ -134,7 +134,7 @@ class _FavPanelState extends State<FavPanel> {
Expanded(child: _buildBody), Expanded(child: _buildBody),
Divider( Divider(
height: 1, height: 1,
color: theme.disabledColor.withValues(alpha: 0.08), color: theme.outline.withValues(alpha: 0.1),
), ),
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
@@ -144,39 +144,25 @@ class _FavPanelState extends State<FavPanel> {
bottom: MediaQuery.viewPaddingOf(context).bottom + 12, bottom: MediaQuery.viewPaddingOf(context).bottom + 12,
), ),
child: Row( child: Row(
spacing: 25,
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[ children: [
TextButton( FilledButton.tonal(
onPressed: Get.back, onPressed: Get.back,
style: TextButton.styleFrom( style: FilledButton.styleFrom(
padding: const EdgeInsets.symmetric( visualDensity: VisualDensity.compact,
horizontal: 20, foregroundColor: theme.outline,
vertical: 10, backgroundColor: theme.onInverseSurface,
),
visualDensity: const VisualDensity(
horizontal: -1,
vertical: -2,
),
foregroundColor: theme.colorScheme.outline,
backgroundColor: theme.colorScheme.onInverseSurface,
), ),
child: const Text('取消'), child: const Text('取消'),
), ),
const SizedBox(width: 25),
FilledButton.tonal( FilledButton.tonal(
onPressed: () { onPressed: () {
feedBack(); feedBack();
widget.ctr.actionFavVideo(); widget.ctr.actionFavVideo();
}, },
style: FilledButton.styleFrom( style: FilledButton.styleFrom(
padding: const EdgeInsets.symmetric( visualDensity: VisualDensity.compact,
horizontal: 20,
vertical: 10,
),
visualDensity: const VisualDensity(
horizontal: -1,
vertical: -2,
),
), ),
child: const Text('完成'), child: const Text('完成'),
), ),

View File

@@ -145,12 +145,10 @@ class _GroupPanelState extends State<GroupPanel> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
TextButton( FilledButton.tonal(
onPressed: onSave, onPressed: onSave,
style: TextButton.styleFrom( style: FilledButton.styleFrom(
padding: const EdgeInsets.only(left: 30, right: 30), visualDensity: VisualDensity.compact,
foregroundColor: theme.colorScheme.onPrimary,
backgroundColor: theme.colorScheme.primary,
), ),
child: Obx(() => Text(showDefaultBtn.value ? '保存至默认分组' : '保存')), child: Obx(() => Text(showDefaultBtn.value ? '保存至默认分组' : '保存')),
), ),

View File

@@ -228,7 +228,7 @@ class _MatchInfoPageState extends CommonDynPageState<MatchInfoPage> {
replyItem: response[index], replyItem: response[index],
replyLevel: 1, replyLevel: 1,
replyReply: (replyItem, id) => replyReply: (replyItem, id) =>
replyReply(context, replyItem, id), replyReply(context, replyItem, id, theme),
onReply: (replyItem) => controller.onReply( onReply: (replyItem) => controller.onReply(
context, context,
replyItem: replyItem, replyItem: replyItem,
@@ -258,14 +258,26 @@ class _MatchInfoPageState extends CommonDynPageState<MatchInfoPage> {
} }
@override @override
void replyReply(BuildContext context, ReplyInfo replyItem, int? id) { void replyReply(
BuildContext context,
ReplyInfo replyItem,
int? id,
ThemeData theme,
) {
EasyThrottle.throttle('replyReply', const Duration(milliseconds: 500), () { EasyThrottle.throttle('replyReply', const Duration(milliseconds: 500), () {
int oid = replyItem.oid.toInt(); int oid = replyItem.oid.toInt();
int rpid = replyItem.id.toInt(); int rpid = replyItem.id.toInt();
Get.to( Get.to(
Scaffold( Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
appBar: AppBar(title: const Text('评论详情')), appBar: AppBar(
title: const Text('评论详情'),
shape: Border(
bottom: BorderSide(
color: theme.colorScheme.outline.withValues(alpha: 0.1),
),
),
),
body: ViewSafeArea( body: ViewSafeArea(
child: VideoReplyReplyPanel( child: VideoReplyReplyPanel(
enableSlide: false, enableSlide: false,

View File

@@ -75,7 +75,7 @@ class _MemberPageState extends State<MemberPage> {
children: [ children: [
if ((_userController.tab2?.length ?? 0) > 1) if ((_userController.tab2?.length ?? 0) > 1)
SizedBox( SizedBox(
height: 40, height: 45,
child: TabBar( child: TabBar(
controller: _userController.tabController, controller: _userController.tabController,
tabs: _userController.tabs, tabs: _userController.tabs,

View File

@@ -41,7 +41,7 @@ class _RcmdPageState extends CommonPageState<RcmdPage, RcmdController>
SliverPadding( SliverPadding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: StyleString.cardSpace, top: StyleString.cardSpace,
bottom: MediaQuery.viewPaddingOf(context).bottom, bottom: MediaQuery.viewPaddingOf(context).bottom + 100,
), ),
sliver: Obx(() => _buildBody(controller.loadingState.value)), sliver: Obx(() => _buildBody(controller.loadingState.value)),
), ),