mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
Improve rendering search results of plugin content types on web interface
Render only the entry from plugin search response instead of raw json Use the results-ledger styling for results-plugin styling
This commit is contained in:
parent
c2814fce58
commit
88344f9ed2
1 changed files with 5 additions and 2 deletions
|
@ -56,7 +56,9 @@
|
|||
} else if (type === "ledger") {
|
||||
return render_ledger(query, data);
|
||||
} else {
|
||||
return `<pre id="json">${JSON.stringify(data, null, 2)}</pre>`;
|
||||
return `<div id="results-plugin">`
|
||||
+ data.map((item) => `<p>${item.entry}</p>`).join("\n")
|
||||
+ `</div>`;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -277,9 +279,10 @@
|
|||
#json {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
#results-plugin,
|
||||
#results-ledger {
|
||||
white-space: pre-line;
|
||||
text-align: left;
|
||||
white-space: pre-line;
|
||||
}
|
||||
#results-markdown {
|
||||
text-align: left;
|
||||
|
|
Loading…
Reference in a new issue