From 88344f9ed22202147cf7e00c99e97e0913f3bec1 Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Fri, 24 Feb 2023 15:53:58 -0600 Subject: [PATCH] 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 --- src/khoj/interface/web/index.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/khoj/interface/web/index.html b/src/khoj/interface/web/index.html index 98914397..3c1e03d7 100644 --- a/src/khoj/interface/web/index.html +++ b/src/khoj/interface/web/index.html @@ -56,7 +56,9 @@ } else if (type === "ledger") { return render_ledger(query, data); } else { - return `
${JSON.stringify(data, null, 2)}
`; + return `
` + + data.map((item) => `

${item.entry}

`).join("\n") + + `
`; } } @@ -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;