Phone-width layout fixes (ENB-23)
Checked at 390px and 360px in a headless mobile Chrome; no horizontal overflow on any page. - Tables become stacked cards on phones, with column names from data-label and row actions underneath instead of off the edge. - Nav fits on one line; chips no longer wrap mid-name; less nested padding. - Graph opens at a fixed readable zoom on phones with a pan/zoom hint, and scrolls to the details card when a node or label is tapped. - Add the missing headings and wide layout to the user, entity and group forms (previously only the token form had them). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0882d35123
commit
61bb6d912a
11 files changed
+154
-23
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { useMutation, useQueryClient } from '@tanstack/react-query'
|
||||
import type { Ref } from 'react'
|
||||
import type { BaoClient } from '../../api/bao'
|
||||
import { revokeAccess } from '../../api/grants'
|
||||
import type { AccessGraph, GraphEdge, GraphNode, PolicyInput } from '../../model/graph'
|
||||
@@ -14,6 +15,7 @@ interface Props {
|
||||
policies: PolicyInput[]
|
||||
selection: Selection | null
|
||||
onRevoked: () => void
|
||||
ref?: Ref<HTMLElement>
|
||||
}
|
||||
|
||||
const nodeById = (g: AccessGraph, id: string) => g.nodes.find((n) => n.id === id)
|
||||
@@ -210,7 +212,7 @@ function EdgeDetails({ client, edge, full, policies, onRevoked }: { client: BaoC
|
||||
)
|
||||
}
|
||||
|
||||
export function Details({ client, full, policies, selection, onRevoked }: Props) {
|
||||
export function Details({ client, full, policies, selection, onRevoked, ref }: Props) {
|
||||
let body = <p className="detail-empty">Select a node or a line to see what it grants.</p>
|
||||
if (selection?.kind === 'node') {
|
||||
const node = nodeById(full, selection.id)
|
||||
@@ -220,7 +222,7 @@ export function Details({ client, full, policies, selection, onRevoked }: Props)
|
||||
if (edge) body = <EdgeDetails client={client} edge={edge} full={full} policies={policies} onRevoked={onRevoked} />
|
||||
}
|
||||
return (
|
||||
<aside className="graph-details" aria-label="Details">
|
||||
<aside ref={ref} className="graph-details" aria-label="Details">
|
||||
{body}
|
||||
</aside>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user