noogle: reformat code

This commit is contained in:
Believethehype
2024-11-04 08:16:44 +01:00
parent f7d62edf59
commit 61134622a6
44 changed files with 5974 additions and 5802 deletions

View File

@@ -2,13 +2,13 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/favicon.ico" rel="icon">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>Nostr decentralized search and other stuff</title>
<meta name="theme-color" content="#ffffff">
<meta content="#ffffff" name="theme-color">
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
<script src="/src/main.js" type="module"></script>
</body>
</html>

View File

@@ -1,8 +1,13 @@
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
"@/*": [
"./src/*"
]
}
},
"exclude": ["node_modules", "dist"]
"exclude": [
"node_modules",
"dist"
]
}

View File

@@ -12,14 +12,14 @@
},
"dependencies": {
"@getalby/sdk": "^3.4.0",
"@rust-nostr/nostr-sdk": "^0.14.0",
"@rust-nostr/nostr-sdk": "^0.14.1",
"@vuepic/vue-datepicker": "^7.4.1",
"@vueuse/core": "^10.7.2",
"bech32": "^2.0.0",
"bootstrap": "^5.3.2",
"daisyui": "^4.6.0",
"mini-toastr": "^0.8.1",
"nostr-login": "^1.6.6",
"nostr-login": "^1.6.7",
"nostr-tools": "^2.4.0",
"vue": "^3.4.15",
"vue-notifications": "^1.0.2",

View File

@@ -1,4 +1,5 @@
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<OpenSearchDescription xmlns:moz="http://www.mozilla.org/2006/browser/search/"
xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Noogle</ShortName>
<Description>Search the Nostr</Description>
<Url type="text/html" method="get" template="https://noogle.lol?search={searchTerms}"/>

View File

@@ -1,14 +1,10 @@
<script setup>
import ThreeColumnLayout from "./layouts/ThreeColumnLayout.vue";
import ProfileResultsTable from "@/components/ProfileResultTable.vue";
import router from "@/router/index.js";
</script>
<template>
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Noogle Search" />
<link href="/opensearch.xml" rel="search" title="Noogle Search" type="application/opensearchdescription+xml"/>
<main>
@@ -30,7 +26,6 @@ header {
}
@media (min-width: 768px) {
header {
display: flex;

View File

@@ -14,6 +14,7 @@
background-color: #ffffff;
}
}
a,
.green {
text-decoration: none;
@@ -35,6 +36,7 @@ a,
transition: 0.4s;
padding: 3px;
}
.menu {
color: white;
@apply btn bg-transparent border-transparent tracking-wide;

View File

@@ -62,12 +62,10 @@ body {
min-height: 100vh;
color: var(--color-text);
background: var(--color-background);
transition:
color 0.5s,
transition: color 0.5s,
background-color 0.5s;
line-height: 1.6;
font-family:
Inter,
font-family: Inter,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',

View File

@@ -1,8 +1,10 @@
<svg width="225" height="224" viewBox="0 0 225 224" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="224.047" height="224" rx="64" fill="url(#paint0_radial_855_5166)"/>
<path d="M162.441 135.941V88.0593C170.359 85.1674 176 77.5348 176 68.6696C176 57.2919 166.708 48 155.33 48C143.953 48 134.661 57.2444 134.661 68.6696C134.661 77.5822 140.302 85.1674 148.219 88.0593V135.941C147.698 136.13 147.176 136.367 146.655 136.604L87.3956 77.3452C88.6282 74.6904 89.2919 71.7511 89.2919 68.6696C89.2919 57.2444 80.0474 48 68.6696 48C57.2919 48 48 57.2444 48 68.6696C48 77.5822 53.6415 85.1674 61.5585 88.0593V135.941C53.6415 138.833 48 146.465 48 155.33C48 166.708 57.2444 176 68.6696 176C80.0948 176 89.3393 166.708 89.3393 155.33C89.3393 146.418 83.6978 138.833 75.7807 135.941V88.0593C76.3022 87.8696 76.8237 87.6326 77.3452 87.3956L136.604 146.655C135.372 149.31 134.708 152.249 134.708 155.33C134.708 166.708 143.953 176 155.378 176C166.803 176 176.047 166.708 176.047 155.33C176.047 146.418 170.406 138.833 162.489 135.941H162.441Z" fill="white"/>
<path d="M162.441 135.941V88.0593C170.359 85.1674 176 77.5348 176 68.6696C176 57.2919 166.708 48 155.33 48C143.953 48 134.661 57.2444 134.661 68.6696C134.661 77.5822 140.302 85.1674 148.219 88.0593V135.941C147.698 136.13 147.176 136.367 146.655 136.604L87.3956 77.3452C88.6282 74.6904 89.2919 71.7511 89.2919 68.6696C89.2919 57.2444 80.0474 48 68.6696 48C57.2919 48 48 57.2444 48 68.6696C48 77.5822 53.6415 85.1674 61.5585 88.0593V135.941C53.6415 138.833 48 146.465 48 155.33C48 166.708 57.2444 176 68.6696 176C80.0948 176 89.3393 166.708 89.3393 155.33C89.3393 146.418 83.6978 138.833 75.7807 135.941V88.0593C76.3022 87.8696 76.8237 87.6326 77.3452 87.3956L136.604 146.655C135.372 149.31 134.708 152.249 134.708 155.33C134.708 166.708 143.953 176 155.378 176C166.803 176 176.047 166.708 176.047 155.33C176.047 146.418 170.406 138.833 162.489 135.941H162.441Z"
fill="white"/>
<defs>
<radialGradient id="paint0_radial_855_5166" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(224.047 224) rotate(-135.006) scale(316.817 473.813)">
<radialGradient id="paint0_radial_855_5166" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"
gradientTransform="translate(224.047 224) rotate(-135.006) scale(316.817 473.813)">
<stop stop-color="#6951FA"/>
<stop offset="1" stop-color="#9151FA"/>
</radialGradient>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -74,31 +74,34 @@
</div>
<div className="chat chat-start">
<div className="chat-image avatar">
<div className="w-10 rounded-full">
<img alt="Tailwind CSS chat bubble component" src="https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg" />
<img alt="Tailwind CSS chat bubble component"
src="https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg"/>
</div>
</div>
<div className="chat-bubble">NIP 90 Data Vending Machines can perform multiple tasks leveraging the Nostr Protocol.</div>
<div className="chat-bubble">NIP 90 Data Vending Machines can perform multiple tasks leveraging the Nostr
Protocol.
</div>
</div>
<div className="chat chat-start">
<div className="chat-image avatar">
<div className="w-10 rounded-full">
<img alt="Tailwind CSS chat bubble component" src="https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg" />
<img alt="Tailwind CSS chat bubble component"
src="https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg"/>
</div>
</div>
<div className="chat-bubble">This Demo Application uses a Kind 5302 event to ask DVMs to search for content on the Nostr.</div>
<div className="chat-bubble">This Demo Application uses a Kind 5302 event to ask DVMs to search for content on the
Nostr.
</div>
</div>
<div className="chat chat-start">
<div className="chat-image avatar">
<div className="w-10 rounded-full">
<img alt="Tailwind CSS chat bubble component" src="https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg" />
<img alt="Tailwind CSS chat bubble component"
src="https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg"/>
</div>
</div>
<div className="chat-bubble">You can add from:npub.... to your search to filter content for a specific user.</div>
@@ -106,15 +109,19 @@
<div className="chat chat-start">
<div className="chat-image avatar">
<div className="w-10 rounded-full">
<img alt="Tailwind CSS chat bubble component" src="https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg" />
<img alt="Tailwind CSS chat bubble component"
src="https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg"/>
</div>
</div>
<div className="chat-bubble">When you're logged in (via getalby or nos2x extension) you can add from:me to search content from yourself</div>
<div className="chat-bubble">When you're logged in (via getalby or nos2x extension) you can add from:me to search
content from yourself
</div>
</div>
<div className="chat chat-start">
<div className="chat-image avatar">
<div className="w-10 rounded-full">
<img alt="Tailwind CSS chat bubble component" src="https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg" />
<img alt="Tailwind CSS chat bubble component"
src="https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg"/>
</div>
</div>
<div className="chat-bubble">This page then combines all the results from available search dvms.</div>
@@ -122,10 +129,13 @@
<div className="chat chat-start">
<div className="chat-image avatar">
<div className="w-10 rounded-full">
<img alt="Tailwind CSS chat bubble component" src="https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg" />
<img alt="Tailwind CSS chat bubble component"
src="https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg"/>
</div>
</div>
<div className="chat-bubble">This way we will be able to decentralize the most centralized thing on the internet. Search.</div>
<div className="chat-bubble">This way we will be able to decentralize the most centralized thing on the internet.
Search.
</div>
</div>
</template>
<script>
@@ -140,14 +150,17 @@ export default {
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}

View File

@@ -1,6 +1,5 @@
<script>
import ImageGeneration from "@/components/ChatGeneration.vue";
import Donate from "@/components/Donate.vue";
export default {
name: "Image",

View File

@@ -1,38 +1,17 @@
<script setup>
import {
Client,
Filter,
Timestamp,
Event,
Metadata,
PublicKey,
EventBuilder,
Tag,
EventId,
Nip19Event, Alphabet, Keys, nip04_decrypt, SecretKey
} from "@rust-nostr/nostr-sdk";
import {Event, EventBuilder, Filter, Keys, Tag, Timestamp} from "@rust-nostr/nostr-sdk";
import store from '../store';
import miniToastr from "mini-toastr";
import VueNotifications from "vue-notifications";
import {computed, watch} from "vue";
import deadnip89s from "@/components/data/deadnip89s.json";
import {data} from "autoprefixer";
import {requestProvider} from "webln";
import Newnote from "@/components/Newnote.vue";
import {ref} from "vue";
import ModalComponent from "../components/Newnote.vue";
import VueDatePicker from "@vuepic/vue-datepicker";
import {timestamp} from "@vueuse/core";
import {post_note, schedule, react_to_dvm, copyinvoice, copyurl, sleep, nextInput, get_user_infos, dvmreactions} from "../components/helper/Helper.vue"
import {zap, createBolt11Lud16, zaprequest} from "../components/helper/Zap.vue"
import {get_user_infos, nextInput, post_note, schedule, sleep} from "../components/helper/Helper.vue"
import {zap, zaprequest} from "../components/helper/Zap.vue"
import StringUtil from "@/components/helper/string.ts";
let dvms = []
let hasmultipleinputs = false
let requestids = []
@@ -79,7 +58,6 @@ async function generate_chat(message) {
let requestid;
let tags_t = []
for (let tag of tags) {
tags_t.push(Tag.parse(tag))
@@ -96,10 +74,6 @@ async function generate_chat(message) {
await client.sendEvent(signedEvent)
} catch (error) {
console.log(error);
}
@@ -163,8 +137,7 @@ async function listen() {
jsonentry.amount = event.tags[tag].asVec()[1]
if (event.tags[tag].asVec().length > 2) {
jsonentry.bolt11 = event.tags[tag].asVec()[2]
}
else{
} else {
let profiles = await get_user_infos([event.author.toHex()])
let created = 0
let current
@@ -189,14 +162,11 @@ async function listen() {
if (jsonentry.bolt11 === "") {
status = "error"
}
}
else {
} else {
console.log("NO LNURL")
}
}
else {
} else {
console.log("PROFILE NOT FOUND")
}
}
@@ -236,20 +206,16 @@ async function listen() {
}
}
else if (event.kind === 6905) {
} else if (event.kind === 6905) {
console.log(event.content)
}
else if (event.kind === 6050) {
} else if (event.kind === 6050) {
let entries = []
//console.log("6050:", event.content);
let entryfound = false
for (const el of store.state.nip89dvms) {
if (JSON.parse(el.event).pubkey === event.author.toHex().toString()) { // && el.kind === "5050" ) {
let jsonentry = {
id: event.author.toHex(),
@@ -267,8 +233,7 @@ async function listen() {
if (dvms.filter(i => i.id === jsonentry.id).length === 0) {
console.log("YES HERE")
dvms.push(jsonentry)
}
else{
} else {
dvms.find(i => i.id === event.author.toHex()).result = event.content
dvms.find(i => i.id === event.author.toHex()).status = "finished"
}
@@ -279,12 +244,9 @@ async function listen() {
}
store.commit('set_chat_dvm_results', dvms)
}
@@ -305,8 +267,7 @@ async function listen() {
if (dvms.filter(i => i.id === jsonentry.id).length === 0) {
console.log("IN THE OTHER THING")
dvms.push(jsonentry)
}
else{
} else {
dvms.find(i => i.id === event.author.toHex()).result = event.content
dvms.find(i => i.id === event.author.toHex()).status = "finished"
}
@@ -330,7 +291,6 @@ async function listen() {
const urlinput = ref("");
async function zap_local(invoice) {
let success = await zap(invoice)
if (success) {
@@ -348,7 +308,6 @@ defineProps({
})
const isModalOpened = ref(false);
const modalcontent = ref("");
const datetopost = ref(Date.now());
@@ -380,7 +339,8 @@ const submitHandler = async () => {
Ask AI Agents living on the Nostr</h2>
<h3>
<br>
<input class="c-Input" autofocus placeholder="What is Nostr?" v-model="message" @keyup.enter="generate_chat(message)" @keydown.enter="nextInput">
<input v-model="message" autofocus class="c-Input" placeholder="What is Nostr?"
@keyup.enter="generate_chat(message)" @keydown.enter="nextInput">
<button class="v-Button" @click="generate_chat(message)">Send</button>
</h3>
<!--<details class="collapse bg-base " className="advanced" >-->
@@ -397,7 +357,7 @@ const submitHandler = async () => {
<br>
<ModalComponent :isOpen="isModalOpened" @modal-close="closeModal" @submit="submitHandler" name="first-modal">
<ModalComponent :isOpen="isModalOpened" name="first-modal" @submit="submitHandler" @modal-close="closeModal">
<template #header>Share your creation on Nostr <br> <br></template>
<template #content>
@@ -408,16 +368,22 @@ const submitHandler = async () => {
<template #footer>
<div class="inline-flex flex-none">
<VueDatePicker :min-date="new Date()" :dark="true" style="max-width: 200px;" className="bg-base-200" teleport-center v-model="datetopost"></VueDatePicker>
<VueDatePicker v-model="datetopost" :dark="true" :min-date="new Date()" className="bg-base-200"
style="max-width: 200px;" teleport-center></VueDatePicker>
</div>
<div class="content-center">
<button className="v-Button" @click="schedule(modalcontent, datetopost)" @click.stop="closeModal"><img width="25px" style="margin-right: 5px" src="../../public/shipyard.ico"/>Schedule Note with Shipyard DVM</button>
<button className="v-Button" @click="schedule(modalcontent, datetopost)" @click.stop="closeModal"><img
src="../../public/shipyard.ico" style="margin-right: 5px" width="25px"/>Schedule Note with Shipyard DVM
</button>
<br>
or
<br>
<button className="v-Button" style="margin-bottom: 0px" @click="post_note(modalcontent)" @click.stop="closeModal"><img width="25px" style="margin-right: 5px;" src="../../public/favicon.ico"/>Post Note now</button>
<button className="v-Button" style="margin-bottom: 0px" @click="post_note(modalcontent)"
@click.stop="closeModal"><img src="../../public/favicon.ico" style="margin-right: 5px;" width="25px"/>Post
Note now
</button>
</div>
</template>
</ModalComponent>
@@ -425,10 +391,8 @@ const submitHandler = async () => {
<div class="max-w-5xl relative space-y-3">
<div class="grid grid-cols-1 gap-6">
<div className="card w-70 bg-base-100 shadow-xl flex flex-col" v-for="dvm in store.state.chatdvmreplies"
:key="dvm.id">
<div v-for="dvm in store.state.chatdvmreplies" :key="dvm.id"
className="card w-70 bg-base-100 shadow-xl flex flex-col">
<div className="card-body">
@@ -436,8 +400,8 @@ const submitHandler = async () => {
<div className="playeauthor-wrapper">
<figure className="w-28">
<img className="avatar" v-if="dvm.image && dvm.image !== ''" :src="dvm.image" alt="DVM Picture" />
<img class="avatar" v-else src="@/assets/nostr-purple.svg" />
<img v-if="dvm.image && dvm.image !== ''" :src="dvm.image" alt="DVM Picture" className="avatar"/>
<img v-else class="avatar" src="@/assets/nostr-purple.svg"/>
</figure>
<h2 className="card-title">{{ dvm.name }}</h2>
@@ -449,8 +413,6 @@ const submitHandler = async () => {
</div> -->
<div className="card-actions justify-end mt-auto">
<div className="tooltip mt-auto">
@@ -460,7 +422,9 @@ const submitHandler = async () => {
<button v-if="dvm.status === 'finished'" className="btn">Done</button>
<button v-if="dvm.status === 'paid'" className="btn">Paid, waiting for DVM..</button>
<button v-if="dvm.status === 'error'" className="btn">Error</button>
<button v-if="dvm.status === 'payment-required'" className="zap-Button" @click="zap_local(dvm.bolt11);">{{ dvm.amount/1000 }} Sats</button>
<button v-if="dvm.status === 'payment-required'" className="zap-Button" @click="zap_local(dvm.bolt11);">
{{ dvm.amount / 1000 }} Sats
</button>
</div>
@@ -475,24 +439,28 @@ const submitHandler = async () => {
<div class="flex">
<div v-if="dvm.result && store.state.pubkey.toHex() !== Keys.parse(store.state.nooglekey).publicKey.toHex()" >
<button @click="openModal('Look what I created on noogle.lol\n\n' + dvm.result)" style="margin-right: 5px" class="w-8 h-8 rounded-full bg-nostr border-white border-1 text-white flex items-center justify-center focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-black tooltip" data-top='Share' aria-label="make note" role="button">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-pencil" width="20" height="20" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z"></path>
<div
v-if="dvm.result && store.state.pubkey.toHex() !== Keys.parse(store.state.nooglekey).publicKey.toHex()">
<button aria-label="make note"
class="w-8 h-8 rounded-full bg-nostr border-white border-1 text-white flex items-center justify-center focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-black tooltip"
data-top='Share'
role="button" style="margin-right: 5px" @click="openModal('Look what I created on noogle.lol\n\n' + dvm.result)">
<svg class="icon icon-tabler icon-tabler-pencil" fill="none" height="20"
stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" viewBox="0 0 24 24"
width="20" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" stroke="none"></path>
<path d="M4 20h4l10.5 -10.5a1.5 1.5 0 0 0 -4 -4l-10.5 10.5v4"></path>
<line x1="13.5" y1="6.5" x2="17.5" y2="10.5"></line>
<line x1="13.5" x2="17.5" y1="6.5" y2="10.5"></line>
</svg>
</button>
</div>
<div v-if="dvm.result && store.state.pubkey.toHex() !== Keys.parse(store.state.nooglekey).publicKey.toHex()" style="margin-right: 5px">
<div v-if="dvm.result && store.state.pubkey.toHex() !== Keys.parse(store.state.nooglekey).publicKey.toHex()"
style="margin-right: 5px">
<!-- && !dvm.reactions.negativeUser && !dvm.reactions.positiveUser-->
<!-- <button @click="react_to_dvm(dvm, '👍')" class="w-8 h-8 rounded-full bg-nostr border-white border-1 text-white flex items-center justify-center focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-black tooltip" data-top='Share' aria-label="make note" role="button">-->
<!-- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-hand-thumbs-up" viewBox="0 0 16 16">-->
<!-- <path d="M8.864.046C7.908-.193 7.02.53 6.956 1.466c-.072 1.051-.23 2.016-.428 2.59-.125.36-.479 1.013-1.04 1.639-.557.623-1.282 1.178-2.131 1.41C2.685 7.288 2 7.87 2 8.72v4.001c0 .845.682 1.464 1.448 1.545 1.07.114 1.564.415 2.068.723l.048.03c.272.165.578.348.97.484.397.136.861.217 1.466.217h3.5c.937 0 1.599-.477 1.934-1.064a1.86 1.86 0 0 0 .254-.912c0-.152-.023-.312-.077-.464.201-.263.38-.578.488-.901.11-.33.172-.762.004-1.149.069-.13.12-.269.159-.403.077-.27.113-.568.113-.857 0-.288-.036-.585-.113-.856a2 2 0 0 0-.138-.362 1.9 1.9 0 0 0 .234-1.734c-.206-.592-.682-1.1-1.2-1.272-.847-.282-1.803-.276-2.516-.211a10 10 0 0 0-.443.05 9.4 9.4 0 0 0-.062-4.509A1.38 1.38 0 0 0 9.125.111zM11.5 14.721H8c-.51 0-.863-.069-1.14-.164-.281-.097-.506-.228-.776-.393l-.04-.024c-.555-.339-1.198-.731-2.49-.868-.333-.036-.554-.29-.554-.55V8.72c0-.254.226-.543.62-.65 1.095-.3 1.977-.996 2.614-1.708.635-.71 1.064-1.475 1.238-1.978.243-.7.407-1.768.482-2.85.025-.362.36-.594.667-.518l.262.066c.16.04.258.143.288.255a8.34 8.34 0 0 1-.145 4.725.5.5 0 0 0 .595.644l.003-.001.014-.003.058-.014a9 9 0 0 1 1.036-.157c.663-.06 1.457-.054 2.11.164.175.058.45.3.57.65.107.308.087.67-.266 1.022l-.353.353.353.354c.043.043.105.141.154.315.048.167.075.37.075.581 0 .212-.027.414-.075.582-.05.174-.111.272-.154.315l-.353.353.353.354c.047.047.109.177.005.488a2.2 2.2 0 0 1-.505.805l-.353.353.353.354c.006.005.041.05.041.17a.9.9 0 0 1-.121.416c-.165.288-.503.56-1.066.56z"/>-->
@@ -585,9 +553,6 @@ const submitHandler = async () => {
<!-- </div>-->
</div>
@@ -661,10 +626,9 @@ h3 {
.wotplayeauthor-wrapper {
padding: 0px;
display: flex;
;
display: flex;;
}
.wotavatar {
margin-right: 0px;
margin-left: 0px;

View File

@@ -4,7 +4,6 @@ import miniToastr from "mini-toastr";
import VueNotifications from "vue-notifications";
import {PublicKey, ZapDetails, ZapEntity, ZapType} from "@rust-nostr/nostr-sdk";
import store from "@/store.js";
import {data} from "autoprefixer";
export default {
@@ -18,7 +17,8 @@ export default {
nostrsdkpaymentaddr: "",
nostrsdkinvoice: "",
amount: 1000
}},
}
},
methods: {
async handleZap() {
@@ -44,8 +44,7 @@ export default {
if (lnaddress === this.nostrsdklnaddress) {
this.nostrsdkpaymentaddr = `https://chart.googleapis.com/chart?cht=qr&chl=${invoice}&chs=250x250&chld=M|0`;
this.nostrsdkinvoice = invoice
}
else{
} else {
this.dvmpaymentaddr = `https://chart.googleapis.com/chart?cht=qr&chl=${invoice}&chs=250x250&chld=M|0`;
this.dvminvoice = invoice
}
@@ -81,8 +80,7 @@ export default {
const callbackResponse = await fetch(`${callback}?amount=${amountInSats}`);
const obCallback = await callbackResponse.json();
return obCallback.pr;
}
catch (e) {
} catch (e) {
console.log(`LUD16: ${e}`);
return null;
}
@@ -94,20 +92,41 @@ export default {
<template>
<div className="dropdown dropdown-top">
<div tabIndex={0} role="button" class="v-Button"><svg class="relative w-5 h-5 mr-2 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg>Donate</div>
<div tabIndex={0} className="dropdown-content z-[1] -start-20 card card-compact w-64 p-2 shadow bg-primary text-primary-content">
<div class="v-Button" role="button" tabIndex={0}>
<svg class="relative w-5 h-5 mr-2 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg">
<path d="M13 10V3L4 14h7v7l9-11h-7z" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></path>
</svg>
Donate
</div>
<div className="dropdown-content z-[1] -start-20 card card-compact w-64 p-2 shadow bg-primary text-primary-content"
tabIndex={0}>
<div className="card-body">
<div>
<p>Sats:</p><input class="c-Input" v-model="amount" placeholder="1000">
<p>Sats:</p><input v-model="amount" class="c-Input" placeholder="1000">
</div>
<h3 className="card-title">Donate to Noogle</h3>
<button class="v-Button2" @click="zap(this.dvmlnaddress, amount)"><svg class="relative w-5 h-5 mr-2 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg>Donate</button>
<img v-if="this.dvmpaymentaddr" alt="Invoice" width="250" :src=this.dvmpaymentaddr @click="this.copyinvoice(this.dvminvoice)" />
<button class="v-Button2" @click="zap(this.dvmlnaddress, amount)">
<svg class="relative w-5 h-5 mr-2 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg">
<path d="M13 10V3L4 14h7v7l9-11h-7z" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></path>
</svg>
Donate
</button>
<img v-if="this.dvmpaymentaddr" :src=this.dvmpaymentaddr alt="Invoice" width="250"
@click="this.copyinvoice(this.dvminvoice)"/>
<h3 className="card-title">Donate to NostrSDK</h3>
<button class="v-Button2" @click="zap(this.nostrsdklnaddress, amount)"><svg class="relative w-5 h-5 mr-2 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg>Donate</button>
<img v-if="this.nostrsdkpaymentaddr" alt="Invoice" width="250" :src=this.nostrsdkpaymentaddr @click="this.copyinvoice(this.nostrsdkinvoice)" />
<button class="v-Button2" @click="zap(this.nostrsdklnaddress, amount)">
<svg class="relative w-5 h-5 mr-2 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg">
<path d="M13 10V3L4 14h7v7l9-11h-7z" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></path>
</svg>
Donate
</button>
<img v-if="this.nostrsdkpaymentaddr" :src=this.nostrsdkpaymentaddr alt="Invoice" width="250"
@click="this.copyinvoice(this.nostrsdkinvoice)"/>
</div>
</div>
</div>
@@ -119,6 +138,7 @@ export default {
@apply tracking-wide bg-black hover:bg-amber-400 focus:ring-white mb-2 inline-flex flex-none items-center rounded-lg border border-transparent px-3 py-1.5 text-sm leading-4 text-white transition-colors duration-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-gray-900;
height: 24px;
}
.v-Button2 {
@apply tracking-wide bg-black hover:bg-amber-400 focus:ring-white mb-2 inline-flex flex-none items-center rounded-lg border border-transparent px-3 py-1.5 text-sm leading-4 text-white transition-colors duration-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-gray-900;
}

File diff suppressed because one or more lines are too long

View File

@@ -24,7 +24,6 @@ export default {
</template>
<style scoped>
.center {

View File

@@ -1,6 +1,5 @@
<script>
import ImageGeneration from "@/components/ImageGeneration.vue";
import Donate from "@/components/Donate.vue";
export default {
name: "Image",

View File

@@ -1,38 +1,25 @@
<script setup>
import {
Client,
Filter,
Timestamp,
Event,
Metadata,
PublicKey,
EventBuilder,
Tag,
EventId,
Nip19Event, Alphabet, Keys, nip04_decrypt, SecretKey, Kind
} from "@rust-nostr/nostr-sdk";
import {Event, EventBuilder, Filter, Keys, PublicKey, Tag, Timestamp} from "@rust-nostr/nostr-sdk";
import store from '../store';
import miniToastr from "mini-toastr";
import VueNotifications from "vue-notifications";
import {computed, watch} from "vue";
import deadnip89s from "@/components/data/deadnip89s.json";
import {data} from "autoprefixer";
import {requestProvider} from "webln";
import Newnote from "@/components/Newnote.vue";
import {ref} from "vue";
import ModalComponent from "../components/Newnote.vue";
import VueDatePicker from "@vuepic/vue-datepicker";
import {timestamp} from "@vueuse/core";
import {post_note, schedule, react_to_dvm, copyinvoice, copyurl, sleep, nextInput, get_user_infos, dvmreactions} from "../components/helper/Helper.vue"
import {zap, createBolt11Lud16, zaprequest} from "../components/helper/Zap.vue"
import {
copyurl,
dvmreactions,
get_user_infos,
nextInput,
post_note,
schedule,
sleep
} from "../components/helper/Helper.vue"
import {zap, zaprequest} from "../components/helper/Zap.vue"
import StringUtil from "@/components/helper/string.ts";
let dvms = []
let hasmultipleinputs = false
let requestids = []
@@ -159,8 +146,7 @@ async function listen() {
jsonentry.amount = event.tags[tag].asVec()[1]
if (event.tags[tag].asVec().length > 2) {
jsonentry.bolt11 = event.tags[tag].asVec()[2]
}
else{
} else {
let profiles = await get_user_infos([event.author.toHex()])
let created = 0
let current
@@ -186,14 +172,11 @@ async function listen() {
console.log("no bolt 11")
//status = "error"
}
}
else {
} else {
console.log("NO LNURL")
}
}
else {
} else {
console.log("PROFILE NOT FOUND")
}
}
@@ -237,17 +220,14 @@ async function listen() {
}
}
else if (event.kind === 6905) {
} else if (event.kind === 6905) {
console.log(event.content)
}
else if (event.kind === 6100) {
} else if (event.kind === 6100) {
let entries = []
console.log("6100:", event.content);
for (const el of store.state.nip89dvms) {
let status = "unknown"
let jsonentry = {
@@ -299,7 +279,6 @@ async function listen() {
const urlinput = ref("");
async function zap_local(invoice) {
let success = await zap(invoice)
if (success) {
@@ -317,7 +296,6 @@ defineProps({
})
const isModalOpened = ref(false);
const modalcontent = ref("");
const datetopost = ref(Date.now());
@@ -349,16 +327,18 @@ const submitHandler = async () => {
Generate Images, the decentralized way</h2>
<h3>
<br>
<input class="c-Input" autofocus placeholder="A purple ostrich..." v-model="message" @keyup.enter="generate_image(message)" @keydown.enter="nextInput">
<input v-model="message" autofocus class="c-Input" placeholder="A purple ostrich..."
@keyup.enter="generate_image(message)" @keydown.enter="nextInput">
<button class="v-Button" @click="generate_image(message)">Generate Image</button>
</h3>
<details class="collapse bg-base " className="advanced">
<summary class="collapse-title font-thin bg">Advanced Options</summary>
<div class="collapse-content font-size-0" className="z-10" id="collapse-settings">
<div id="collapse-settings" class="collapse-content font-size-0" className="z-10">
<div>
<h4 className="inline-flex flex-none font-thin">Url to existing image:</h4>
<div className="inline-flex flex-none" style="width: 10px;"></div>
<input class="c-Input" style="width: 300px;" placeholder="https://image.nostr.build/image123.jpg" v-model="urlinput">
<input v-model="urlinput" class="c-Input" placeholder="https://image.nostr.build/image123.jpg"
style="width: 300px;">
</div>
</div>
</details>
@@ -366,7 +346,7 @@ const submitHandler = async () => {
<br>
<ModalComponent :isOpen="isModalOpened" @modal-close="closeModal" @submit="submitHandler" name="first-modal">
<ModalComponent :isOpen="isModalOpened" name="first-modal" @submit="submitHandler" @modal-close="closeModal">
<template #header>Share your creation on Nostr <br> <br></template>
<template #content>
@@ -377,16 +357,22 @@ const submitHandler = async () => {
<template #footer>
<div class="inline-flex flex-none">
<VueDatePicker :min-date="new Date()" :dark="true" style="max-width: 200px;" className="bg-base-200" teleport-center v-model="datetopost"></VueDatePicker>
<VueDatePicker v-model="datetopost" :dark="true" :min-date="new Date()" className="bg-base-200"
style="max-width: 200px;" teleport-center></VueDatePicker>
</div>
<div class="content-center">
<button className="v-Button" @click="schedule(modalcontent, datetopost)" @click.stop="closeModal"><img width="25px" style="margin-right: 5px" src="../../public/shipyard.ico"/>Schedule Note with Shipyard DVM</button>
<button className="v-Button" @click="schedule(modalcontent, datetopost)" @click.stop="closeModal"><img
src="../../public/shipyard.ico" style="margin-right: 5px" width="25px"/>Schedule Note with Shipyard DVM
</button>
<br>
or
<br>
<button className="v-Button" style="margin-bottom: 0px" @click="post_note(modalcontent)" @click.stop="closeModal"><img width="25px" style="margin-right: 5px;" src="../../public/favicon.ico"/>Post Note now</button>
<button className="v-Button" style="margin-bottom: 0px" @click="post_note(modalcontent)"
@click.stop="closeModal"><img src="../../public/favicon.ico" style="margin-right: 5px;" width="25px"/>Post
Note now
</button>
</div>
</template>
</ModalComponent>
@@ -394,17 +380,15 @@ const submitHandler = async () => {
<div class="max-w-5xl relative space-y-3">
<div class="grid grid-cols-1 gap-6">
<div className="card w-70 bg-base-100 shadow-xl flex flex-col" v-for="dvm in store.state.imagedvmreplies"
:key="dvm.id">
<div v-for="dvm in store.state.imagedvmreplies" :key="dvm.id"
className="card w-70 bg-base-100 shadow-xl flex flex-col">
<div className="card-body">
<div className="playeauthor-wrapper">
<figure className="w-20">
<img className="avatar" :src="dvm.image" alt="DVM Picture" />
<img :src="dvm.image" alt="DVM Picture" className="avatar"/>
</figure>
@@ -417,8 +401,6 @@ const submitHandler = async () => {
</div> -->
<div className="card-actions justify-end mt-auto">
<div className="tooltip mt-auto">
@@ -428,37 +410,44 @@ const submitHandler = async () => {
<button v-if="dvm.status === 'finished'" className="btn">Done</button>
<button v-if="dvm.status === 'paid'" className="btn">Paid, waiting for DVM..</button>
<button v-if="dvm.status === 'error'" className="btn">Error</button>
<button v-if="dvm.status === 'payment-required'" className="zap-Button" @click="zap_local(dvm.bolt11);">{{ dvm.amount/1000 }} Sats</button>
<button v-if="dvm.status === 'payment-required'" className="zap-Button" @click="zap_local(dvm.bolt11);">
{{ dvm.amount / 1000 }} Sats
</button>
</div>
</div>
<figure className="w-full">
<img v-if="dvm.result" :src="dvm.result" className="tooltip" data-top='Click to copy url' height="200" alt="DVM Picture" @click="copyurl(dvm.result)"/>
<img v-if="dvm.result" :src="dvm.result" alt="DVM Picture" className="tooltip" data-top='Click to copy url'
height="200" @click="copyurl(dvm.result)"/>
</figure>
<div class="flex">
<div v-if="dvm.result && store.state.pubkey.toHex() !== Keys.parse(store.state.nooglekey).publicKey.toHex()" >
<button @click="openModal('Look what I created on noogle.lol\n\n' + dvm.result)" style="margin-right: 5px" class="w-8 h-8 rounded-full bg-nostr border-white border-1 text-white flex items-center justify-center focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-black tooltip" data-top='Share' aria-label="make note" role="button">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-pencil" width="20" height="20" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z"></path>
<div
v-if="dvm.result && store.state.pubkey.toHex() !== Keys.parse(store.state.nooglekey).publicKey.toHex()">
<button aria-label="make note"
class="w-8 h-8 rounded-full bg-nostr border-white border-1 text-white flex items-center justify-center focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-black tooltip"
data-top='Share'
role="button" style="margin-right: 5px" @click="openModal('Look what I created on noogle.lol\n\n' + dvm.result)">
<svg class="icon icon-tabler icon-tabler-pencil" fill="none" height="20"
stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" viewBox="0 0 24 24"
width="20" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" stroke="none"></path>
<path d="M4 20h4l10.5 -10.5a1.5 1.5 0 0 0 -4 -4l-10.5 10.5v4"></path>
<line x1="13.5" y1="6.5" x2="17.5" y2="10.5"></line>
<line x1="13.5" x2="17.5" y1="6.5" y2="10.5"></line>
</svg>
</button>
</div>
<div v-if="dvm.result && store.state.pubkey.toHex() !== Keys.parse(store.state.nooglekey).publicKey.toHex()" style="margin-right: 5px">
<div v-if="dvm.result && store.state.pubkey.toHex() !== Keys.parse(store.state.nooglekey).publicKey.toHex()"
style="margin-right: 5px">
<!-- && !dvm.reactions.negativeUser && !dvm.reactions.positiveUser-->
<!-- <button @click="react_to_dvm(dvm, '👍')" class="w-8 h-8 rounded-full bg-nostr border-white border-1 text-white flex items-center justify-center focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-black tooltip" data-top='Share' aria-label="make note" role="button">-->
<!-- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-hand-thumbs-up" viewBox="0 0 16 16">-->
<!-- <path d="M8.864.046C7.908-.193 7.02.53 6.956 1.466c-.072 1.051-.23 2.016-.428 2.59-.125.36-.479 1.013-1.04 1.639-.557.623-1.282 1.178-2.131 1.41C2.685 7.288 2 7.87 2 8.72v4.001c0 .845.682 1.464 1.448 1.545 1.07.114 1.564.415 2.068.723l.048.03c.272.165.578.348.97.484.397.136.861.217 1.466.217h3.5c.937 0 1.599-.477 1.934-1.064a1.86 1.86 0 0 0 .254-.912c0-.152-.023-.312-.077-.464.201-.263.38-.578.488-.901.11-.33.172-.762.004-1.149.069-.13.12-.269.159-.403.077-.27.113-.568.113-.857 0-.288-.036-.585-.113-.856a2 2 0 0 0-.138-.362 1.9 1.9 0 0 0 .234-1.734c-.206-.592-.682-1.1-1.2-1.272-.847-.282-1.803-.276-2.516-.211a10 10 0 0 0-.443.05 9.4 9.4 0 0 0-.062-4.509A1.38 1.38 0 0 0 9.125.111zM11.5 14.721H8c-.51 0-.863-.069-1.14-.164-.281-.097-.506-.228-.776-.393l-.04-.024c-.555-.339-1.198-.731-2.49-.868-.333-.036-.554-.29-.554-.55V8.72c0-.254.226-.543.62-.65 1.095-.3 1.977-.996 2.614-1.708.635-.71 1.064-1.475 1.238-1.978.243-.7.407-1.768.482-2.85.025-.362.36-.594.667-.518l.262.066c.16.04.258.143.288.255a8.34 8.34 0 0 1-.145 4.725.5.5 0 0 0 .595.644l.003-.001.014-.003.058-.014a9 9 0 0 1 1.036-.157c.663-.06 1.457-.054 2.11.164.175.058.45.3.57.65.107.308.087.67-.266 1.022l-.353.353.353.354c.043.043.105.141.154.315.048.167.075.37.075.581 0 .212-.027.414-.075.582-.05.174-.111.272-.154.315l-.353.353.353.354c.047.047.109.177.005.488a2.2 2.2 0 0 1-.505.805l-.353.353.353.354c.006.005.041.05.041.17a.9.9 0 0 1-.121.416c-.165.288-.503.56-1.066.56z"/>-->
@@ -551,9 +540,6 @@ const submitHandler = async () => {
<!-- </div>-->
</div>
@@ -627,10 +613,9 @@ h3 {
.wotplayeauthor-wrapper {
padding: 0px;
display: flex;
;
display: flex;;
}
.wotavatar {
margin-right: 0px;
margin-left: 0px;

File diff suppressed because one or more lines are too long

View File

@@ -1,8 +1,6 @@
<script setup>
import {ref} from "vue";
import {onClickOutside} from '@vueuse/core'
import store from "@/store.js";
import {EventBuilder, PublicKey, Tag, Timestamp} from "@rust-nostr/nostr-sdk";
const props = defineProps({
isOpen: Boolean,
@@ -14,13 +12,12 @@ const target = ref(null)
onClickOutside(target, () => emit('modal-close'))
</script>
<template>
<div v-if="isOpen" class="modal-mask">
<div class="modal-wrapper">
<div class="modal-container" ref="target">
<div ref="target" class="modal-container">
<div class="modal-header">
<slot name="header"> default header</slot>
</div>
@@ -54,6 +51,7 @@ onClickOutside(target, ()=>emit('modal-close'))
background-color: rgba(0, 0, 0, 0.5);
}
.modal-container {
@apply bg-base-200;

View File

@@ -22,18 +22,25 @@
<p>
You give them some data, sometimes a few sats, and they give you back some data.</p>
<p>
This page is just a demo client, showcasing a variety of DVM use-cases. Search Content, Search Profiles, Content Discovery, Summarization of events, Image Generation, Scheduling Notes.
This page is just a demo client, showcasing a variety of DVM use-cases. Search Content, Search Profiles, Content
Discovery, Summarization of events, Image Generation, Scheduling Notes.
</p>
<p>
There's an ever growing number of tasks added to the protocol. The current list of tasks can be found <a class="purple" target="_blank" href="https://www.data-vending-machines.org/">here</a>.
There's an ever growing number of tasks added to the protocol. The current list of tasks can be found <a
class="purple" href="https://www.data-vending-machines.org/" target="_blank">here</a>.
</p>
<p>
These DVMs are not running or being hosted on this site. Instead, the DVMs communicate via Nostr and are available to any App or Client that wants to interact with them.
Want your app or website to support any of these tasks? See <a class="purple" target="_blank" href="https://github.com/nostr-protocol/nips/blob/master/90.md">NIP90</a> for more details.
These DVMs are not running or being hosted on this site. Instead, the DVMs communicate via Nostr and are
available to any App or Client that wants to interact with them.
Want your app or website to support any of these tasks? See <a class="purple" href="https://github.com/nostr-protocol/nips/blob/master/90.md"
target="_blank">NIP90</a>
for more details.
</p>
<p>
Got interested in building your own DVM and provide it to the whole world? There's OpenSource frameworks to start with, for example <a class="purple" target="_blank" href="https://github.com/believethehype/nostrdvm">NostrDVM</a> in Python.
Got interested in building your own DVM and provide it to the whole world? There's OpenSource frameworks to
start with, for example <a class="purple" href="https://github.com/believethehype/nostrdvm" target="_blank">NostrDVM</a>
in Python.
</p>
<p>
@@ -47,8 +54,8 @@
<br><br>
<div class="grid gap-5">
<div className="card bg-base-200 shadow-xl" style="height: 300px" v-for="dvm in store.state.nip89dvms"
:key="dvm.id">
<div v-for="dvm in store.state.nip89dvms" :key="dvm.id" className="card bg-base-200 shadow-xl"
style="height: 300px">
<!-- -->
@@ -85,17 +92,27 @@
<figure style="max-width: 20%; flex: fit-content; background-size: cover;">
<img v-if="dvm.image" style=" width: 90%; object-fit: cover;" :src="dvm.image" :alt="dvm.name" onerror="this.src='https://noogle.lol/favicon.ico'"/>
<img v-if="dvm.image" :alt="dvm.name" :src="dvm.image" onerror="this.src='https://noogle.lol/favicon.ico'"
style=" width: 90%; object-fit: cover;"/>
</figure>
<div class="card-body">
<div style="margin-left: auto; margin-right: 10px;">
<p v-if="dvm.amount.toString().toLowerCase()==='free'" class="badge bg-nostr">Free</p>
<p v-if="dvm.amount.toString().toLowerCase()==='flexible'" class="badge bg-nostr2">Flexible</p>
<p v-if="dvm.subscription" class="badge text-white bg-gradient-to-br from-pink-500 to-orange-400">Subscription</p>
<p v-if="dvm.subscription" class="badge text-white bg-gradient-to-br from-pink-500 to-orange-400">
Subscription</p>
<p v-if="dvm.amount.toString()===''"></p>
<p v-if="!isNaN(parseInt(dvm.amount))" class="text-sm text-gray-600 rounded" ><div class="flex"><svg style="margin-top:3px" xmlns="http://www.w3.org/2000/svg" width="14" height="16" fill="currentColor" class="bi bi-lightning" viewBox="0 0 16 20">
<path d="M5.52.359A.5.5 0 0 1 6 0h4a.5.5 0 0 1 .474.658L8.694 6H12.5a.5.5 0 0 1 .395.807l-7 9a.5.5 0 0 1-.873-.454L6.823 9.5H3.5a.5.5 0 0 1-.48-.641zM6.374 1 4.168 8.5H7.5a.5.5 0 0 1 .478.647L6.78 13.04 11.478 7H8a.5.5 0 0 1-.474-.658L9.306 1z"/></svg> {{dvm.amount/1000}}</div></p>
<p v-if="!isNaN(parseInt(dvm.amount))" class="text-sm text-gray-600 rounded">
<div class="flex">
<svg class="bi bi-lightning" fill="currentColor" height="16" style="margin-top:3px"
viewBox="0 0 16 20" width="14" xmlns="http://www.w3.org/2000/svg">
<path
d="M5.52.359A.5.5 0 0 1 6 0h4a.5.5 0 0 1 .474.658L8.694 6H12.5a.5.5 0 0 1 .395.807l-7 9a.5.5 0 0 1-.873-.454L6.823 9.5H3.5a.5.5 0 0 1-.48-.641zM6.374 1 4.168 8.5H7.5a.5.5 0 0 1 .478.647L6.78 13.04 11.478 7H8a.5.5 0 0 1-.474-.658L9.306 1z"/>
</svg>
{{ dvm.amount / 1000 }}
</div>
</p>
</div>
<h2 class="card-title">{{ dvm.name }}</h2>
<h3 class="text-gray">Kind: {{ dvm.kind }}</h3>
@@ -108,7 +125,6 @@
</div>
<!--
<h2 className="card-title justify-center">{{ dvm.name }}</h2>
<div className="card-body">
@@ -143,13 +159,10 @@
import '../app.css'
import store from "@/store.js";
import {Alphabet, ClientBuilder, NostrSigner, Filter, Keys, NostrDatabase, Tag} from "@rust-nostr/nostr-sdk";
import {Keys} from "@rust-nostr/nostr-sdk";
import miniToastr from "mini-toastr";
import VueNotifications from "vue-notifications";
import StringUtil from "@/components/helper/string.ts";
import Donate from "@/components/Donate.vue"
import deadnip89s from './data/deadnip89s.json'
export default {
computed: {

View File

@@ -1,10 +1,9 @@
<template>
<EasyDataTable class="customize-table" header-text-direction="left" table-class-name="customize-table"
:headers="headers"
:items="data"
:sort-by="sortBy"
:sort-type="sortType">
<EasyDataTable :headers="headers" :items="data" :sort-by="sortBy"
:sort-type="sortType"
class="customize-table"
header-text-direction="left"
table-class-name="customize-table">
<!--<template #expand="item">
@@ -14,16 +13,19 @@
<button class="btn" v-if="item.replied" >Replied</button>
</div>
</template> -->
<template #item-content="{content, author, authorurl, avatar, indicator, links, lud16, id, authorid, zapped, zapAmount, reacted, reactions, boosts, boosted, event, replied}">
<template
#item-content="{content, author, authorurl, avatar, indicator, links, lud16, id, authorid, zapped, zapAmount, reacted, reactions, boosts, boosted, event, replied}">
<div class="playeauthor-wrapper">
<img class="avatar" v-if="avatar" :src="avatar" alt="Avatar" onerror="this.src='https://noogle.lol/favicon.ico'" />
<img class="avatar" v-else src="@/assets/nostr-purple.svg" />
<img v-if="avatar" :src="avatar" alt="Avatar" class="avatar"
onerror="this.src='https://noogle.lol/favicon.ico'"/>
<img v-else class="avatar" src="@/assets/nostr-purple.svg"/>
<a class="purple" :href="authorurl" target="_blank">{{ author }}</a>
<a className="white" style="background: #1f2937; font-size: xx-small" v-if="store.state.followings.find(x => x == authorid) !== undefined">Following</a>
<a :href="authorurl" class="purple" target="_blank">{{ author }}</a>
<a v-if="store.state.followings.find(x => x == authorid) !== undefined" className="white"
style="background: #1f2937; font-size: xx-small">Following</a>
<div class="time">
{{ indicator.time.split("T")[1].split("Z")[0].trim() }}
{{ indicator.time.split("T")[0].split("-")[2].trim() }}.{{ indicator.time.split("T")[0].split("-")[1].trim() }}.{{ indicator.time.split("T")[0].split("-")[0].trim().slice(2) }}
@@ -35,17 +37,21 @@
<!-- <h3>{{StringUtil.parseImages(content)}}</h3> -->
<!--<p>{{content.substr(0, 320) + "\u2026"}}</p> -->
<div style="padding: 2px; text-align: left;">
<a class="menusmall" :href="links.uri" target="_blank">Client</a>
<a class="menusmall" :href="links.njump" target="_blank">NJump</a>
<a :href="links.uri" class="menusmall" target="_blank">Client</a>
<a :href="links.njump" class="menusmall" target="_blank">NJump</a>
<!--<a class="menusmall" :href="links.highlighter" target="_blank">Highlighter</a> -->
<a class="menusmall":href="links.nostrudel" target="_blank">Nostrudel</a>
<a :href="links.nostrudel" class="menusmall" target="_blank">Nostrudel</a>
<div class="flex">
<div class="flex" style="margin-right: 5px;" v-if="!reacted" @click="react(id, authorid, event)">
<div v-if="!reacted" class="flex" style="margin-right: 5px;" @click="react(id, authorid, event)">
<div style="margin-right: 5px;">
<svg style="margin-top:4px" width="14" height="12" xmlns="http://www.w3.org/2000/svg" class="bi bi-heart" fill-rule="evenodd" fill="currentColor" viewBox="0 0 20 25" clip-rule="evenodd"><path d="M12 21.593c-5.63-5.539-11-10.297-11-14.402 0-3.791 3.068-5.191 5.281-5.191 1.312 0 4.151.501 5.719 4.457 1.59-3.968 4.464-4.447 5.726-4.447 2.54 0 5.274 1.621 5.274 5.181 0 4.069-5.136 8.625-11 14.402m5.726-20.583c-2.203 0-4.446 1.042-5.726 3.238-1.285-2.206-3.522-3.248-5.719-3.248-3.183 0-6.281 2.187-6.281 6.191 0 4.661 5.571 9.429 12 15.809 6.43-6.38 12-11.148 12-15.809 0-4.011-3.095-6.181-6.274-6.181"/></svg>
<svg class="bi bi-heart" clip-rule="evenodd" fill="currentColor" fill-rule="evenodd" height="12"
style="margin-top:4px" viewBox="0 0 20 25" width="14" xmlns="http://www.w3.org/2000/svg">
<path
d="M12 21.593c-5.63-5.539-11-10.297-11-14.402 0-3.791 3.068-5.191 5.281-5.191 1.312 0 4.151.501 5.719 4.457 1.59-3.968 4.464-4.447 5.726-4.447 2.54 0 5.274 1.621 5.274 5.181 0 4.069-5.136 8.625-11 14.402m5.726-20.583c-2.203 0-4.446 1.042-5.726 3.238-1.285-2.206-3.522-3.248-5.719-3.248-3.183 0-6.281 2.187-6.281 6.191 0 4.661 5.571 9.429 12 15.809 6.43-6.38 12-11.148 12-15.809 0-4.011-3.095-6.181-6.274-6.181"/>
</svg>
</div>
@@ -53,46 +59,65 @@
<p style="float: left;">{{ reactions }}</p>
</div>
</div>
<div class="flex" v-if="reacted" style="margin-right: 5px;" @click="react(id, authorid, event)">
<div v-if="reacted" class="flex" style="margin-right: 5px;" @click="react(id, authorid, event)">
<div style="margin-left: auto; margin-right: 5px; float: left;">
<svg style="margin-top:4px" xmlns="http://www.w3.org/2000/svg" width="14" height="12" class="bi bi-heart fill-red-500" viewBox="0 0 20 25"><path d="M12 4.419c-2.826-5.695-11.999-4.064-11.999 3.27 0 7.27 9.903 10.938 11.999 15.311 2.096-4.373 12-8.041 12-15.311 0-7.327-9.17-8.972-12-3.27z"/></svg> </div>
<svg class="bi bi-heart fill-red-500" height="12" style="margin-top:4px" viewBox="0 0 20 25"
width="14" xmlns="http://www.w3.org/2000/svg">
<path
d="M12 4.419c-2.826-5.695-11.999-4.064-11.999 3.27 0 7.27 9.903 10.938 11.999 15.311 2.096-4.373 12-8.041 12-15.311 0-7.327-9.17-8.972-12-3.27z"/>
</svg>
</div>
<div>
<p className="text-red-500" style="float: left;">{{ reactions }}</p>
</div>
</div>
<div class="flex" v-if="lud16 != null && lud16 != '' && !zapped" style="margin-right: 5px;" @click="zap_local(lud16, id, authorid)">
<div v-if="lud16 != null && lud16 != '' && !zapped" class="flex" style="margin-right: 5px;"
@click="zap_local(lud16, id, authorid)">
<div style="margin-left: auto; margin-right: 5px; float: left;">
<svg style="margin-top:4px" xmlns="http://www.w3.org/2000/svg" width="14" height="16" fill="currentColor" class="bi bi-lightning" viewBox="0 0 16 20">
<path d="M5.52.359A.5.5 0 0 1 6 0h4a.5.5 0 0 1 .474.658L8.694 6H12.5a.5.5 0 0 1 .395.807l-7 9a.5.5 0 0 1-.873-.454L6.823 9.5H3.5a.5.5 0 0 1-.48-.641zM6.374 1 4.168 8.5H7.5a.5.5 0 0 1 .478.647L6.78 13.04 11.478 7H8a.5.5 0 0 1-.474-.658L9.306 1z"/>
<svg class="bi bi-lightning" fill="currentColor" height="16" style="margin-top:4px" viewBox="0 0 16 20"
width="14" xmlns="http://www.w3.org/2000/svg">
<path
d="M5.52.359A.5.5 0 0 1 6 0h4a.5.5 0 0 1 .474.658L8.694 6H12.5a.5.5 0 0 1 .395.807l-7 9a.5.5 0 0 1-.873-.454L6.823 9.5H3.5a.5.5 0 0 1-.48-.641zM6.374 1 4.168 8.5H7.5a.5.5 0 0 1 .478.647L6.78 13.04 11.478 7H8a.5.5 0 0 1-.474-.658L9.306 1z"/>
</svg> </div>
</svg>
</div>
<div>
<p style="float: left;">{{ zapAmount / 1000 }}</p>
</div>
</div>
<div class="flex" v-if="lud16 != null && lud16 != '' && zapped" style="margin-right: 5px;" @click="zap_local(lud16, id, authorid)" >
<div v-if="lud16 != null && lud16 != '' && zapped" class="flex" style="margin-right: 5px;"
@click="zap_local(lud16, id, authorid)">
<div style="margin-left: auto; margin-right: 5px;">
<svg style="margin-top:4px" xmlns="http://www.w3.org/2000/svg" width="14" height="16" class="bi bi-lightning fill-amber-400" viewBox="0 0 16 20">
<path d="M5.52.359A.5.5 0 0 1 6 0h4a.5.5 0 0 1 .474.658L8.694 6H12.5a.5.5 0 0 1 .395.807l-7 9a.5.5 0 0 1-.873-.454L6.823 9.5H3.5a.5.5 0 0 1-.48-.641z"/>
</svg></div>
<svg class="bi bi-lightning fill-amber-400" height="16" style="margin-top:4px" viewBox="0 0 16 20"
width="14" xmlns="http://www.w3.org/2000/svg">
<path
d="M5.52.359A.5.5 0 0 1 6 0h4a.5.5 0 0 1 .474.658L8.694 6H12.5a.5.5 0 0 1 .395.807l-7 9a.5.5 0 0 1-.873-.454L6.823 9.5H3.5a.5.5 0 0 1-.48-.641z"/>
</svg>
</div>
<div>
<p style="float: left;" className="text-amber-400">{{zapAmount/1000}}</p>
<p className="text-amber-400" style="float: left;">{{ zapAmount / 1000 }}</p>
</div>
</div>
<div class="flex" v-if="!boosted" @click="boost(id, authorid, event)">
<div v-if="!boosted" class="flex" @click="boost(id, authorid, event)">
<div style="margin-left: auto; margin-right: 5px; float: left;">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="28" viewBox="0 0 20 34"><path class="bi" fill="currentColor" d="M19 7a1 1 0 0 0-1-1h-8v2h7v5h-3l3.969 5L22 13h-3zM5 17a1 1 0 0 0 1 1h8v-2H7v-5h3L6 6l-4 5h3z"/></svg> </div>
<svg height="28" viewBox="0 0 20 34" width="14" xmlns="http://www.w3.org/2000/svg">
<path class="bi" d="M19 7a1 1 0 0 0-1-1h-8v2h7v5h-3l3.969 5L22 13h-3zM5 17a1 1 0 0 0 1 1h8v-2H7v-5h3L6 6l-4 5h3z"
fill="currentColor"/>
</svg>
</div>
<div>
<p style="float: left;">{{ boosts }}</p>
</div>
</div>
<div class="flex" v-if="boosted" @click="boost(id, authorid, event)">
<div v-if="boosted" class="flex" @click="boost(id, authorid, event)">
<div style="margin-left: auto; margin-right: 5px; float: left;">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="28" viewBox="0 0 20 34">
<path class="bi fill-green-700" d="M19 7a1 1 0 0 0-1-1h-8v2h7v5h-3l3.969 5L22 13h-3zM5 17a1 1 0 0 0 1 1h8v-2H7v-5h3L6 6l-4 5h3z"/>
</svg> </div>
<svg height="28" viewBox="0 0 20 34" width="14" xmlns="http://www.w3.org/2000/svg">
<path class="bi fill-green-700"
d="M19 7a1 1 0 0 0-1-1h-8v2h7v5h-3l3.969 5L22 13h-3zM5 17a1 1 0 0 0 1 1h8v-2H7v-5h3L6 6l-4 5h3z"/>
</svg>
</div>
<div>
<p className="text-green-700" style="float: left;">{{ boosts }}</p>
@@ -101,19 +126,26 @@
<details>
<summary class="" style=" margin-right: 5px">
<div style="margin-right: 5px; margin-left: 10px;margin-top: 4px"> <svg id="Capa_1" fill="currentColor" height="14" viewBox="0 0 600 600" xmlns="http://www.w3.org/2000/svg"><g>
<div style="margin-right: 5px; margin-left: 10px;margin-top: 4px">
<svg id="Capa_1" fill="currentColor" height="14" viewBox="0 0 600 600"
xmlns="http://www.w3.org/2000/svg">
<g>
<g id="ad">
<path d="m113.241 463.222-4.3-88.312c-68.332-36.05-108.941-95.703-108.941-160.522 0-52.154 26.017-101.029 73.259-137.619 46.512-36.024 108.215-55.864 173.741-55.864s127.229 19.84 173.742 55.865c47.242 36.59 73.259 85.465 73.259 137.619s-26.017 101.03-73.259 137.621c-46.512 36.023-108.215 55.863-173.742 55.863-1.889 0-3.843-.021-6.01-.067l-113.406 63.371c-9.113 4.959-14.343-.411-14.343-7.955zm133.759-423.021c-125.556 0-227.703 78.141-227.703 174.189 0 58.936 38.629 113.466 103.33 145.859 3.116 1.56 5.148 4.679 5.317 8.159l3.814 78.334 102.12-57.064c1.514-.852 3.232-1.275 4.968-1.222 3.108.084 5.698.124 8.152.124 125.556 0 227.703-78.141 227.703-174.188s-102.144-174.191-227.701-174.191z"/> </g></g></svg> </div>
<path
d="m113.241 463.222-4.3-88.312c-68.332-36.05-108.941-95.703-108.941-160.522 0-52.154 26.017-101.029 73.259-137.619 46.512-36.024 108.215-55.864 173.741-55.864s127.229 19.84 173.742 55.865c47.242 36.59 73.259 85.465 73.259 137.619s-26.017 101.03-73.259 137.621c-46.512 36.023-108.215 55.863-173.742 55.863-1.889 0-3.843-.021-6.01-.067l-113.406 63.371c-9.113 4.959-14.343-.411-14.343-7.955zm133.759-423.021c-125.556 0-227.703 78.141-227.703 174.189 0 58.936 38.629 113.466 103.33 145.859 3.116 1.56 5.148 4.679 5.317 8.159l3.814 78.334 102.12-57.064c1.514-.852 3.232-1.275 4.968-1.222 3.108.084 5.698.124 8.152.124 125.556 0 227.703-78.141 227.703-174.188s-102.144-174.191-227.701-174.191z"/>
</g>
</g>
</svg>
</div>
</summary>
<div class="collapse-content font-size-0" className="z-10" id="collapse">
<textarea class="c-Input" style="width: auto; margin-left: -100px" v-model="message"></textarea>
<div id="collapse" class="collapse-content font-size-0" className="z-10">
<textarea v-model="message" class="c-Input" style="width: auto; margin-left: -100px"></textarea>
<br>
<button class="v-Button" v-if="!replied" @click="reply(id, author, message); message=''">Reply</button>
<button class="btn" v-if="replied" >Replied</button>
<button v-if="!replied" class="v-Button" @click="reply(id, author, message); message=''">Reply</button>
<button v-if="replied" class="btn">Replied</button>
</div>
</details>
@@ -133,15 +165,12 @@
<script lang="ts" setup>
import type {Header, Item, SortType} from "vue3-easy-data-table";
import type {Header, SortType} from "vue3-easy-data-table";
import store from '../store';
import {types} from "sass";
import Null = types.Null;
import StringUtil from "@/components/helper/string";
import {copyinvoice, parseandreplacenpubs, } from "@/components/helper/Helper.vue";
import {requestProvider} from "webln";
import {Event, EventBuilder, EventId, PublicKey, Tag} from "@rust-nostr/nostr-sdk";
import {zap, zap_lud16, createBolt11Lud16, zaprequest} from "@/components/helper/Zap.vue";
import {EventBuilder, EventId, PublicKey, Tag} from "@rust-nostr/nostr-sdk";
import {zap_lud16} from "@/components/helper/Zap.vue";
import {ref} from "vue";
const props = defineProps<{
@@ -159,6 +188,7 @@ const headers: Header[] = [
];
const message = ref("");
async function react(eventid, authorid, evt) {
@@ -185,7 +215,6 @@ async function react(eventid, authorid, evt){
}
async function reply(eventid, authorid, message) {
console.log(eventid)
@@ -207,8 +236,8 @@ async function reply (eventid, authorid, message){
}
}
async function boost(eventid, authorid, evt) {
// TODO
@@ -241,7 +270,6 @@ async function boost(eventid, authorid, evt){
}
}
async function zap_local(lud16, eventid, authorid) {
@@ -265,14 +293,11 @@ async function zap_local(lud16, eventid, authorid) {
console.log("zapped")
}
}
}
catch (error)
{
} catch (error) {
console.log(error)
}
}
@@ -283,6 +308,7 @@ async function zap_local(lud16, eventid, authorid) {
width: 20px;
cursor: pointer;
}
.playeauthor-wrapper {
padding: 6px;
display: flex;
@@ -307,6 +333,7 @@ async function zap_local(lud16, eventid, authorid) {
align-items: center;
justify-items: center;
}
.avatar {
margin-right: 10px;
display: inline-block;
@@ -331,6 +358,7 @@ margin-top: 15px;
height: 48px;
margin-left: 10px;
}
.customize-table {
width: auto;
--easy-table-border: 2px solid bg-base;

View File

@@ -1,13 +1,16 @@
<template>
<EasyDataTable style="margin-top: 450px"
class="customize-table" header-text-direction="left" hide-rows-per-page=true rows-per-page=10 v-if="store.state.profile_results.length != 0 && router.currentRoute.value.path == '/'" table-class-name="customize-table"
:headers="headers"
:items="store.state.profile_results" >
<EasyDataTable v-if="store.state.profile_results.length != 0 && router.currentRoute.value.path == '/'"
:headers="headers" :items="store.state.profile_results" class="customize-table" header-text-direction="left"
hide-rows-per-page=true
rows-per-page=10
style="margin-top: 450px"
table-class-name="customize-table">
<template #item-content="{ author, authorurl, avatar}">
<div class="playeauthor-wrapper">
<img class="avatar" v-if="avatar" :src="avatar" alt="Avatar" onerror="this.src='https://noogle.lol/favicon.ico'" />
<img class="avatar" v-else src="@/assets/nostr-purple.svg" />
<a class="purple" :href="authorurl" target="_blank">{{ author }}</a>
<img v-if="avatar" :src="avatar" alt="Avatar" class="avatar"
onerror="this.src='https://noogle.lol/favicon.ico'"/>
<img v-else class="avatar" src="@/assets/nostr-purple.svg"/>
<a :href="authorurl" class="purple" target="_blank">{{ author }}</a>
</div>
<!-- <p>{{content}}</p> -->
@@ -30,7 +33,7 @@
<script lang="ts" setup>
import type {Header, Item, SortType} from "vue3-easy-data-table";
import type {Header} from "vue3-easy-data-table";
import store from '../store';
import router from "../router";
@@ -41,8 +44,6 @@ const headers: Header[] = [
];
</script>
<style scoped>
@@ -50,6 +51,7 @@ const headers: Header[] = [
width: 20px;
cursor: pointer;
}
.playeauthor-wrapper {
padding: 6px;
display: flex;
@@ -74,6 +76,7 @@ const headers: Header[] = [
align-items: center;
justify-items: center;
}
.avatar {
margin-right: 10px;
display: inline-block;
@@ -83,6 +86,7 @@ const headers: Header[] = [
object-fit: cover;
box-shadow: inset 0 4px 4px 0 rgb(0 0 0 / 10%);
}
.customize-table {
width: auto;
--easy-table-border: 3px solid #000000;

File diff suppressed because one or more lines are too long

View File

@@ -1,33 +1,14 @@
<script setup>
import {
Client,
Filter,
Timestamp,
Event,
Metadata,
PublicKey,
EventBuilder,
Tag,
EventId,
Nip19Event,
Alphabet,
ClientBuilder,
Keys,
NostrDatabase,
NegentropyOptions,
NegentropyDirection,
Duration, nip04Encrypt, nip04Decrypt
} from "@rust-nostr/nostr-sdk";
import {Event, EventBuilder, EventId, Filter, Nip19Event, PublicKey, Tag, Timestamp} from "@rust-nostr/nostr-sdk";
import store from '../store';
import miniToastr from "mini-toastr";
import VueNotifications from "vue-notifications";
import {computed, onMounted, ref} from "vue";
import deadnip89s from "@/components/data/deadnip89s.json";
import {onMounted, ref} from "vue";
import VueDatePicker from '@vuepic/vue-datepicker';
import '@vuepic/vue-datepicker/dist/main.css'
import {post_note, schedule, copyurl, copyinvoice, sleep, getEvents, get_user_infos, nextInput} from "../components/helper/Helper.vue"
import {get_user_infos, getEvents, nextInput, sleep} from "../components/helper/Helper.vue"
import StringUtil from "@/components/helper/string.ts";
@@ -70,8 +51,7 @@ async function send_search_request(msg) {
//store.commit('set_hasEventListener', true)
listen()
}
else{
} else {
console.log("Already has event listener")
}
try {
@@ -123,23 +103,14 @@ async function send_search_request(msg) {
const pTag = Tag.parse(["p", userPubkey]);
users.push(pTag.asVec());
url.searchParams.set('npub', userPubkeyBech32);
}
else{
} else {
url.searchParams.delete('npub');
}
window.history.pushState(null, '', url.toString());
//window.location.search = urlParams;
//let content = "NIP 90 Search request"
@@ -232,9 +203,7 @@ async function send_search_request(msg) {
requestid2 = res2.toHex()
}
catch(error){
} catch (error) {
console.log(error)
}
@@ -244,7 +213,6 @@ async function send_search_request(msg) {
store.commit('set_current_request_profile_id_search', requestid_profile)
} catch (error) {
console.log(error);
}
@@ -290,21 +258,17 @@ async function listen() {
if (tag.asVec().length > 2) {
content = tag.asVec()[2]
}
}
else if (tag.asVec()[0] === "e"){
} else if (tag.asVec()[0] === "e") {
etag = tag.asVec()[1]
}
else if (tag.asVec()[0] === "p"){
} else if (tag.asVec()[0] === "p") {
ptag = tag.asVec()[1]
}
else if (tag.asVec()[0] === "encrypted"){
} else if (tag.asVec()[0] === "encrypted") {
is_encrypted = true
}
}
if (event.kind === 7000) {
try {
@@ -325,8 +289,6 @@ async function listen() {
}
if (is_encrypted) {
let signer = store.state.signer
if (ptag === store.state.pubkey.toHex()) {
@@ -352,8 +314,7 @@ async function listen() {
etag = tag.asVec()[1]
} else if (tag.asVec()[0] === "content") {
content = tag.asVec()[1]
}
else if (tag.asVec()[0] === "amount") {
} else if (tag.asVec()[0] === "amount") {
jsonentry.amount = tag.asVec()[1]
if (tag.asVec().length > 2) {
jsonentry.bolt11 = tag.asVec()[2]
@@ -363,9 +324,7 @@ async function listen() {
}
}
}
else {
} else {
for (const tag in event.tags) {
if (event.tags[tag].asVec()[0] === "status") {
status = event.tags[tag].asVec()[1]
@@ -386,8 +345,6 @@ async function listen() {
}
//let dvm = store.state.nip89dvms.find(x => JSON.parse(x.event).pubkey === event.author.toHex())
for (const el of store.state.nip89dvms) {
if (JSON.parse(el.event).pubkey === event.author.toHex().toString()) {
@@ -416,9 +373,7 @@ async function listen() {
} catch (error) {
console.log("Error: ", error);
}
}
else if (event.kind === 6302) {
} else if (event.kind === 6302) {
let entries = []
//console.log("6302:", event.content);
@@ -486,14 +441,10 @@ async function listen() {
store.commit('set_active_search_dvms', dvms)
console.log("Events from" + event.author.toHex())
store.commit('set_search_results', items)
}
catch{
} catch {
}
}
else if (event.kind === 6303) {
} else if (event.kind === 6303) {
let entries = []
//console.log("6303:", event.content);
@@ -505,8 +456,6 @@ async function listen() {
}
let event_ptags = JSON.parse(content)
let authors = []
if (event_ptags.length > 0) {
@@ -558,8 +507,7 @@ function getNamefromId(id){
let elements = searchdvms.filter(i => i.id === id)
if (elements.length === 0) {
return id
}
else return elements[0].name
} else return elements[0].name
}
@@ -590,8 +538,7 @@ async function get_user_from_search(name){
profiles.push({profile: contentjson, author: entry.author.toBech32(), createdAt: entry.createdAt});
}
catch(error){
} catch (error) {
console.log(error)
}
}
@@ -617,18 +564,20 @@ defineProps({
Search the Nostr with Data Vending Machines</h2>
<h3>
<br>
<input class="c-Input" type="search" name="s" autofocus placeholder="Search..." v-model="message" @keyup.enter="send_search_request(message)" @keydown.enter="nextInput">
<input v-model="message" autofocus class="c-Input" name="s" placeholder="Search..." type="search"
@keyup.enter="send_search_request(message)" @keydown.enter="nextInput">
<button class="v-Button" @click="send_search_request(message)">Search the Nostr</button>
</h3>
<details class="collapse bg-base " className="advanced">
<summary class="collapse-title font-thin bg">Advanced Options</summary>
<div class="collapse-content font-size-0" className="z-10" id="collapse-settings">
<div id="collapse-settings" class="collapse-content font-size-0" className="z-10">
<div>
<h4 className="inline-flex flex-none font-thin">by: </h4>
<div className="inline-flex flex-none" style="width: 10px;"></div>
<input list="users" id="user" class="u-Input" style="margin-left: 10px" type="search" name="user" autofocus placeholder="npub..." v-model="fromuser" @input="checkuser(fromuser)">
<input id="user" v-model="fromuser" autofocus class="u-Input" list="users" name="user" placeholder="npub..."
style="margin-left: 10px" type="search" @input="checkuser(fromuser)">
<datalist id="users">
<option v-for="profile in usernames" :value="profile.author">
@@ -645,27 +594,30 @@ defineProps({
<div>
<h4 className="inline-flex flex-none font-thin">from:</h4>
<div className="inline-flex flex-none" style="width: 10px;"></div>
<VueDatePicker :teleport="true" :dark="true" position="left" className="bg-base-200 inline-flex flex-none" style="width: 220px;" v-model="datefrom"></VueDatePicker>
<VueDatePicker v-model="datefrom" :dark="true" :teleport="true" className="bg-base-200 inline-flex flex-none"
position="left" style="width: 220px;"></VueDatePicker>
</div>
<div className="inline-flex flex-none" style="width: 20px;"></div>
<div>
<h4 className="inline-flex font-thin ">until: </h4>
<div className="inline-flex flex-none" style="width: 10px;"></div>
<VueDatePicker :teleport="true" :dark="true" position="left" className="bg-base-200 inline-flex flex-none" style="width: 220px;" v-model="dateto"></VueDatePicker>
<VueDatePicker v-model="dateto" :dark="true" :teleport="true" className="bg-base-200 inline-flex flex-none"
position="left" style="width: 220px;"></VueDatePicker>
</div>
</details>
</div>
<div class="max-w-5xl relative space-y-3">
<div class="grid grid-cols-1 gap-6">
<div className="card w-30 h-60 bg-base-100 shadow-xl" v-for="dvm in store.state.activesearchdvms"
:key="dvm.name">
<div v-for="dvm in store.state.activesearchdvms" :key="dvm.name"
className="card w-30 h-60 bg-base-100 shadow-xl">
<div className="card-body">
<div class="grid grid-cols-1 gap-6">
<div className="col-end-1">
<h2 className="card-title">{{ dvm.name }}</h2>
<figure v-if="dvm.image!==''" className="w-40"><img className="h-30" :src="dvm.image" alt="DVM Picture" /></figure>
<figure v-if="dvm.image!==''" className="w-40"><img :src="dvm.image" alt="DVM Picture" className="h-30"/>
</figure>
</div>
<div className="col-end-2 w-auto card-body">
@@ -732,7 +684,6 @@ h4 {
}
@media (min-width: 1000px) {
.greetings h1,

View File

@@ -1,16 +1,18 @@
<template>
<EasyDataTable class="customize-table" header-text-direction="left" v-if="store.state.results.length != 0" table-class-name="customize-table"
:headers="headers"
:items="store.state.results" :sort-by="sortBy"
:sort-type="sortType">
<EasyDataTable v-if="store.state.results.length != 0" :headers="headers" :items="store.state.results"
:sort-by="sortBy"
:sort-type="sortType"
class="customize-table" header-text-direction="left"
table-class-name="customize-table">
<template #item-content="{ content, author, authorurl, avatar, indicator, links}">
<div class="playeauthor-wrapper">
<img class="avatar" v-if="avatar" :src="avatar" alt="Avatar" onerror="this.src='https://noogle.lol/favicon.ico'" />
<img class="avatar" v-else src="@/assets/nostr-purple.svg" />
<img v-if="avatar" :src="avatar" alt="Avatar" class="avatar"
onerror="this.src='https://noogle.lol/favicon.ico'"/>
<img v-else class="avatar" src="@/assets/nostr-purple.svg"/>
<a class="purple" :href="authorurl" target="_blank">{{ author }}</a>
<div class="time" :data-tip="indicator.time">
<a :href="authorurl" class="purple" target="_blank">{{ author }}</a>
<div :data-tip="indicator.time" class="time">
{{ indicator.time.split("T")[1].split("Z")[0].trim() }}
{{ indicator.time.split("T")[0].split("-")[2].trim() }}.{{ indicator.time.split("T")[0].split("-")[1].trim() }}.{{ indicator.time.split("T")[0].split("-")[0].trim().slice(2) }}
</div>
@@ -18,10 +20,10 @@
<p>{{ content.substr(0, 320) + "\u2026" }}</p>
<div style="padding: 2px; text-align: left;">
<a class="menusmall" :href="links.uri" target="_blank">Nostr Client</a>
<a class="menusmall" :href="links.njump" target="_blank">NJump</a>
<a class="menusmall" :href="links.highlighter" target="_blank">Highlighter</a>
<a class="menusmall":href="links.nostrudel" target="_blank">Nostrudel</a>
<a :href="links.uri" class="menusmall" target="_blank">Nostr Client</a>
<a :href="links.njump" class="menusmall" target="_blank">NJump</a>
<a :href="links.highlighter" class="menusmall" target="_blank">Highlighter</a>
<a :href="links.nostrudel" class="menusmall" target="_blank">Nostrudel</a>
</div>
</template>
@@ -33,7 +35,7 @@
<script lang="ts" setup>
import type {Header, Item, SortType} from "vue3-easy-data-table";
import type {Header, SortType} from "vue3-easy-data-table";
import store from '../store';
const sortBy = "indicator.time";
@@ -51,6 +53,7 @@ const headers: Header[] = [
width: 20px;
cursor: pointer;
}
.playeauthor-wrapper {
padding: 6px;
display: flex;
@@ -75,6 +78,7 @@ const headers: Header[] = [
align-items: center;
justify-items: center;
}
.avatar {
margin-right: 10px;
display: inline-block;
@@ -84,6 +88,7 @@ const headers: Header[] = [
object-fit: cover;
box-shadow: inset 0 4px 4px 0 rgb(0 0 0 / 10%);
}
.customize-table {
width: auto;
--easy-table-border: 2px solid #000000;

View File

@@ -1,44 +1,25 @@
<script setup>
import {
Client,
Filter,
Timestamp,
Event,
Metadata,
PublicKey,
EventBuilder,
Tag,
EventId,
Nip19Event, Alphabet, Keys, nip04_decrypt, SecretKey, Duration
} from "@rust-nostr/nostr-sdk";
import {EventBuilder, Filter, Tag, Timestamp} from "@rust-nostr/nostr-sdk";
import store from '../store';
import miniToastr from "mini-toastr";
import VueNotifications from "vue-notifications";
import {computed, watch} from "vue";
import deadnip89s from "@/components/data/deadnip89s.json";
import {data} from "autoprefixer";
import {requestProvider} from "webln";
import Newnote from "@/components/Newnote.vue";
import {post_note, schedule, copyurl, copyinvoice, sleep, nextInput} from "../components/helper/Helper.vue"
import {ref} from "vue";
import ModalComponent from "../components/Newnote.vue";
import VueDatePicker from "@vuepic/vue-datepicker";
import {timestamp} from "@vueuse/core";
import NoteTable from "@/components/NoteTable.vue";
import {sleep} from "../components/helper/Helper.vue"
import {zap} from "@/components/helper/Zap.vue";
import index from "vuex";
let dvms = []
let requestids = []
async function summarizefeed(eventids) {
listen()
let sortedIds = eventids.sort(function(a,b) {return (a.index > b.index) ? 1 : ((b.index > a.index) ? -1 : 0);} );
let sortedIds = eventids.sort(function (a, b) {
return (a.index > b.index) ? 1 : ((b.index > a.index) ? -1 : 0);
});
try {
if (store.state.pubkey === undefined || localStorage.getItem('nostr-key-method') === "anon") {
@@ -57,9 +38,8 @@ let sortedIds = eventids.sort(function(a,b) {return (a.index > b.index) ? 1 : ((
for (const tag of sortedIds) {
try {
tags.push(["i", tag.id, "event"])
} catch {
}
catch{}
}
let r = ["relays"]
@@ -83,7 +63,6 @@ let sortedIds = eventids.sort(function(a,b) {return (a.index > b.index) ? 1 : ((
console.log(res)
requestids.push(requestid)
store.commit('set_current_request_id_summarization', requestids)
@@ -151,8 +130,7 @@ async function listen() {
jsonentry.amount = event.tags[tag].asVec()[1]
if (event.tags[tag].asVec().length > 2) {
jsonentry.bolt11 = event.tags[tag].asVec()[2]
}
else{
} else {
let profiles = await get_user_infos([event.author.toHex()])
let created = 0
let current
@@ -175,14 +153,11 @@ async function listen() {
if (jsonentry.bolt11 === "") {
status = "error"
}
}
else {
} else {
console.log("NO LNURL")
}
}
else {
} else {
console.log("PROFILE NOT FOUND")
}
}
@@ -217,10 +192,7 @@ async function listen() {
}
}
else if (event.kind === 6001){
} else if (event.kind === 6001) {
console.log(event.content)
dvms.find(i => i.id === event.author.toHex()).result = event.content
dvms.find(i => i.id === event.author.toHex()).status = "finished"
@@ -257,7 +229,6 @@ defineProps({
})
const isModalOpened = ref(false);
const modalcontent = ref("");
const datetopost = ref(Date.now());
@@ -284,7 +255,6 @@ const submitHandler = async () => {
}
</script>
<!-- font-thin bg-gradient-to-r from-white to-nostr bg-clip-text text-transparent -->
@@ -304,22 +274,19 @@ const submitHandler = async () => {
<br>
<div class=" relative space-y-2">
<div class="grid grid-cols-1 gap-2 ">
<div className="card w-70 bg-base-100 shadow-xl" v-for="dvm in store.state.summarizationdvms"
:key="dvm.id">
<div v-for="dvm in store.state.summarizationdvms" :key="dvm.id"
className="card w-70 bg-base-100 shadow-xl">
<div className="card-body">
<div className="playeauthor-wrapper">
<figure className="w-20">
<img className="avatar" v-if="dvm.image" :src="dvm.image" alt="DVM Picture" />
<img class="avatar" v-else src="@/assets/nostr-purple.svg" />
<img v-if="dvm.image" :src="dvm.image" alt="DVM Picture" className="avatar"/>
<img v-else class="avatar" src="@/assets/nostr-purple.svg"/>
</figure>
@@ -328,17 +295,21 @@ const submitHandler = async () => {
<h3 class="fa-cut">{{ dvm.about }}</h3>
<div className="card-actions justify-end mt-auto">
<div className="tooltip mt-auto">
<button v-if="dvm.status !== 'finished' && dvm.status !== 'paid' && dvm.status !== 'payment-required' && dvm.status !== 'error'" className="btn">{{dvm.status}}</button>
<button
v-if="dvm.status !== 'finished' && dvm.status !== 'paid' && dvm.status !== 'payment-required' && dvm.status !== 'error'"
className="btn">{{ dvm.status }}
</button>
<button v-if="dvm.status === 'finished'" className="btn">Done</button>
<button v-if="dvm.status === 'paid'" className="btn">Paid, waiting for DVM..</button>
<button v-if="dvm.status === 'error'" className="btn">Error</button>
<button v-if="dvm.status === 'payment-required'" className="zap-Button" @click="zap_local(dvm.bolt11);">{{ dvm.amount/1000 }} Sats</button>
<button v-if="dvm.status === 'payment-required'" className="zap-Button" @click="zap_local(dvm.bolt11);">
{{ dvm.amount / 1000 }} Sats
</button>
</div>

View File

@@ -1,74 +1,218 @@
[
{"id": "766809b054c9b772652377ef968625509a7e92c56669e302940ac08c8c3d0f96"},
{"id": "7fb49260fbd9148e08672b8339bca6c5a866cf7aaa03051898ed02f6d85109b2"},
{"id": "edd11ae518e4f59a25472d5ef869f114c8e5399723fd7bed32389eef37a6ec0c"},
{"id": "b6e93a7185036b69b04a55665409957ba4d9fb2a944e43c690e6f4d64678c43f"},
{"id": "be40dfce56ff47bce6cfa2073dd6c6d88e53d44d7e1178cc30ebb4ca991de4e4"},
{"id": "72d86d5428049c74f94ac335cd662772f580fa27497398dd06b443653a16b4ad"},
{"id": "0e2b90ea31426f03f9ccfff6093aacde0322a2c026d3fedf47fa35e722970fdf"},
{"id": "ad281d17781cdcbdfce38cf13188f56b9dbb16977ca029823a3d6e0fa502e73a"},
{"id": "c0361dd4bbae4cc32be424cf564f547b29496b3bd7bbbf3ede0cb0b8d8930b5c"},
{"id": "349fdcad3da119f09bde6861806ae3ff461b1eb3b3708067f0abb0e669c54841"},
{"id": "d9a016283161f262b2764e6a5710f9c2dc1aca19a42d19cca5af7cc20ff2955e"},
{"id": "365aa211f1e873988dacb4ff1a10fe3b7221a940c3d155b8f4d33a25ca42fa52"},
{"id": "2b07103533f747c0899f00f575c79cdea960ac62b33d06780e284eb020215c0b"},
{"id": "5f7ce70135b7172358ee41b0f1f0ff9110af7294eef7ca7878882e129e6104db"},
{"id": "b570d7d7d68130750c4b84aa3808fd209ed767300246365a5deaaedffcfb6d0b"},
{"id": "3468c0769e9a8c10cc74e9bdbf11a00df1b35480b65059f71357c7f1a9e35d68"},
{"id": "1f0cf47de297037e91450631552b3ff7ce6567b73eac57e94bbbe2d6ca99e744"},
{"id": "02650e51270e0a734505fb2876adbef89f26bbe660ca4e8fadea0ecf1ea1b1d0"},
{"id": "764b2ac58c23310f2caeecd155eff294f190e433438d3df5a244b5af979d3a81"},
{"id": "c788b8a0ce4e9d795dd1895e87c0e3dd019766ebbfcd4f99112d523b8374e9de"},
{"id": "e9ec70f0f0c1e8134efacb9941647d451f4c6d3acccb40b878598ade9308599a"},
{"id": "4f3e5fbbb27392ce4b4ef46ee0d5bc42e5112bde6cb72644a34d89bc7505b9d5"},
{"id": "5e4e3c95215be93be3bc5bac242f6b332c1265140d179f31af858e8f172c8d6a"},
{"id": "bdbcfb112b0f7d55e2bcc231ec06335ea5051d49edcbed8170f717f8ecf1a965"},
{"id": "294303fbde21251093bb86683701023bd1d7e310a64e0b1068f6160696f3c6a4"},
{"id": "00ef6f71fcaa72742493178b8409c32bb68d92c9f67af717f92bef35272a74d4"},
{"id": "4fff1259602cf46619d379ee8c790a1acc310a53cb617fa46d522978d6b4876b"},
{"id": "aab06b1602f0380e6c2f442c7992c82259968d8abbba1da69d774a32d747c3b4"},
{"id": "4bbee7e48d393b692f80e5a5357fcb435adbd46172b38f367a43c3aeb45b2fb3"},
{"id": "97a7fa0776225a5eb644da81db9a73eacebf046d7fe745f567345c1cec0a9e32"},
{"id": "aad1de5bb5dc4ce80de3d55a6ce7037ddb46aadb4e44c3742781d1422cf79765"},
{"id": "2dcd9ea8b4959c7b986bfda2bdc8175ed156a474457d38be42f54f027a1dff5a"},
{"id": "747215ea31506d60af14bae6914fd1107de0893f99c0f2e178216bea79de4677"},
{"id": "d69a3d1b7d635ba12be30ebb9473ad4a973138e54ef1aaa2f6cce060a82937b4"},
{"id": "c4ba426af0bb7be9de06b774aec33b7733cb952c5e1bc723c9bf021b3e2be1ea"},
{"id": "0f7dac8f31a9aac4d4479373153489fc57889c964e82dd619bed2f60f0af27ee"},
{"id": "561420baa35477e27b85e62ecfded0b76cab0c0acaedc9b3ab6ac7d88be42165"},
{"id": "d68d8eab7bad9c263f5af0eb46db168d2d82ad19acc5fb19c606fcb18de7994b"},
{"id": "86f7e9f6d98831e0ad19a575512f3d969d3af6921260809cc7a33b3b918d87f1"},
{"id": "f9287d47f86cc0af606026fe5e017fd479230b6cd2dcc82db915603658312d82"},
{"id": "cb83acb45cd810d8fd0df5f1f40d5bfd5406b74e37c9cda54c77114c5dcd357a"},
{"id": "5457c08086b3e78887c8eeb39cdd8dcb6559ceea13f32cc4a6f8a84513bfacf1"},
{"id": "1c86e2d22620ec6c94aac12fad7ed304bdf439020e74bbc0f0fc096bd5335891"},
{"id": "6ad22ca994d0b5952b26cb0b4cae939d474f57729e18509574ace9882a635641"},
{"id": "e15e167f70fb7d3ab740248e993096ecd7819de7ad5640f05e5c302b34737f33"},
{"id": "a391df97b5fdf380f78091d18da0626afbf9ca2f9517935f3dee766cd0ac72fe"},
{"id": "7b4185b0d115b5a12ba57f6804703789c68fb52d1587487161e96011a6a72223"},
{"id": "dbd86fc945e0748b2f263abad2338ff212ae02a895f38b0a2c262a0da518ebd2"},
{"id": "91591d5dd56657a1acbcc04116f17b2264dd369b9ad361bf15033e6ca326f5ac"},
{"id": "eb382df17d822d81d85097f28a49f86dc69ba8a05285dff39e2d877ea31e21cc"},
{"id": "b4a85c1e7e4c13281ae58538c57529cc6035ee465a2f69e40b41a6711a2eeb18"},
{"id": "0ea69892da43e1b4de82bde7bb599c3f15a71120f9f506fd210c2712ba7026a3"},
{"id": "b424c79388a2ea8b04e72f7ea32c0648db15ca5f25705bcd4231d0b658156af1"},
{"id": "db11596a64f76082991df4d1d1e8764f4d8da926f81ddbe09333d2ca1335ecd6"},
{"id": "f6e4c5cba1dc008f9b9611515ba163ccd1489105265dc8b2809eb846c1b94209"},
{"id": "cd4c4f1e65bd1f351dabf8c04fe2903b043ce98ce5613808c027c6609a0556d5"},
{"id": "9b0172004b25ee43e517ed6dd969bceb3fef4db3a577f91d8a3dc9cb6fe4e1d1"},
{"id": "ca0ee728c85f4df5ffab3561f55fdd2295291a86cd409839c59b92903d041025"},
{"id": "c589506d090796e304763dc269731029be08dee1706c1e87413fb376a2e84a97"},
{"id": "99ea6a5a7701c255661fc2bea32cb615ca0d4674c45fe6633e58e7eeb5f92873"},
{"id": "8e55f6ec8de9e8b4f75e3a771c601c1583855b5d113124ac9fb997b8589117fc"},
{"id": "11803eb1505d5014bc13c48621638a94f0b852587f0b5adbcb3ee471d9488ec3"},
{"id": "488cf9801acccc925b75d6828287ecaaff8b2bee9b58ce26fa0a2abdd61bd155"},
{"id": "0e9bc4a5989a39d4fc7ba73876c88822928b1cc965ed158b431759378363c182"},
{"id": "386b2cd47df9260f5b313b151ae988d0710e83e615dfd2abc948f1fa93eb76d6"},
{"id": "a451833e4856194aa5f56508eb34c298a5718539b9d320a2b7b30f32a107cc37"},
{"id": "91c0639025aba28c5af2178f49d653757bcc68e88d7cc461c86edc1ac2a61942"},
{"id": "aaf0b0846e265dec3dcf7b943ea2fc0331daf29a6114ac2eb971c10988e73f6d"},
{"id": "d26a9c5d89b9ce197e03bf91e2768df571cf04df796b5ae08742aea97be1c8c5"},
{"id": "490debe9303abe3c72fae49c62f8be15556a78c77c4d74e82305c5ce5723986a"},
{"id": "52348da7537eb13da45277d755b7b26dfcb249b3b602b2c49b65ecd908c6cde0"},
{"id": "1f31fe5bfb3e75c5e984201bfd6be15632f266171ecaf8714829a503818865bf"}
{
"id": "766809b054c9b772652377ef968625509a7e92c56669e302940ac08c8c3d0f96"
},
{
"id": "7fb49260fbd9148e08672b8339bca6c5a866cf7aaa03051898ed02f6d85109b2"
},
{
"id": "edd11ae518e4f59a25472d5ef869f114c8e5399723fd7bed32389eef37a6ec0c"
},
{
"id": "b6e93a7185036b69b04a55665409957ba4d9fb2a944e43c690e6f4d64678c43f"
},
{
"id": "be40dfce56ff47bce6cfa2073dd6c6d88e53d44d7e1178cc30ebb4ca991de4e4"
},
{
"id": "72d86d5428049c74f94ac335cd662772f580fa27497398dd06b443653a16b4ad"
},
{
"id": "0e2b90ea31426f03f9ccfff6093aacde0322a2c026d3fedf47fa35e722970fdf"
},
{
"id": "ad281d17781cdcbdfce38cf13188f56b9dbb16977ca029823a3d6e0fa502e73a"
},
{
"id": "c0361dd4bbae4cc32be424cf564f547b29496b3bd7bbbf3ede0cb0b8d8930b5c"
},
{
"id": "349fdcad3da119f09bde6861806ae3ff461b1eb3b3708067f0abb0e669c54841"
},
{
"id": "d9a016283161f262b2764e6a5710f9c2dc1aca19a42d19cca5af7cc20ff2955e"
},
{
"id": "365aa211f1e873988dacb4ff1a10fe3b7221a940c3d155b8f4d33a25ca42fa52"
},
{
"id": "2b07103533f747c0899f00f575c79cdea960ac62b33d06780e284eb020215c0b"
},
{
"id": "5f7ce70135b7172358ee41b0f1f0ff9110af7294eef7ca7878882e129e6104db"
},
{
"id": "b570d7d7d68130750c4b84aa3808fd209ed767300246365a5deaaedffcfb6d0b"
},
{
"id": "3468c0769e9a8c10cc74e9bdbf11a00df1b35480b65059f71357c7f1a9e35d68"
},
{
"id": "1f0cf47de297037e91450631552b3ff7ce6567b73eac57e94bbbe2d6ca99e744"
},
{
"id": "02650e51270e0a734505fb2876adbef89f26bbe660ca4e8fadea0ecf1ea1b1d0"
},
{
"id": "764b2ac58c23310f2caeecd155eff294f190e433438d3df5a244b5af979d3a81"
},
{
"id": "c788b8a0ce4e9d795dd1895e87c0e3dd019766ebbfcd4f99112d523b8374e9de"
},
{
"id": "e9ec70f0f0c1e8134efacb9941647d451f4c6d3acccb40b878598ade9308599a"
},
{
"id": "4f3e5fbbb27392ce4b4ef46ee0d5bc42e5112bde6cb72644a34d89bc7505b9d5"
},
{
"id": "5e4e3c95215be93be3bc5bac242f6b332c1265140d179f31af858e8f172c8d6a"
},
{
"id": "bdbcfb112b0f7d55e2bcc231ec06335ea5051d49edcbed8170f717f8ecf1a965"
},
{
"id": "294303fbde21251093bb86683701023bd1d7e310a64e0b1068f6160696f3c6a4"
},
{
"id": "00ef6f71fcaa72742493178b8409c32bb68d92c9f67af717f92bef35272a74d4"
},
{
"id": "4fff1259602cf46619d379ee8c790a1acc310a53cb617fa46d522978d6b4876b"
},
{
"id": "aab06b1602f0380e6c2f442c7992c82259968d8abbba1da69d774a32d747c3b4"
},
{
"id": "4bbee7e48d393b692f80e5a5357fcb435adbd46172b38f367a43c3aeb45b2fb3"
},
{
"id": "97a7fa0776225a5eb644da81db9a73eacebf046d7fe745f567345c1cec0a9e32"
},
{
"id": "aad1de5bb5dc4ce80de3d55a6ce7037ddb46aadb4e44c3742781d1422cf79765"
},
{
"id": "2dcd9ea8b4959c7b986bfda2bdc8175ed156a474457d38be42f54f027a1dff5a"
},
{
"id": "747215ea31506d60af14bae6914fd1107de0893f99c0f2e178216bea79de4677"
},
{
"id": "d69a3d1b7d635ba12be30ebb9473ad4a973138e54ef1aaa2f6cce060a82937b4"
},
{
"id": "c4ba426af0bb7be9de06b774aec33b7733cb952c5e1bc723c9bf021b3e2be1ea"
},
{
"id": "0f7dac8f31a9aac4d4479373153489fc57889c964e82dd619bed2f60f0af27ee"
},
{
"id": "561420baa35477e27b85e62ecfded0b76cab0c0acaedc9b3ab6ac7d88be42165"
},
{
"id": "d68d8eab7bad9c263f5af0eb46db168d2d82ad19acc5fb19c606fcb18de7994b"
},
{
"id": "86f7e9f6d98831e0ad19a575512f3d969d3af6921260809cc7a33b3b918d87f1"
},
{
"id": "f9287d47f86cc0af606026fe5e017fd479230b6cd2dcc82db915603658312d82"
},
{
"id": "cb83acb45cd810d8fd0df5f1f40d5bfd5406b74e37c9cda54c77114c5dcd357a"
},
{
"id": "5457c08086b3e78887c8eeb39cdd8dcb6559ceea13f32cc4a6f8a84513bfacf1"
},
{
"id": "1c86e2d22620ec6c94aac12fad7ed304bdf439020e74bbc0f0fc096bd5335891"
},
{
"id": "6ad22ca994d0b5952b26cb0b4cae939d474f57729e18509574ace9882a635641"
},
{
"id": "e15e167f70fb7d3ab740248e993096ecd7819de7ad5640f05e5c302b34737f33"
},
{
"id": "a391df97b5fdf380f78091d18da0626afbf9ca2f9517935f3dee766cd0ac72fe"
},
{
"id": "7b4185b0d115b5a12ba57f6804703789c68fb52d1587487161e96011a6a72223"
},
{
"id": "dbd86fc945e0748b2f263abad2338ff212ae02a895f38b0a2c262a0da518ebd2"
},
{
"id": "91591d5dd56657a1acbcc04116f17b2264dd369b9ad361bf15033e6ca326f5ac"
},
{
"id": "eb382df17d822d81d85097f28a49f86dc69ba8a05285dff39e2d877ea31e21cc"
},
{
"id": "b4a85c1e7e4c13281ae58538c57529cc6035ee465a2f69e40b41a6711a2eeb18"
},
{
"id": "0ea69892da43e1b4de82bde7bb599c3f15a71120f9f506fd210c2712ba7026a3"
},
{
"id": "b424c79388a2ea8b04e72f7ea32c0648db15ca5f25705bcd4231d0b658156af1"
},
{
"id": "db11596a64f76082991df4d1d1e8764f4d8da926f81ddbe09333d2ca1335ecd6"
},
{
"id": "f6e4c5cba1dc008f9b9611515ba163ccd1489105265dc8b2809eb846c1b94209"
},
{
"id": "cd4c4f1e65bd1f351dabf8c04fe2903b043ce98ce5613808c027c6609a0556d5"
},
{
"id": "9b0172004b25ee43e517ed6dd969bceb3fef4db3a577f91d8a3dc9cb6fe4e1d1"
},
{
"id": "ca0ee728c85f4df5ffab3561f55fdd2295291a86cd409839c59b92903d041025"
},
{
"id": "c589506d090796e304763dc269731029be08dee1706c1e87413fb376a2e84a97"
},
{
"id": "99ea6a5a7701c255661fc2bea32cb615ca0d4674c45fe6633e58e7eeb5f92873"
},
{
"id": "8e55f6ec8de9e8b4f75e3a771c601c1583855b5d113124ac9fb997b8589117fc"
},
{
"id": "11803eb1505d5014bc13c48621638a94f0b852587f0b5adbcb3ee471d9488ec3"
},
{
"id": "488cf9801acccc925b75d6828287ecaaff8b2bee9b58ce26fa0a2abdd61bd155"
},
{
"id": "0e9bc4a5989a39d4fc7ba73876c88822928b1cc965ed158b431759378363c182"
},
{
"id": "386b2cd47df9260f5b313b151ae988d0710e83e615dfd2abc948f1fa93eb76d6"
},
{
"id": "a451833e4856194aa5f56508eb34c298a5718539b9d320a2b7b30f32a107cc37"
},
{
"id": "91c0639025aba28c5af2178f49d653757bcc68e88d7cc461c86edc1ac2a61942"
},
{
"id": "aaf0b0846e265dec3dcf7b943ea2fc0331daf29a6114ac2eb971c10988e73f6d"
},
{
"id": "d26a9c5d89b9ce197e03bf91e2768df571cf04df796b5ae08742aea97be1c8c5"
},
{
"id": "490debe9303abe3c72fae49c62f8be15556a78c77c4d74e82305c5ce5723986a"
},
{
"id": "52348da7537eb13da45277d755b7b26dfcb249b3b602b2c49b65ecd908c6cde0"
},
{
"id": "1f31fe5bfb3e75c5e984201bfd6be15632f266171ecaf8714829a503818865bf"
}
]

View File

@@ -4,20 +4,16 @@ import store from "@/store";
import {
Alphabet,
Duration,
Event,
EventBuilder,
EventId,
Filter,
Keys,
PublicKey,
SingleLetterTag,
Tag,
Timestamp, UnsignedEvent
Timestamp
} from "@rust-nostr/nostr-sdk";
import miniToastr from "mini-toastr/mini-toastr";
import VueNotifications from "vue-notifications";
import {bech32} from "bech32";
export default defineComponent({
@@ -32,6 +28,7 @@ export async function post_note(note){
await client.publishTextNote(note, tags);
}
export async function react_to_dvm(dvm, reaction) {
let client = store.state.client
@@ -39,7 +36,6 @@ export async function react_to_dvm(dvm, reaction) {
let requestid = await client.sendEventBuilder(event);
let users = await get_user_infos([store.state.pubkey])
console.log(users[0])
if (reaction === "👎") {
@@ -47,13 +43,13 @@ export async function react_to_dvm(dvm, reaction) {
dvm.reactions.negative.push(users[0])
}
else {
} else {
dvm.reactions.positiveUser = true
dvm.reactions.positive.push(users[0])
}
}
export async function schedule(note, datetopost) {
@@ -105,6 +101,7 @@ export async function getEvents(eventids) {
return await client.getEventsOf([event_filter], Duration.fromSecs(5))
}
export async function getEventsOriginalOrder(eventids) {
let ids = []
for (let eid of eventids) {
@@ -152,8 +149,7 @@ export async function get_user_infos(pubkeys){
let contentjson = JSON.parse(entry.content)
//console.log(contentjson)
profiles.push({profile: contentjson, author: entry.author.toHex(), createdAt: entry.createdAt});
}
catch(error){
} catch (error) {
console.log("error")
}
@@ -162,6 +158,7 @@ export async function get_user_infos(pubkeys){
return profiles
}
export async function get_event_reactions(ids) {
let zapsandreactions = []
@@ -173,7 +170,8 @@ export async function get_event_reactions(ids){
reposts: 0,
zappedbyUser: false,
reactedbyUser: false,
repostedbyUser: false,})
repostedbyUser: false,
})
}
let client = store.state.client
@@ -205,8 +203,7 @@ export async function get_event_reactions(ids){
zapsandreactions.find(x => x.id === etag).amount += amount
}
}
}
else if (entry.kind === 7) {
} else if (entry.kind === 7) {
for (let tag of entry.tags) {
if (tag.asVec()[0] === "e") {
@@ -219,8 +216,7 @@ export async function get_event_reactions(ids){
}
}
else if (entry.kind === 6) {
} else if (entry.kind === 6) {
for (let tag of entry.tags) {
if (tag.asVec()[0] === "e") {
@@ -238,8 +234,7 @@ export async function get_event_reactions(ids){
//console.log(contentjson)
//zaps.push({profile: contentjson, author: entry.author.toHex(), createdAt: entry.createdAt});
}
catch(error){
} catch (error) {
//console.log(error)
}
@@ -258,7 +253,8 @@ export async function get_reactions(ids){
reactions.push({
id: id.toHex(),
amount: 0,
ReactedbyUser: false,})
ReactedbyUser: false,
})
}
let client = store.state.client
@@ -282,8 +278,7 @@ export async function get_reactions(ids){
}
//console.log(contentjson)
//zaps.push({profile: contentjson, author: entry.author.toHex(), createdAt: entry.createdAt});
}
catch(error){
} catch (error) {
console.log("error")
}
@@ -296,7 +291,6 @@ export async function get_reactions(ids){
}
export const sleep = (ms) => {
return new Promise(resolve => setTimeout(resolve, ms))
}
@@ -315,7 +309,6 @@ export const sleep = (ms) => {
}
export async function parseandreplacenpubs(note) {
note = note.replace("\n", " ")
const myArray = note.split(" ");
@@ -332,8 +325,7 @@ export async function parseandreplacenpubs(note){
console.log(profiles)
//console.log(profiles[0].profile.nip05)
myArray[word] = profiles[0].profile.nip05 // replace with nip05 for now
}
catch{
} catch {
}
}
@@ -357,13 +349,9 @@ export async function parseandreplacenpubsName(note){
if (myArray[word].startsWith("nostr:note")) {
myArray[word] = "<a class='purple' target=\"_blank\" href='https://njump.me/" + myArray[word].replace("nostr:", "") + "'>" + myArray[word].replace("nostr:", "") + "</a> "
}
else if(myArray[word].startsWith("nostr:nevent")){
} else if (myArray[word].startsWith("nostr:nevent")) {
myArray[word] = "<a class='purple' target=\"_blank\" href='https://njump.me/" + myArray[word].replace("nostr:", "") + "'>" + myArray[word].replace("nostr:", "") + "</a> "
}
else if(myArray[word].startsWith("nostr:npub")){
} else if (myArray[word].startsWith("nostr:npub")) {
//console.log(myArray[word])
//console.log(pk.toBech32())
@@ -377,8 +365,7 @@ export async function parseandreplacenpubsName(note){
// profiles[0].profile.name // replace with nip05 for now
}
catch{
} catch {
}
}
@@ -409,14 +396,12 @@ export async function dvmreactions(dvmid, authors) {
for (let author of authors) {
try {
authorscheck.push(PublicKey.parse(author))
}
catch{
} catch {
console.log("err" + author)
}
}
let reactionfilter = new Filter().kind(7).pubkey(dvmid).authors(authorscheck).since(Timestamp.fromSecs(Timestamp.now().asSecs() - 60 * 60 * 24 * 60)) // reactions by our followers in the last 2 months
let evts = await client.getEventsOf([reactionfilter], Duration.fromSecs(5))
let npubs = []
@@ -435,9 +420,7 @@ export async function dvmreactions(dvmid, authors) {
/*if (reaction.author.toHex() === store.state.pubkey.toHex()){
reactions.negativeUser = true
}*/
}
else{
} else {
let profile = users.find(x => x.author === reaction.author.toHex())
reactions.positive.push(profile)
// if (reaction.author.toHex() === store.state.pubkey.toHex()){
@@ -452,7 +435,6 @@ export async function dvmreactions(dvmid, authors) {
}
return reactions
}
@@ -476,13 +458,10 @@ export async function hasActiveSubscription(pubkeystring, tiereventdtag, tieraut
for (let tag of evts[0].tags) {
if (tag.asVec()[0] === "valid") {
subscriptionstatus["validUntil"] = parseInt(tag.asVec()[2])
}
else if (tag.asVec()[0] === "e"){
} else if (tag.asVec()[0] === "e") {
subscriptionstatus["subscriptionId"] = tag.asVec()[1]
}
else if (tag.asVec()[0] === "tier"){
if (tag.asVec()[1] === tiereventdtag)
{
} else if (tag.asVec()[0] === "tier") {
if (tag.asVec()[1] === tiereventdtag) {
matchesdtag = true
}
}
@@ -510,12 +489,6 @@ export async function hasActiveSubscription(pubkeystring, tiereventdtag, tieraut
}
</script>
<template>

View File

@@ -11,8 +11,6 @@ import miniToastr from "mini-toastr";
import VueNotifications from "vue-notifications";
async function zap_nwc(invoice) {
@@ -29,8 +27,7 @@ async function zap_nwc(invoice){
const response = await nwc.sendPayment(invoice);
console.log(response)
return true
}
catch (error){
} catch (error) {
miniToastr.showMessage(error, "This didn't work", VueNotifications.types.error)
console.log(error)
return false
@@ -61,11 +58,9 @@ function loadNWCUrl() {
export async function zap(invoice) {
let nwcstring = loadNWCUrl()
if (nwcstring.startsWith("nostr+walletconnect://"))
{
if (nwcstring.startsWith("nostr+walletconnect://")) {
return zap_nwc(invoice)
}
else{
} else {
let webln;
//this.dvmpaymentaddr = `https://chart.googleapis.com/chart?cht=qr&chl=${invoice}&chs=250x250&chld=M|0`;
@@ -80,8 +75,7 @@ export async function zap(invoice){
try {
let response = await webln.sendPayment(invoice)
return true
}
catch(err){
} catch (err) {
console.log(err)
await copyinvoice(invoice)
@@ -97,12 +91,9 @@ export async function zap_lud16(lud16, eventid, authorid){
let invoice = await zaprequest(lud16, 21, "with love from noogle.lol", eventid, authorid, store.state.relays)
let nwcstring = loadNWCUrl()
if (nwcstring.startsWith("nostr+walletconnect://"))
{
if (nwcstring.startsWith("nostr+walletconnect://")) {
return zap_nwc(invoice)
}
else{
} else {
let webln;
try {
webln = await requestProvider();
@@ -121,9 +112,7 @@ export async function zap_lud16(lud16, eventid, authorid){
if (response.preimage != null && response.preimage !== "") {
return true
}
}
catch(err){
} catch (err) {
console.log(err)
await copyinvoice(invoice)
@@ -150,8 +139,7 @@ export async function zap_lud16(lud16, eventid, authorid){
if (lud16 !== "" && lud16.toString().includes('@')) {
url = `https://${lud16.split('@')[1]}/.well-known/lnurlp/${lud16.split('@')[0]}`;
console.log(url)
}
else{
} else {
return null
}
try {
@@ -177,9 +165,7 @@ export async function zap_lud16(lud16, eventid, authorid){
if (zapped_event_id !== null) {
let e_tag = ['e', zapped_event_id]
tags = [amount_tag, relays, p_tag, e_tag, lnurl_tag]
}
else{
} else {
tags = [amount_tag, relays, p_tag, lnurl_tag]
}
/*if (zaptype === "private") {
@@ -194,7 +180,6 @@ export async function zap_lud16(lud16, eventid, authorid){
} */
let signer = store.state.signer
let zap_request = ""
@@ -214,20 +199,18 @@ export async function zap_lud16(lud16, eventid, authorid){
console.log(queryString)
let ob = await fetchAsync(`${callback}?${queryString}`)
return ob["pr"]
}
catch(e){
} catch (e) {
console.log(e)
}
}
catch(error){
} catch (error) {
console.log("ZAP REQUEST: " + error)
}
return null
}
export async function createBolt11Lud16(lud16, amount) {
if (lud16 === null || lud16 === "") {
return null;

View File

@@ -1,5 +1,5 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor">
<svg fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg">
<path
d="M15 4a1 1 0 1 0 0 2V4zm0 11v-1a1 1 0 0 0-1 1h1zm0 4l-.707.707A1 1 0 0 0 16 19h-1zm-4-4l.707-.707A1 1 0 0 0 11 14v1zm-4.707-1.293a1 1 0 0 0-1.414 1.414l1.414-1.414zm-.707.707l-.707-.707.707.707zM9 11v-1a1 1 0 0 0-.707.293L9 11zm-4 0h1a1 1 0 0 0-1-1v1zm0 4H4a1 1 0 0 0 1.707.707L5 15zm10-9h2V4h-2v2zm2 0a1 1 0 0 1 1 1h2a3 3 0 0 0-3-3v2zm1 1v6h2V7h-2zm0 6a1 1 0 0 1-1 1v2a3 3 0 0 0 3-3h-2zm-1 1h-2v2h2v-2zm-3 1v4h2v-4h-2zm1.707 3.293l-4-4-1.414 1.414 4 4 1.414-1.414zM11 14H7v2h4v-2zm-4 0c-.276 0-.525-.111-.707-.293l-1.414 1.414C5.42 15.663 6.172 16 7 16v-2zm-.707 1.121l3.414-3.414-1.414-1.414-3.414 3.414 1.414 1.414zM9 12h4v-2H9v2zm4 0a3 3 0 0 0 3-3h-2a1 1 0 0 1-1 1v2zm3-3V3h-2v6h2zm0-6a3 3 0 0 0-3-3v2a1 1 0 0 1 1 1h2zm-3-3H3v2h10V0zM3 0a3 3 0 0 0-3 3h2a1 1 0 0 1 1-1V0zM0 3v6h2V3H0zm0 6a3 3 0 0 0 3 3v-2a1 1 0 0 1-1-1H0zm3 3h2v-2H3v2zm1-1v4h2v-4H4zm1.707 4.707l.586-.586-1.414-1.414-.586.586 1.414 1.414z"
/>

View File

@@ -1,5 +1,5 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" fill="currentColor">
<svg fill="currentColor" height="17" width="20" xmlns="http://www.w3.org/2000/svg">
<path
d="M11 2.253a1 1 0 1 0-2 0h2zm-2 13a1 1 0 1 0 2 0H9zm.447-12.167a1 1 0 1 0 1.107-1.666L9.447 3.086zM1 2.253L.447 1.42A1 1 0 0 0 0 2.253h1zm0 13H0a1 1 0 0 0 1.553.833L1 15.253zm8.447.833a1 1 0 1 0 1.107-1.666l-1.107 1.666zm0-14.666a1 1 0 1 0 1.107 1.666L9.447 1.42zM19 2.253h1a1 1 0 0 0-.447-.833L19 2.253zm0 13l-.553.833A1 1 0 0 0 20 15.253h-1zm-9.553-.833a1 1 0 1 0 1.107 1.666L9.447 14.42zM9 2.253v13h2v-13H9zm1.553-.833C9.203.523 7.42 0 5.5 0v2c1.572 0 2.961.431 3.947 1.086l1.107-1.666zM5.5 0C3.58 0 1.797.523.447 1.42l1.107 1.666C2.539 2.431 3.928 2 5.5 2V0zM0 2.253v13h2v-13H0zm1.553 13.833C2.539 15.431 3.928 15 5.5 15v-2c-1.92 0-3.703.523-5.053 1.42l1.107 1.666zM5.5 15c1.572 0 2.961.431 3.947 1.086l1.107-1.666C9.203 13.523 7.42 13 5.5 13v2zm5.053-11.914C11.539 2.431 12.928 2 14.5 2V0c-1.92 0-3.703.523-5.053 1.42l1.107 1.666zM14.5 2c1.573 0 2.961.431 3.947 1.086l1.107-1.666C18.203.523 16.421 0 14.5 0v2zm3.5.253v13h2v-13h-2zm1.553 12.167C18.203 13.523 16.421 13 14.5 13v2c1.573 0 2.961.431 3.947 1.086l1.107-1.666zM14.5 13c-1.92 0-3.703.523-5.053 1.42l1.107 1.666C11.539 15.431 12.928 15 14.5 15v-2z"
/>

View File

@@ -1,5 +1,5 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="20" fill="currentColor">
<svg fill="currentColor" height="20" width="18" xmlns="http://www.w3.org/2000/svg">
<path
d="M11.447 8.894a1 1 0 1 0-.894-1.789l.894 1.789zm-2.894-.789a1 1 0 1 0 .894 1.789l-.894-1.789zm0 1.789a1 1 0 1 0 .894-1.789l-.894 1.789zM7.447 7.106a1 1 0 1 0-.894 1.789l.894-1.789zM10 9a1 1 0 1 0-2 0h2zm-2 2.5a1 1 0 1 0 2 0H8zm9.447-5.606a1 1 0 1 0-.894-1.789l.894 1.789zm-2.894-.789a1 1 0 1 0 .894 1.789l-.894-1.789zm2 .789a1 1 0 1 0 .894-1.789l-.894 1.789zm-1.106-2.789a1 1 0 1 0-.894 1.789l.894-1.789zM18 5a1 1 0 1 0-2 0h2zm-2 2.5a1 1 0 1 0 2 0h-2zm-5.447-4.606a1 1 0 1 0 .894-1.789l-.894 1.789zM9 1l.447-.894a1 1 0 0 0-.894 0L9 1zm-2.447.106a1 1 0 1 0 .894 1.789l-.894-1.789zm-6 3a1 1 0 1 0 .894 1.789L.553 4.106zm2.894.789a1 1 0 1 0-.894-1.789l.894 1.789zm-2-.789a1 1 0 1 0-.894 1.789l.894-1.789zm1.106 2.789a1 1 0 1 0 .894-1.789l-.894 1.789zM2 5a1 1 0 1 0-2 0h2zM0 7.5a1 1 0 1 0 2 0H0zm8.553 12.394a1 1 0 1 0 .894-1.789l-.894 1.789zm-1.106-2.789a1 1 0 1 0-.894 1.789l.894-1.789zm1.106 1a1 1 0 1 0 .894 1.789l-.894-1.789zm2.894.789a1 1 0 1 0-.894-1.789l.894 1.789zM8 19a1 1 0 1 0 2 0H8zm2-2.5a1 1 0 1 0-2 0h2zm-7.447.394a1 1 0 1 0 .894-1.789l-.894 1.789zM1 15H0a1 1 0 0 0 .553.894L1 15zm1-2.5a1 1 0 1 0-2 0h2zm12.553 2.606a1 1 0 1 0 .894 1.789l-.894-1.789zM17 15l.447.894A1 1 0 0 0 18 15h-1zm1-2.5a1 1 0 1 0-2 0h2zm-7.447-5.394l-2 1 .894 1.789 2-1-.894-1.789zm-1.106 1l-2-1-.894 1.789 2 1 .894-1.789zM8 9v2.5h2V9H8zm8.553-4.894l-2 1 .894 1.789 2-1-.894-1.789zm.894 0l-2-1-.894 1.789 2 1 .894-1.789zM16 5v2.5h2V5h-2zm-4.553-3.894l-2-1-.894 1.789 2 1 .894-1.789zm-2.894-1l-2 1 .894 1.789 2-1L8.553.106zM1.447 5.894l2-1-.894-1.789-2 1 .894 1.789zm-.894 0l2 1 .894-1.789-2-1-.894 1.789zM0 5v2.5h2V5H0zm9.447 13.106l-2-1-.894 1.789 2 1 .894-1.789zm0 1.789l2-1-.894-1.789-2 1 .894 1.789zM10 19v-2.5H8V19h2zm-6.553-3.894l-2-1-.894 1.789 2 1 .894-1.789zM2 15v-2.5H0V15h2zm13.447 1.894l2-1-.894-1.789-2 1 .894 1.789zM18 15v-2.5h-2V15h2z"
/>

View File

@@ -1,5 +1,5 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor">
<svg fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg">
<path
d="M10 3.22l-.61-.6a5.5 5.5 0 0 0-7.666.105 5.5 5.5 0 0 0-.114 7.665L10 18.78l8.39-8.4a5.5 5.5 0 0 0-.114-7.665 5.5 5.5 0 0 0-7.666-.105l-.61.61z"
/>

View File

@@ -1,15 +1,14 @@
<!-- This icon is from <https://github.com/Templarian/MaterialDesign>, distributed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0) license-->
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
aria-hidden="true"
role="img"
class="iconify iconify--mdi"
width="24"
height="24"
preserveAspectRatio="xMidYMid meet"
role="img"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 18v-4h-3v1h-2v-1H9v1H7v-1H4v4h16M6.33 8l-1.74 4H7v-1h2v1h6v-1h2v1h2.41l-1.74-4H6.33M9 5v1h6V5H9m12.84 7.61c.1.22.16.48.16.8V18c0 .53-.21 1-.6 1.41c-.4.4-.85.59-1.4.59H4c-.55 0-1-.19-1.4-.59C2.21 19 2 18.53 2 18v-4.59c0-.32.06-.58.16-.8L4.5 7.22C4.84 6.41 5.45 6 6.33 6H7V5c0-.55.18-1 .57-1.41C7.96 3.2 8.44 3 9 3h6c.56 0 1.04.2 1.43.59c.39.41.57.86.57 1.41v1h.67c.88 0 1.49.41 1.83 1.22l2.34 5.39z"

View File

@@ -1,6 +1,5 @@
<script setup>
import Login from "@/components/Login.vue";
import {isVisible} from "bootstrap/js/src/util/index.js";
</script>
<template>
@@ -46,7 +45,7 @@ import {isVisible} from "bootstrap/js/src/util/index.js";
</div>
</template>
<style scoped lang="scss">
<style lang="scss" scoped>
.three-column-layout {
display: grid;
grid-template-areas:
@@ -69,6 +68,7 @@ import {isVisible} from "bootstrap/js/src/util/index.js";
grid-area: header;
margin-top: 30px;
}
main {
grid-area: main;
@@ -77,6 +77,7 @@ import {isVisible} from "bootstrap/js/src/util/index.js";
padding: 20px;
}
footer {
position: fixed;
@@ -89,6 +90,7 @@ import {isVisible} from "bootstrap/js/src/util/index.js";
z-index: 10;
text-align: center;
}
aside {
grid-area: aside;
margin-top: 10px;
@@ -108,8 +110,6 @@ import {isVisible} from "bootstrap/js/src/util/index.js";
}
@media (min-width: 768px) {
grid-template-columns: 1fr 3fr 1fr;
grid-template-areas: "header main aside footer";

View File

@@ -13,12 +13,6 @@ import VueDatePicker from '@vuepic/vue-datepicker';
import '@vuepic/vue-datepicker/dist/main.css'
//This is all for notifications
import VueNotifications from "vue-notifications";
import miniToastr from 'mini-toastr'

View File

@@ -1,5 +1,4 @@
import { createWebHistory, createRouter } from "vue-router";
import {createRouter, createWebHistory} from "vue-router";
const routes = [

View File

@@ -63,7 +63,6 @@ const store = createStore({
},
set_mutes(state, items) {
state.mutes.length = 0
state.mutes.push.apply(state.mutes, items)
@@ -136,7 +135,6 @@ const store = createStore({
},
set_search_results(state, results) {
state.results.length = 0
state.results.push.apply(state.results, results)

View File

@@ -1,16 +1,24 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"exclude": ["src/**/__tests__/*"],
"include": [
"env.d.ts",
"src/**/*",
"src/**/*.vue"
],
"exclude": [
"src/**/__tests__/*"
],
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
"@/*": [
"./src/*"
]
},
"allowJs": true,
"noImplicitAny": false,
"verbatimModuleSyntax":false,
"verbatimModuleSyntax": false
}
}

View File

@@ -11,9 +11,10 @@
"composite": true,
"noEmit": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"module": "ESNext",
"moduleResolution": "Bundler",
"types": ["node"]
"types": [
"node"
]
}
}