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
@@ -0,0 +1,18 @@
|
||||
import { createContext, useContext } from 'react'
|
||||
|
||||
export interface ConfirmOptions {
|
||||
title: string
|
||||
message?: string
|
||||
/** Label of the confirming button, e.g. "Delete". */
|
||||
confirmLabel: string
|
||||
}
|
||||
|
||||
export type Confirm = (options: ConfirmOptions) => Promise<boolean>
|
||||
|
||||
export const ConfirmContext = createContext<Confirm | null>(null)
|
||||
|
||||
/** Ask before a destructive action. Falls back to the browser's confirm() when no provider is mounted. */
|
||||
export function useConfirm(): Confirm {
|
||||
const confirm = useContext(ConfirmContext)
|
||||
return confirm ?? (async (o) => window.confirm(o.message ? `${o.title}\n${o.message}` : o.title))
|
||||
}
|
||||
Reference in new issue
Block a user