working proper when disabled

This commit is contained in:
counterweight 2025-02-19 14:46:03 +01:00
parent ff707c7a50
commit 2942c3036b
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
3 changed files with 15 additions and 4 deletions

View file

@ -50,7 +50,7 @@ h1 {
color: #e1c300; color: #e1c300;
} }
.invite-card-content #nostr-signup { #nostr-signup-button {
width: 20vw; width: 20vw;
background: #a915ff; background: #a915ff;
border-radius: 1vw; border-radius: 1vw;
@ -58,8 +58,19 @@ h1 {
color: white; color: white;
font-weight: bold; font-weight: bold;
padding: 1%; padding: 1%;
cursor: pointer;
} }
#nostr-signup p { #nostr-signup-button:hover {
background-color: #b941ff;
}
#nostr-signup-button:disabled {
background-color: #d8d8d8;
cursor: default;
}
#nostr-signup-button p {
font-size: 1.5rem; font-size: 1.5rem;
} }

View file

@ -1,7 +1,7 @@
window.onload = function () { window.onload = function () {
if (!window.nostr) { if (!window.nostr) {
console.log('Nostr extension not present'); console.log('Nostr extension not present');
document.querySelector('#nostr-signup').disabled = true; document.querySelector('#nostr-signup-button').disabled = true;
document.querySelector('#no-extension-nudges').style.display = 'block'; document.querySelector('#no-extension-nudges').style.display = 'block';
} else { } else {
console.log('Nostr extension present'); console.log('Nostr extension present');

View file

@ -18,7 +18,7 @@
</figure> </figure>
<p>Usa tu extensión de Nostr para darte de alta:</p> <p>Usa tu extensión de Nostr para darte de alta:</p>
<form onsubmit="acceptInvite();return false"> <form onsubmit="acceptInvite();return false">
<button id="nostr-signup" type="submit"> <button id="nostr-signup-button" type="submit">
<figure> <figure>
<img src="/img/white_ostrich.svg" width="40%" margin="-5% -5%" /> <img src="/img/white_ostrich.svg" width="40%" margin="-5% -5%" />
</figure> </figure>