mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
wiki link button
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -78,8 +78,8 @@
|
|||||||
<script defer src="https://analytics.otter.land/script.js" data-website-id="82dd56a5-db44-4279-bd1e-a4d9fee39af7" data-domains="rover.otter.land"></script>
|
<script defer src="https://analytics.otter.land/script.js" data-website-id="82dd56a5-db44-4279-bd1e-a4d9fee39af7" data-domains="rover.otter.land"></script>
|
||||||
<script defer src="https://analytics.otter.land/recorder.js" data-website-id="82dd56a5-db44-4279-bd1e-a4d9fee39af7" data-domains="rover.otter.land" data-sample-rate="0.15" data-mask-level="moderate" data-max-duration="300000"></script>
|
<script defer src="https://analytics.otter.land/recorder.js" data-website-id="82dd56a5-db44-4279-bd1e-a4d9fee39af7" data-domains="rover.otter.land" data-sample-rate="0.15" data-mask-level="moderate" data-max-duration="300000"></script>
|
||||||
<title>Roomba Rover</title>
|
<title>Roomba Rover</title>
|
||||||
<script type="module" crossorigin src="/assets/index-C_lCnw5U.js"></script>
|
<script type="module" crossorigin src="/assets/index-aNbtNjD0.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-D-tAn_fb.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-Cxghvfjc.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -178,46 +178,38 @@ function getSafeWikiUrl(rawUrl) {
|
|||||||
function BarcodeScanToast({ payload }) {
|
function BarcodeScanToast({ payload }) {
|
||||||
const wikiUrl = getSafeWikiUrl(payload?.wikiUrl);
|
const wikiUrl = getSafeWikiUrl(payload?.wikiUrl);
|
||||||
const label = payload?.label || payload?.code || 'unknown barcode';
|
const label = payload?.label || payload?.code || 'unknown barcode';
|
||||||
const descriptor = [payload?.type, payload?.code].filter(Boolean).join(' · ');
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="pointer-events-auto w-[min(34rem,92vw)] rounded-md bg-neutral-950/95 px-2 py-1.5 text-slate-100 shadow-lg shadow-black/40">
|
<div className="pointer-events-auto max-w-[80vw] rounded-md bg-neutral-800 px-1.5 py-0.5 text-[0.78rem] leading-tight text-slate-100">
|
||||||
<style>
|
<style>
|
||||||
{`
|
{`
|
||||||
@keyframes barcode-wiki-hard-flash {
|
@keyframes barcode-wiki-flat-flash {
|
||||||
0%, 100% {
|
0%, 100% {
|
||||||
background: #ffffff;
|
background: rgb(14 165 233);
|
||||||
color: #020617;
|
color: white;
|
||||||
box-shadow: 0 0 0 2px rgba(255,255,255,0.95), 0 0 28px rgba(255,255,255,0.75);
|
|
||||||
}
|
}
|
||||||
50% {
|
50% {
|
||||||
background: #facc15;
|
background: rgb(226 232 240);
|
||||||
color: #020617;
|
color: rgb(15 23 42);
|
||||||
box-shadow: 0 0 0 2px rgba(250,204,21,0.95), 0 0 32px rgba(250,204,21,0.9);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
</style>
|
</style>
|
||||||
<div className="flex flex-col gap-1">
|
<p className="flex flex-wrap items-center gap-0.5 text-slate-100">
|
||||||
<div>
|
<span className="font-semibold text-slate-300">Barcode scanned:</span>
|
||||||
<p className="text-[0.72rem] font-semibold leading-tight text-slate-400">Barcode scan</p>
|
<span className="font-semibold text-white">{label}</span>
|
||||||
<p className="break-words text-lg font-bold leading-tight text-white">{label}</p>
|
|
||||||
{descriptor ? (
|
|
||||||
<p className="mt-0.25 text-xs leading-tight text-slate-400">{descriptor}</p>
|
|
||||||
) : null}
|
|
||||||
</div>
|
|
||||||
{wikiUrl ? (
|
{wikiUrl ? (
|
||||||
<a
|
<a
|
||||||
href={wikiUrl}
|
href={wikiUrl}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
className="block rounded px-1.5 py-1 text-center text-base font-black leading-tight tracking-normal"
|
className="rounded-md px-0.75 py-0.25 text-[0.72rem] font-semibold leading-tight tracking-normal"
|
||||||
style={{ animation: 'barcode-wiki-hard-flash 0.22s steps(1, end) infinite' }}
|
style={{ animation: 'barcode-wiki-flat-flash 0.35s steps(1, end) infinite' }}
|
||||||
>
|
>
|
||||||
Open wiki
|
Wiki
|
||||||
</a>
|
</a>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user