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

View File

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

View File

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

View File

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

View File

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

View File

@@ -228,7 +228,7 @@ class _MatchInfoPageState extends CommonDynPageState<MatchInfoPage> {
replyItem: response[index],
replyLevel: 1,
replyReply: (replyItem, id) =>
replyReply(context, replyItem, id),
replyReply(context, replyItem, id, theme),
onReply: (replyItem) => controller.onReply(
context,
replyItem: replyItem,
@@ -258,14 +258,26 @@ class _MatchInfoPageState extends CommonDynPageState<MatchInfoPage> {
}
@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), () {
int oid = replyItem.oid.toInt();
int rpid = replyItem.id.toInt();
Get.to(
Scaffold(
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(
child: VideoReplyReplyPanel(
enableSlide: false,

View File

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

View File

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