mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -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
|
||||
|
||||
@@ -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),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user