feat: show correct connection type on debug page

Updated debug page to display the actual account type:
- Browser Extension (type: 'extension')
- Bunker Connection (type: 'nostr-connect')
- Account Connection (fallback)

Changes:
- Section title now reflects active account type
- Connection status message updated accordingly
- No longer always shows 'Bunker Connection' regardless of type

Makes it clear to users which authentication method they're using.
This commit is contained in:
Gigi
2025-10-17 21:21:39 +02:00
parent 8eaba04d91
commit b711b21048

View File

@@ -417,9 +417,17 @@ const Debug: React.FC<DebugProps> = ({ relayPool }) => {
<div className="settings-content">
{/* Bunker Login Section */}
{/* Account Connection Section */}
<div className="settings-section">
<h3 className="section-title">Bunker Connection</h3>
<h3 className="section-title">
{activeAccount
? activeAccount.type === 'extension'
? 'Browser Extension'
: activeAccount.type === 'nostr-connect'
? 'Bunker Connection'
: 'Account Connection'
: 'Account Connection'}
</h3>
{!activeAccount ? (
<div>
<div className="text-sm opacity-70 mb-3">Connect to your bunker (Nostr Connect signer) to enable encryption/decryption testing</div>
@@ -447,7 +455,13 @@ const Debug: React.FC<DebugProps> = ({ relayPool }) => {
) : (
<div className="flex items-center justify-between">
<div>
<div className="text-sm opacity-70">Connected to bunker</div>
<div className="text-sm opacity-70">
{activeAccount.type === 'extension'
? 'Connected via browser extension'
: activeAccount.type === 'nostr-connect'
? 'Connected to bunker'
: 'Connected'}
</div>
<div className="text-sm font-mono">{pubkey}</div>
</div>
<button