noogle: fixes

This commit is contained in:
Believethehype 2024-01-29 17:17:25 +01:00
parent 8862be65eb
commit df322def96
5 changed files with 19 additions and 4 deletions

View File

@ -0,0 +1,11 @@
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Noogle</ShortName>
<Description>Search the Nostr</Description>
<Url type="text/html" method="get" template="https://noogle.lol?search={searchTerms}"/>
<Image height="16" width="16" type="image/vnd.microsoft.icon">
https://noogle.lol/favicon.ico
</Image>
<moz:SearchForm>http://my-site/search</moz:SearchForm>
<Url type="application/opensearchdescription+xml" rel="self" template="https://noogle.lol/opensearch.xml"/>
</OpenSearchDescription>

View File

@ -6,6 +6,7 @@ import Nip07 from "@/components/Nip07.vue";
</script>
<template>
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Noogle Search" />
<main>

View File

@ -13,6 +13,8 @@ export default {
</script>
<template>
<div class="center">
<br>
<Search/>

View File

@ -29,8 +29,8 @@ const message = ref("");
onMounted(async () => {
let urlParams = new URLSearchParams(window.location.search);
if (urlParams.has('search')) {
message.value = urlParams.get('search')
if (urlParams.has('q')) {
message.value = urlParams.get('q')
await sleep(1000)
await send_search_request(message.value)
}
@ -348,6 +348,7 @@ defineProps({
<template>
<div class="greetings">
<img alt="Nostr logo" class="logo" src="../assets/nostr-purple.svg" />
<br>
@ -356,7 +357,7 @@ defineProps({
Search the Nostr with Data Vending Machines</h2>
<h3>
<br>
<input class="c-Input" type="search" autofocus placeholder="Search..." v-model="message" @keyup.enter="send_search_request(message)" @keydown.enter="nextInput">
<input class="c-Input" type="search" name="s" autofocus placeholder="Search..." v-model="message" @keyup.enter="send_search_request(message)" @keydown.enter="nextInput">
<button class="v-Button" @click="send_search_request(message)">Search the Nostr</button>
</h3>
<!-- <div class="collapse bg-base-200">

View File

@ -21,7 +21,7 @@ const store = createStore({
"wss://nos.lol",
"wss://pablof7z.nostr1.com",
"wss://relay.nostr.net",
"wss://relay.nostr.band",
//"wss://relay.nostr.band",
//"wss://nostr-pub.wellorder.net",
],
}