diff --git a/web/src/index.css b/web/src/index.css index a07c9ae..982978b 100644 --- a/web/src/index.css +++ b/web/src/index.css @@ -153,7 +153,7 @@ input, textarea { font-size: 1em; } -button, a.button { +button, a.button, span.button { cursor: var(--clickable-cursor); font-size: 1em; background: none; diff --git a/web/src/ui/util/JSONView.css b/web/src/ui/util/JSONView.css index 804482a..bce1a25 100644 --- a/web/src/ui/util/JSONView.css +++ b/web/src/ui/util/JSONView.css @@ -15,9 +15,13 @@ pre.json-view { user-select: none; } - button { + span.button { padding: 0 .25rem; display: inline-flex; + + &::before { + content: attr(data-symbol); + } } /* If the screen is wide enough, make line-wrapped strings aligned after the object key */ diff --git a/web/src/ui/util/JSONView.tsx b/web/src/ui/util/JSONView.tsx index 8bd165a..22e95d9 100644 --- a/web/src/ui/util/JSONView.tsx +++ b/web/src/ui/util/JSONView.tsx @@ -82,9 +82,12 @@ function JSONValueWithKey({ data, objectKey, trailingComma, noCollapse }: JSONVi ? , : null const collapseButton = noCollapse ? null : - + if (Array.isArray(data)) { return <> {renderedKey}