noogle: some bugfixes

This commit is contained in:
Believethehype
2024-02-18 01:29:13 +01:00
parent 4e67e13249
commit 99b53bf8b3
2 changed files with 13 additions and 5 deletions

View File

@@ -294,15 +294,23 @@ function nextInput(e) {
}
if (webln) {
try{
let response = await webln.sendPayment(invoice)
dvms.find(i => i.bolt11 === invoice).status = "paid"
store.commit('set_imagedvm_results', dvms)
}
catch(err){
console.log(err)
await copyinvoice(invoice)
}
let response = await webln.sendPayment(invoice)
//console.log(response)
//for (const dvm of dvms){
// console.log(dvm.bolt11 + " " + invoice)
//}
dvms.find(i => i.bolt11 === invoice).status = "paid"
store.commit('set_imagedvm_results', dvms)
}
@@ -447,7 +455,7 @@ const submitHandler = async () => {
<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)"/>
</figure>
<div v-if="dvm.result && store.state.pubkey.toHex() !== Keys.fromSkStr('ece3c0aa759c3e895ecb3c13ab3813c0f98430c6d4bd22160b9c2219efc9cf0e').publicKey.toHex()" >
<div v-if="dvm.result && store.state.pubkey.toHex() !== Keys.parse('ece3c0aa759c3e895ecb3c13ab3813c0f98430c6d4bd22160b9c2219efc9cf0e').publicKey.toHex()" >
<button @click="openModal('Look what I created on noogle.lol\n\n' + dvm.result)" 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>

View File

@@ -135,7 +135,7 @@ export default {
if (localStorage.getItem('nostr-key-method') === 'nip07') {
await this.sign_in_nip07()
}
if (localStorage.getItem('nostr-key-method') === 'nsec') {
else if (localStorage.getItem('nostr-key-method') === 'nsec') {
await this.sign_in_key(localStorage.getItem('nostr-key'))
}
else if (localStorage.getItem('nostr-key-method') === 'nostr-login'){