Skip to content

Commit a74adaa

Browse files
feat: consolidate team invitation details into a single copy button
1 parent e4edb13 commit a74adaa

2 files changed

Lines changed: 40 additions & 6 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "api-documenter",
3-
"version": "1.0.9",
3+
"version": "1.0.10",
44
"description": "Self-hosted Postman alternative with folder-level RBAC and offline-first documentation",
55
"main": "./out/main/index.js",
66
"author": "Praneeth Kulukuri",

src/renderer/src/components/RbacSettingsDialog.tsx

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -486,14 +486,48 @@ export function RbacSettingsDialog() {
486486

487487
{/* Body */}
488488
<div style={{ padding: '32px', display: 'flex', flexDirection: 'column', gap: '24px' }}>
489-
<SuccessField label="User ID" value={successData.id} />
490-
<SuccessField label="Email Address" value={successData.email} />
491-
<SuccessField label="Assigned Role" value={successData.role} isBadge />
492-
<SuccessField label="Access Token" value={successData.token} isSecret />
489+
<div style={{ padding: '20px', background: 'rgba(255,255,255,0.03)', border: '1px solid rgba(255,255,255,0.1)', borderRadius: '16px', display: 'flex', flexDirection: 'column', gap: '16px' }}>
490+
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
491+
<span style={{ fontSize: '11px', fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.05em', color: '#71717A' }}>Complete Invitation Package</span>
492+
<button
493+
onClick={() => {
494+
const text = `Proxy URL: ${project?.proxyUrl}\nProject ID: ${currentProjectId}\nAccess Token: ${successData.token}`;
495+
navigator.clipboard.writeText(text);
496+
alert('Copied all credentials to clipboard!');
497+
}}
498+
style={{
499+
padding: '6px 12px', background: '#22c55e', color: 'white', fontSize: '11px', fontWeight: 700,
500+
borderRadius: '8px', border: 'none', cursor: 'pointer', display: 'flex', alignItems: 'center', gap: '6px'
501+
}}
502+
>
503+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3"><path d="M20 6L9 17l-5-5" /></svg>
504+
Copy All
505+
</button>
506+
</div>
507+
<div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
508+
<div style={{ display: 'flex', gap: '8px', fontSize: '13px' }}>
509+
<span style={{ color: '#52525B', fontWeight: 600 }}>Proxy URL:</span>
510+
<span style={{ color: '#A1A1AA', wordBreak: 'break-all' }}>{project?.proxyUrl}</span>
511+
</div>
512+
<div style={{ display: 'flex', gap: '8px', fontSize: '13px' }}>
513+
<span style={{ color: '#52525B', fontWeight: 600 }}>Project ID:</span>
514+
<span style={{ color: '#A1A1AA' }}>{currentProjectId}</span>
515+
</div>
516+
<div style={{ display: 'flex', gap: '8px', fontSize: '13px' }}>
517+
<span style={{ color: '#52525B', fontWeight: 600 }}>Token:</span>
518+
<span style={{ color: '#FDE68A', fontFamily: 'monospace' }}>{successData.token}</span>
519+
</div>
520+
</div>
521+
</div>
522+
523+
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '16px' }}>
524+
<SuccessField label="User ID" value={successData.id} />
525+
<SuccessField label="Email" value={successData.email} />
526+
</div>
493527

494528
<div style={{ padding: '16px', background: 'rgba(245,158,11,0.05)', border: '1px solid rgba(245,158,11,0.1)', borderRadius: '12px' }}>
495529
<p style={{ fontSize: '12px', color: 'rgba(245,158,11,0.8)', lineHeight: 1.6, margin: 0 }}>
496-
<span style={{ fontWeight: 700 }}>Important:</span> The access token will never be shown again. Ensure the user saves it securely.
530+
<span style={{ fontWeight: 700 }}>Note:</span> This information is only shown once. Ensure the user saves it securely.
497531
</p>
498532
</div>
499533
</div>

0 commit comments

Comments
 (0)