diff --git a/src/index.html b/src/index.html
index af68a1f..4d9598a 100644
--- a/src/index.html
+++ b/src/index.html
@@ -453,6 +453,28 @@
border-radius: 8px;
padding: 7px 10px;
box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
+ transition: opacity .15s;
+ }
+
+ .pill:disabled {
+ opacity: .7;
+ cursor: wait;
+ }
+
+ .pill .spinner {
+ display: inline-block;
+ width: 14px;
+ height: 14px;
+ border: 2px solid var(--line);
+ border-top-color: var(--accent);
+ border-radius: 50%;
+ margin-right: 6px;
+ animation: spin .55s linear infinite;
+ vertical-align: -2px;
+ }
+
+ @keyframes spin {
+ to { transform: rotate(360deg); }
}
.previewShell {
@@ -4404,13 +4426,22 @@
}
async function nostrLogin() {
- const pubkey = await getNostrPublicKey();
- if (!pubkey) {
- alert('No Nostr extension found. Install Alby, nos2x, or another NIP-07 extension.');
- return;
+ const loginBtn = $('nostrLoginBtn');
+ const orig = loginBtn.innerHTML;
+ loginBtn.disabled = true;
+ loginBtn.innerHTML = 'Sign in with Nostr';
+ try {
+ const pubkey = await getNostrPublicKey();
+ if (!pubkey) {
+ alert('No Nostr extension found. Install Alby, nos2x, or another NIP-07 extension.');
+ return;
+ }
+ state.community.myPubkey = pubkey;
+ await loadCommunityIdentity();
+ } finally {
+ loginBtn.disabled = false;
+ loginBtn.innerHTML = orig;
}
- state.community.myPubkey = pubkey;
- await loadCommunityIdentity();
}
async function loadMyDesigns() {