feat(role-editor): "Use as template" — copy another role's perm set
Adds a select+button next to the permission editor: pick any other role from the dropdown, click "Use as template" → all checkboxes are replaced with that role's permission set. Local-only (no API call); the user still hits "Save changes" to persist. Includes a banner confirming the load with the source role name + perm count. Selector excludes the currently-edited role. Hidden for non-admins. UI: dark card row matching the Foundry Deck token system (--bg-card, --text-dim mono label, --bg-sink select with --accent focus border). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -663,6 +663,32 @@ dd { font-size: .92rem; font-family: 'JetBrains Mono', monospace; }
|
||||
color: var(--text-dim); font-size: .72rem; line-height: 1.35; margin-top: 2px;
|
||||
}
|
||||
|
||||
.role-editor-template {
|
||||
display: flex; align-items: center; gap: 10px;
|
||||
background: var(--bg-card); border: var(--hair); border-radius: var(--radius);
|
||||
padding: 10px 14px; margin-bottom: 14px;
|
||||
font-size: .82rem;
|
||||
}
|
||||
.role-editor-template label {
|
||||
color: var(--text-dim); text-transform: uppercase;
|
||||
letter-spacing: .12em; font-size: .72rem;
|
||||
font-family: 'JetBrains Mono', monospace;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.role-editor-template select {
|
||||
flex: 1; min-width: 0;
|
||||
padding: 7px 10px;
|
||||
background: var(--bg-sink); color: var(--text);
|
||||
border: var(--hair); border-radius: var(--radius);
|
||||
font-family: 'JetBrains Mono', monospace; font-size: .82rem;
|
||||
cursor: pointer; transition: .12s;
|
||||
}
|
||||
.role-editor-template select:hover { border-color: var(--border-bright); }
|
||||
.role-editor-template select:focus { border-color: var(--accent); outline: none; }
|
||||
.role-editor-template button:disabled {
|
||||
opacity: .4; cursor: not-allowed; border-color: var(--border);
|
||||
}
|
||||
|
||||
.role-editor-actions {
|
||||
display: flex; gap: 10px; margin-top: 22px;
|
||||
padding-top: 18px; border-top: var(--hair);
|
||||
|
||||
Reference in New Issue
Block a user