mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-22 19:51:11 +08:00
@@ -22,9 +22,10 @@ class SearchArticleController
|
||||
}
|
||||
|
||||
void jump2Article() {
|
||||
String? cvid = RegExp(r'^cv(id)?(\d+)$', caseSensitive: false)
|
||||
.matchAsPrefix(keyword)
|
||||
?.group(2);
|
||||
String? cvid = RegExp(
|
||||
r'^cv(id)?(\d+)$',
|
||||
caseSensitive: false,
|
||||
).matchAsPrefix(keyword)?.group(2);
|
||||
if (cvid != null) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
Get.toNamed(
|
||||
@@ -108,8 +109,8 @@ class SearchArticleController
|
||||
: null,
|
||||
textColor:
|
||||
item['value'] == currentOrderFilterval.value
|
||||
? theme.colorScheme.onSecondaryContainer
|
||||
: null,
|
||||
? theme.colorScheme.onSecondaryContainer
|
||||
: null,
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
|
||||
@@ -19,8 +19,13 @@ class SearchArticlePanel extends CommonSearchPanel {
|
||||
State<SearchArticlePanel> createState() => _SearchArticlePanelState();
|
||||
}
|
||||
|
||||
class _SearchArticlePanelState extends CommonSearchPanelState<
|
||||
SearchArticlePanel, SearchArticleData, SearchArticleItemModel> {
|
||||
class _SearchArticlePanelState
|
||||
extends
|
||||
CommonSearchPanelState<
|
||||
SearchArticlePanel,
|
||||
SearchArticleData,
|
||||
SearchArticleItemModel
|
||||
> {
|
||||
@override
|
||||
late final SearchArticleController controller = Get.put(
|
||||
SearchArticleController(
|
||||
|
||||
@@ -43,15 +43,17 @@ class SearchArticleItem extends StatelessWidget {
|
||||
if (item.imageUrls?.isNotEmpty == true)
|
||||
AspectRatio(
|
||||
aspectRatio: StyleString.aspectRatio,
|
||||
child: LayoutBuilder(builder: (context, boxConstraints) {
|
||||
double maxWidth = boxConstraints.maxWidth;
|
||||
double maxHeight = boxConstraints.maxHeight;
|
||||
return NetworkImgLayer(
|
||||
width: maxWidth,
|
||||
height: maxHeight,
|
||||
src: item.imageUrls?.firstOrNull,
|
||||
);
|
||||
}),
|
||||
child: LayoutBuilder(
|
||||
builder: (context, boxConstraints) {
|
||||
double maxWidth = boxConstraints.maxWidth;
|
||||
double maxHeight = boxConstraints.maxHeight;
|
||||
return NetworkImgLayer(
|
||||
width: maxWidth,
|
||||
height: maxHeight,
|
||||
src: item.imageUrls?.firstOrNull,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
@@ -62,16 +64,19 @@ class SearchArticleItem extends StatelessWidget {
|
||||
Text.rich(
|
||||
maxLines: 2,
|
||||
TextSpan(
|
||||
children: item.title
|
||||
.map((e) => TextSpan(
|
||||
text: e.text,
|
||||
style: TextStyle(
|
||||
color: e.isEm
|
||||
? theme.colorScheme.primary
|
||||
: theme.colorScheme.onSurface,
|
||||
),
|
||||
))
|
||||
.toList()),
|
||||
children: item.title
|
||||
.map(
|
||||
(e) => TextSpan(
|
||||
text: e.text,
|
||||
style: TextStyle(
|
||||
color: e.isEm
|
||||
? theme.colorScheme.primary
|
||||
: theme.colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Text(
|
||||
|
||||
Reference in New Issue
Block a user