Skip to content

Commit 7518be7

Browse files
JSKittyclaude
andcommitted
feat(community): top-right X close on the invite panel
Same relay-dialog close button, sharing the Done path (busy-guarded, so it can't escape a mid-rekey critical op). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 9f75986 commit 7518be7

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8321,6 +8321,7 @@ async function openCommunityInvitePanel(chat) {
83218321
<h3 class="cmt-title">Invite to ${escapeHtml(chat.metadata.custom_fields.name || 'Community')}</h3>
83228322
<p class="cmt-subtitle">Bring people into your community.</p>
83238323
</div>
8324+
<button id="cmt-close-x" class="relay-dialog-close cmt-close-x">&times;</button>
83248325
</div>
83258326

83268327
<section class="cmt-section">
@@ -8363,6 +8364,7 @@ async function openCommunityInvitePanel(chat) {
83638364
status.classList.toggle('cmt-ok', !!msg && !isError);
83648365
};
83658366
box.querySelector('#cmt-close').onclick = () => { if (busy) return; popBack('community-invite'); dismiss(); };
8367+
box.querySelector('#cmt-close-x').onclick = () => { if (busy) return; popBack('community-invite'); dismiss(); };
83668368
// Lock the ENTIRE panel during a critical op: disable every control + block close/backdrop-dismiss, so a
83678369
// link create / revoke (which re-keys) / direct invite can't be raced or interrupted half-applied. Restores
83688370
// each control's prior disabled state on release (e.g. the Invite button stays disabled if nothing's picked).

src/styles.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16165,6 +16165,8 @@ body.profile-switcher-editing .profile-switcher-add {
1616516165
.cmt-status.cmt-ok { color: var(--accent-color, #59fcb3); opacity: 1; }
1616616166
.cmt-status.cmt-err { color: var(--danger-color); opacity: 1; }
1616716167
.cmt-close { width: 100%; }
16168+
/* Top-right X (shares the relay dialog's button styling) — pushed to the header's far edge. */
16169+
.cmt-close-x { margin-left: auto; align-self: flex-start; }
1616816170

1616916171
/* Invite panel locked during a critical op (create / revoke+rekey / direct invite) — dim + wait cursor. */
1617016172
.cmt-busy { cursor: wait; }

0 commit comments

Comments
 (0)