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 (($settings?.temporaryChatByDefault ?? false) && $temporaryChatEnabled) { - // for proper initNewChat handling - await temporaryChatEnabled.set(null); - } else { - await temporaryChatEnabled.set(!$temporaryChatEnabled); - } + {#if false} + + { + if (($settings?.temporaryChatByDefault ?? false) && $temporaryChatEnabled) { + // for proper initNewChat handling + await temporaryChatEnabled.set(null); + } else { + await temporaryChatEnabled.set(!$temporaryChatEnabled); + } - await goto('/'); + await goto('/'); - // 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} + // 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)} - - { - await showControls.set(!$showControls); - }} - aria-label="Controls" - > - - - - - + {#if false} + {#if $user?.role === 'admin' || ($user?.permissions.chat?.controls ?? true)} + + { + await showControls.set(!$showControls); + }} + aria-label="Controls" + > + + + + + + {/if} {/if} - {/if}