improvement(demo): permanent banner instead of a re-popping toast

The shared-account warning was a requiresInteraction toast that re-fired
on every reload. Replace it with a permanent, non-dismissible banner (like
the version banner) shown above the content while in the demo account.
This commit is contained in:
npeter83 2026-06-16 10:12:10 +02:00
parent e81a494436
commit 848fdd386f
2 changed files with 21 additions and 7 deletions

View file

@ -0,0 +1,17 @@
import { useTranslation } from "react-i18next";
import { AlertTriangle } from "lucide-react";
// Permanent, non-dismissible bar shown to the shared demo account so it's always clear the
// state is communal. (Replaces the old login-time toast, which re-popped on every reload.)
export default function DemoBanner() {
const { t } = useTranslation();
return (
<div className="shrink-0 flex items-center gap-2 px-4 py-2 text-sm bg-amber-500/15 border-b border-amber-500/30 text-fg">
<AlertTriangle className="w-4 h-4 text-amber-500 shrink-0" />
<span className="min-w-0">
<span className="font-semibold">{t("common.demoTitle")}</span>
<span className="text-muted"> {t("common.demoSharedNotice")}</span>
</span>
</div>
);
}