Widgets tab links the external demo when config.json names one (demo_url)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
65a9888784
commit
62605d57eb
+6
-2
@@ -31,7 +31,7 @@ function Tile({ spec, data, note }: { spec: WidgetSpec; data: WidgetData; note:
|
||||
)
|
||||
}
|
||||
|
||||
export default function Gallery() {
|
||||
export default function Gallery({ demoUrl }: { demoUrl?: string }) {
|
||||
const [cat, setCat] = useState<Sensor[] | null>(null)
|
||||
const [err, setErr] = useState('')
|
||||
const rate = useRefreshMs()
|
||||
@@ -54,7 +54,11 @@ export default function Gallery() {
|
||||
|
||||
return (
|
||||
<div className="dash gallery">
|
||||
<div className="dash-bar"><span className="hint">{sensors.length} sensors on this machine · live · tap a tile to copy its ID</span></div>
|
||||
<div className="dash-bar">
|
||||
<span className="hint">{sensors.length} sensors on this machine · live · tap a tile to copy its ID</span>
|
||||
<span className="spacer" />
|
||||
{demoUrl && <a className="btn" href={demoUrl} target="_blank" rel="noreferrer" title="a page outside Ham Lab, built on the same sensor API">External demo ↗</a>}
|
||||
</div>
|
||||
|
||||
<h2 className="section">Widget types</h2>
|
||||
<div className="kpis">
|
||||
|
||||
Reference in New Issue
Block a user