feat(admin): Enhance Turnstile configuration UI and add GitHub commit links

- Move Turnstile status indicator above input fields for better visibility
- Mask secret key input with placeholder dots when already configured
- Update secret key helper text to indicate configuration status
- Enhance version API endpoint to include GitHub commit URL
- Add githubUrl field to version response for direct commit linking
- Implement emoji sizing styles for post content and compose input
- Update RightSidebar version state type to include githubUrl
- Add clickable GitHub commit link in version display when available
- Improve security by hiding sensitive Turnstile secret key values
This commit is contained in:
Christomatt
2026-01-26 19:11:09 +01:00
parent a3b158099d
commit bb9245ab99
4 changed files with 75 additions and 26 deletions
+15 -14
View File
@@ -474,6 +474,19 @@ export default function AdminPage() {
Cloudflare Dashboard
</a>.
</p>
{nodeSettings.turnstileSiteKey && nodeSettings.turnstileSecretKey && (
<div style={{
padding: '8px 12px',
background: 'rgba(34, 197, 94, 0.1)',
border: '1px solid rgba(34, 197, 94, 0.3)',
borderRadius: '6px',
fontSize: '12px',
color: 'rgb(34, 197, 94)',
marginBottom: '12px',
}}>
Turnstile is enabled and will be shown on login/registration
</div>
)}
</div>
<div style={{ display: 'grid', gap: '12px' }}>
<div>
@@ -501,25 +514,13 @@ export default function AdminPage() {
type="password"
value={nodeSettings.turnstileSecretKey}
onChange={e => setNodeSettings({ ...nodeSettings, turnstileSecretKey: e.target.value })}
placeholder="0x4AAAAAAA..."
placeholder={nodeSettings.turnstileSecretKey ? '••••••••••••••••' : '0x4AAAAAAA...'}
style={{ fontFamily: 'monospace', fontSize: '13px' }}
/>
<p style={{ fontSize: '11px', color: 'var(--foreground-tertiary)', marginTop: '4px' }}>
Secret key for server-side verification
{nodeSettings.turnstileSecretKey ? 'Secret key is configured (hidden for security)' : 'Secret key for server-side verification'}
</p>
</div>
{nodeSettings.turnstileSiteKey && nodeSettings.turnstileSecretKey && (
<div style={{
padding: '8px 12px',
background: 'rgba(34, 197, 94, 0.1)',
border: '1px solid rgba(34, 197, 94, 0.3)',
borderRadius: '6px',
fontSize: '12px',
color: 'rgb(34, 197, 94)',
}}>
Turnstile is enabled and will be shown on login/registration
</div>
)}
</div>
</div>