Polish pass: identity forms, confirm dialogs, policy chips, merged grants, narrow screens
- Tokens: bigger show-once token with primary Copy; warn when no policies are selected (OpenBao then inherits the creator's policies). - Identity forms get headings, wider cards and two-column policy lists. - Replace window.confirm with an in-app confirm dialog (falls back to window.confirm without a provider). - Show policies, aliases and members as chips in the identity tables. - Access panel: one row per secret instead of separate data/metadata rules. - Stack graph details below 60rem; phone-width rules for tables, nav, toolbar. - New favicon and page title; label the root "*" path as "everything". Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d67a9c9b62
commit
0a2054eb41
19 files changed
+551
-67
No files matched your search
@@ -4,6 +4,7 @@ import { revokeAccess } from '../../api/grants'
|
||||
import type { AccessGraph, GraphEdge, GraphNode, PolicyInput } from '../../model/graph'
|
||||
import { parseManagedPolicy, type GrantTarget } from '../../model/managed'
|
||||
import { CapabilityChips } from '../shared/CapabilityChips'
|
||||
import { useConfirm } from '../shared/useConfirm'
|
||||
|
||||
export type Selection = { kind: 'node'; id: string } | { kind: 'edge'; id: string }
|
||||
|
||||
@@ -147,6 +148,7 @@ function NodeDetails({ node, full, policies }: { node: GraphNode; full: AccessGr
|
||||
|
||||
function EdgeDetails({ client, edge, full, policies, onRevoked }: { client: BaoClient; edge: GraphEdge; full: AccessGraph } & Pick<Props, 'policies' | 'onRevoked'>) {
|
||||
const qc = useQueryClient()
|
||||
const confirm = useConfirm()
|
||||
const from = nodeById(full, edge.source)
|
||||
const to = nodeById(full, edge.target)
|
||||
const isGrant = from?.type === 'policy' && to?.type === 'path'
|
||||
@@ -186,10 +188,14 @@ function EdgeDetails({ client, edge, full, policies, onRevoked }: { client: BaoC
|
||||
<button
|
||||
type="button"
|
||||
className="danger"
|
||||
onClick={() =>
|
||||
window.confirm(`Revoke access to ${to!.label} from ${ownerMatch[1]} "${ownerMatch[2]}"? Other policies are unaffected.`) &&
|
||||
revoke.mutate()
|
||||
}
|
||||
onClick={async () => {
|
||||
const ok = await confirm({
|
||||
title: `Revoke access to ${to!.label}?`,
|
||||
message: `Removes it from ${ownerMatch[1]} “${ownerMatch[2]}”. Other policies are unaffected.`,
|
||||
confirmLabel: 'Revoke',
|
||||
})
|
||||
if (ok) revoke.mutate()
|
||||
}}
|
||||
disabled={revoke.isPending}
|
||||
>
|
||||
Revoke
|
||||
|
||||
Reference in new issue
Block a user