From e03e1ed98138eaf948aae2dbc9e243ddcb24a8b6 Mon Sep 17 00:00:00 2001 From: Gaofeng Date: Fri, 28 Nov 2025 21:01:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=A9=E8=BF=9B=E9=97=AE=E9=A2=98=EF=BC=9Asr?= =?UTF-8?q?c/lib/components/chat/Navbar.svelte?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/components/chat/Navbar.svelte | 94 +++++++++++++-------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/src/lib/components/chat/Navbar.svelte b/src/lib/components/chat/Navbar.svelte index 12c33a416c..49bf0bf4c1 100644 --- a/src/lib/components/chat/Navbar.svelte +++ b/src/lib/components/chat/Navbar.svelte @@ -113,39 +113,39 @@ {#if $user?.role === 'user' ? ($user?.permissions?.chat?.temporary ?? true) && !($user?.permissions?.chat?.temporary_enforced ?? false) : true} {#if !chat?.id} - {#if false} - - - - {/if} + // add 'temporary-chat=true' to the URL + if ($temporaryChatEnabled) { + window.history.replaceState(null, '', '?temporary-chat=true'); + } else { + window.history.replaceState(null, '', location.pathname); + } + }} + > +
+ {#if $temporaryChatEnabled} + + {:else} + + {/if} +
+ + + {/if} {:else if $temporaryChatEnabled} - + {#if false} + {#if $user?.role === 'admin' || ($user?.permissions.chat?.controls ?? true)} + + + + {/if} {/if} - {/if}