Add sidebar entry
This commit is contained in:
parent
e456c1d9c5
commit
51ae2966f1
@ -310,10 +310,12 @@ router
|
||||
|
||||
ctx.body = await searchView({ messages, query });
|
||||
})
|
||||
.get("/imageSearch/", async (ctx) => {
|
||||
.get("/imageSearch", async (ctx) => {
|
||||
const { query } = ctx.query;
|
||||
|
||||
const blobs = await blob.search({ query });
|
||||
const blobs = query
|
||||
? await blob.search({ query })
|
||||
: {}
|
||||
|
||||
ctx.body = await imageSearchView({ blobs, query });
|
||||
})
|
||||
|
@ -132,6 +132,7 @@ const template = (...elements) => {
|
||||
navLink({ href: "/mentions", emoji: "💬", text: i18n.mentions }),
|
||||
navLink({ href: "/inbox", emoji: "✉️", text: i18n.private }),
|
||||
navLink({ href: "/search", emoji: "🔍", text: i18n.search }),
|
||||
navLink({ href: "/imageSearch", emoji: "🖼️", text: "Image Search" }),
|
||||
navLink({ href: "/settings", emoji: "⚙", text: i18n.settings })
|
||||
)
|
||||
),
|
||||
@ -1092,7 +1093,7 @@ exports.imageSearchView = ({ blobs, query }) => {
|
||||
h1("Image Search"),
|
||||
form(
|
||||
{ action: "/imageSearch", method: "get" },
|
||||
label(i18n.searchLabel, searchInput),
|
||||
label("Enter words to search for images labelled with them", searchInput),
|
||||
button(
|
||||
{
|
||||
type: "submit",
|
||||
|
Loading…
Reference in New Issue
Block a user