mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 00:42:49 +08:00
Open the About dialog from a #about link
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
1 parent
632e77ccc8
commit
bf6008f857
1 file changed
+10
-2
+10
-2
@@ -7079,7 +7079,8 @@ function AppInner() {
|
||||
// Terms of use, own-hosted instance only (see IS_OWN_HOSTED_INSTANCE): shown
|
||||
// mandatorily on first visit, reopenable any time from the menu afterwards.
|
||||
const [tosOpen, setTosOpen] = useState(false);
|
||||
const [aboutOpen, setAboutOpen] = useState(false);
|
||||
// client.webspeak3.de/#about opens the About dialog directly (shareable link).
|
||||
const [aboutOpen, setAboutOpen] = useState(() => window.location.hash === "#about");
|
||||
const [tosMandatory, setTosMandatory] = useState(false);
|
||||
useEffect(() => {
|
||||
if (IS_OWN_HOSTED_INSTANCE && !hasAcceptedToS()) {
|
||||
@@ -11303,7 +11304,14 @@ function AppInner() {
|
||||
|
||||
{restartNotice && <RestartNoticeDialog message={restartNotice} onAck={() => setRestartNotice(null)} />}
|
||||
|
||||
{aboutOpen && <AboutDialog onClose={() => setAboutOpen(false)} />}
|
||||
{aboutOpen && (
|
||||
<AboutDialog
|
||||
onClose={() => {
|
||||
setAboutOpen(false);
|
||||
if (window.location.hash === "#about") window.history.replaceState(null, "", window.location.pathname + window.location.search);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
{tosOpen && (
|
||||
<ToSDialog
|
||||
|
||||
Reference in new issue
Block a user