mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-09-20 14:07:58 +00:00
chore: fix display search content area
This commit is contained in:
parent
471d2c0b50
commit
742dee9202
@ -212,24 +212,24 @@ class SearchResultPreview extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Column(
|
return SingleChildScrollView(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Opacity(
|
children: [
|
||||||
opacity: 0.5,
|
Opacity(
|
||||||
child: FlowyText(
|
opacity: 0.5,
|
||||||
LocaleKeys.commandPalette_pagePreview.tr(),
|
child: FlowyText(
|
||||||
fontSize: 12,
|
LocaleKeys.commandPalette_pagePreview.tr(),
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
const VSpace(6),
|
||||||
const VSpace(6),
|
FlowyText(
|
||||||
Expanded(
|
|
||||||
child: FlowyText(
|
|
||||||
data.content,
|
data.content,
|
||||||
maxLines: 30,
|
maxLines: null,
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ class SearchSummaryCell extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||||
child: FlowyText(
|
child: FlowyText(
|
||||||
summary.content,
|
summary.content,
|
||||||
maxLines: 20,
|
maxLines: 10,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -60,39 +60,41 @@ class SearchSummaryPreview extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Column(
|
return SingleChildScrollView(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
if (summary.highlights.isNotEmpty) ...[
|
children: [
|
||||||
|
if (summary.highlights.isNotEmpty) ...[
|
||||||
|
Opacity(
|
||||||
|
opacity: 0.5,
|
||||||
|
child: FlowyText(
|
||||||
|
LocaleKeys.commandPalette_aiOverviewMoreDetails.tr(),
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const VSpace(6),
|
||||||
|
SearchSummaryDetail(text: summary.highlights),
|
||||||
|
const VSpace(36),
|
||||||
|
],
|
||||||
|
|
||||||
Opacity(
|
Opacity(
|
||||||
opacity: 0.5,
|
opacity: 0.5,
|
||||||
child: FlowyText(
|
child: FlowyText(
|
||||||
LocaleKeys.commandPalette_aiOverviewMoreDetails.tr(),
|
LocaleKeys.commandPalette_aiOverviewSource.tr(),
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
// Sources
|
||||||
const VSpace(6),
|
const VSpace(6),
|
||||||
SearchSummaryHighlight(text: summary.highlights),
|
...summary.sources.map((e) => SearchSummarySource(source: e)),
|
||||||
const VSpace(36),
|
|
||||||
],
|
],
|
||||||
|
),
|
||||||
Opacity(
|
|
||||||
opacity: 0.5,
|
|
||||||
child: FlowyText(
|
|
||||||
LocaleKeys.commandPalette_aiOverviewSource.tr(),
|
|
||||||
fontSize: 12,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
// Sources
|
|
||||||
const VSpace(6),
|
|
||||||
...summary.sources.map((e) => SearchSummarySource(source: e)),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SearchSummaryHighlight extends StatelessWidget {
|
class SearchSummaryDetail extends StatelessWidget {
|
||||||
const SearchSummaryHighlight({
|
const SearchSummaryDetail({
|
||||||
required this.text,
|
required this.text,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
@ -101,7 +103,10 @@ class SearchSummaryHighlight extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return AIMarkdownText(markdown: text);
|
return SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
child: AIMarkdownText(markdown: text),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,7 +124,7 @@ class SearchSummarySource extends StatelessWidget {
|
|||||||
return FlowyTooltip(
|
return FlowyTooltip(
|
||||||
message: LocaleKeys.commandPalette_clickToOpenPage.tr(),
|
message: LocaleKeys.commandPalette_clickToOpenPage.tr(),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 30,
|
height: 40,
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
leftIcon: icon,
|
leftIcon: icon,
|
||||||
hoverColor:
|
hoverColor:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user