opt: pages

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-28 21:57:57 +08:00
parent 959d4de78a
commit 5231faf254
18 changed files with 680 additions and 717 deletions

View File

@@ -69,7 +69,11 @@ class _SearchPanelState extends State<SearchPanel>
SliverGrid(
gridDelegate: SliverGridDelegateWithExtentAndRatio(
mainAxisSpacing: 2,
maxCrossAxisExtent: Grid.smallCardWidth * 2,
maxCrossAxisExtent: (widget.searchType == SearchType.video ||
widget.searchType == SearchType.article
? Grid.mediumCardWidth
: Grid.smallCardWidth) *
2,
childAspectRatio: StyleString.aspectRatio *
(widget.searchType == SearchType.media_bangumi ||
widget.searchType == SearchType.media_ft

View File

@@ -153,61 +153,54 @@ Widget searchArticlePanel(context, searchPanelCtr, LoadingState loadingState) {
);
}),
),
const SizedBox(width: 10),
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(
10, 2, 6, 0),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
RichText(
maxLines: 2,
textScaler:
MediaQuery.textScalerOf(
context),
text: TextSpan(
children: [
for (var i in loadingState
.response[index]
.title) ...[
TextSpan(
text: i['text'],
style: TextStyle(
color: i['type'] == 'em'
? Theme.of(context)
.colorScheme
.primary
: Theme.of(context)
.colorScheme
.onSurface,
),
),
]
],
),
),
const Spacer(),
Text(
Utils.dateFormat(
loadingState.response[index]
.pubTime,
formatType: 'detail'),
style: textStyle),
Row(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text.rich(
maxLines: 2,
TextSpan(
children: [
Text(
'${loadingState.response[index].view}浏览',
style: textStyle),
Text('', style: textStyle),
Text(
'${loadingState.response[index].reply}评论',
style: textStyle),
for (var i in loadingState
.response[index].title) ...[
TextSpan(
text: i['text'],
style: TextStyle(
color: i['type'] == 'em'
? Theme.of(context)
.colorScheme
.primary
: Theme.of(context)
.colorScheme
.onSurface,
),
),
]
],
),
],
),
),
const Spacer(),
Text(
Utils.dateFormat(
loadingState
.response[index].pubTime,
formatType: 'detail'),
style: textStyle),
Row(
children: [
Text(
'${loadingState.response[index].view}浏览',
style: textStyle),
Text('', style: textStyle),
Text(
'${loadingState.response[index].reply}评论',
style: textStyle),
],
),
],
),
),
],

View File

@@ -127,9 +127,8 @@ class LiveContent extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
RichText(
textScaler: MediaQuery.textScalerOf(context),
text: TextSpan(
Text.rich(
TextSpan(
children: [
for (var i in liveItem.title) ...[
TextSpan(

View File

@@ -75,12 +75,10 @@ Widget searchBangumiPanel(context, ctr, LoadingState loadingState) {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 4),
RichText(
Text.rich(
// maxLines: 1,
// overflow: TextOverflow.ellipsis,
textScaler:
MediaQuery.textScalerOf(context),
text: TextSpan(
TextSpan(
style: TextStyle(
color: Theme.of(context)
.colorScheme