UX: Disable comparison tool if not logged in

This commit is contained in:
Pieter Vander Vennet 2024-08-27 19:37:21 +02:00
parent 5c56651b5e
commit 065f03691f

View file

@ -15,6 +15,7 @@
import AccordionSingle from "../Flowbite/AccordionSingle.svelte" import AccordionSingle from "../Flowbite/AccordionSingle.svelte"
import GlobeAlt from "@babeard/svelte-heroicons/mini/GlobeAlt" import GlobeAlt from "@babeard/svelte-heroicons/mini/GlobeAlt"
import { ComparisonState } from "./ComparisonState" import { ComparisonState } from "./ComparisonState"
import LoginToggle from "../Base/LoginToggle.svelte"
export let externalData: Store< export let externalData: Store<
| { success: { content: Record<string, string> } } | { success: { content: Record<string, string> } }
@ -45,6 +46,8 @@
let enableLogin = state.featureSwitches.featureSwitchEnableLogin let enableLogin = state.featureSwitches.featureSwitchEnableLogin
</script> </script>
<LoginToggle {state} silentFail>
{#if !$sourceUrl || !$enableLogin} {#if !$sourceUrl || !$enableLogin}
<!-- empty block --> <!-- empty block -->
{:else if $externalData === undefined} {:else if $externalData === undefined}
@ -77,3 +80,4 @@
/> />
</AccordionSingle> </AccordionSingle>
{/if} {/if}
</LoginToggle>