diff --git a/frontend/src/components/admin/banner.tsx b/frontend/src/components/admin/banner.tsx index d611f0b..85e422b 100644 --- a/frontend/src/components/admin/banner.tsx +++ b/frontend/src/components/admin/banner.tsx @@ -23,6 +23,13 @@ export default function AdminBanner() { const [message, setMessage] = useState(null); const [shouldShow, setShouldShow] = useState(false); + const [showBreachNotice, setShowBreachNotice] = useState(() => { + if (Date.now() >= new Date("2026-05-20T00:00:00+01:00").getTime()) return false; + + const closed = localStorage.getItem("closedBreachNotice"); + return closed !== "true"; + }); + useEffect(() => { fetch(`${import.meta.env.VITE_API_URL}/api/admin/banner`) .then((res) => { @@ -48,6 +55,14 @@ export default function AdminBanner() { setShouldShow(false); }; + const handleCloseBreachNotice = (e: React.MouseEvent) => { + e.preventDefault(); + e.stopPropagation(); + + localStorage.setItem("closedBreachNotice", "true"); + setShowBreachNotice(false); + }; + return ( <> {shouldShow && message && ( @@ -64,19 +79,21 @@ export default function AdminBanner() { )} - -
- - A data breach has happened, click here for more info. -
+ {showBreachNotice && ( +
+
+ + A data breach has happened, click here for more info. +
- {/* */} -
+ + + )} ); } diff --git a/frontend/src/pages/breach-notice.tsx b/frontend/src/pages/breach-notice.tsx index 6295ae0..49559fd 100644 --- a/frontend/src/pages/breach-notice.tsx +++ b/frontend/src/pages/breach-notice.tsx @@ -29,10 +29,13 @@ export default function BreachNoticePage() { The only data that wouldn't normally be viewable is your email address (the same thing you would give to people to receive emails), everything else was publicly viewable (such as on the profile pages). The code that caused this to happen has already been fixed.

-

+

As far as I'm aware, no other information have been collected. The breach has been notified to the Information Commissioner's Office. Please take care when opening any suspicious emails. TomodachiShare does not send any emails. Please do not click on any suspicious links.

+

+ Your Discord/Google/GitHub accounts are completely unaffected by this. +

); }