From 065f03691f6b6650f7bfcb54aaa89d5c218a36c8 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 27 Aug 2024 19:37:21 +0200 Subject: [PATCH] UX: Disable comparison tool if not logged in --- src/UI/Comparison/ComparisonTool.svelte | 54 +++++++++++++------------ 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/src/UI/Comparison/ComparisonTool.svelte b/src/UI/Comparison/ComparisonTool.svelte index 0a9a33d4c..4d3edc91c 100644 --- a/src/UI/Comparison/ComparisonTool.svelte +++ b/src/UI/Comparison/ComparisonTool.svelte @@ -15,6 +15,7 @@ import AccordionSingle from "../Flowbite/AccordionSingle.svelte" import GlobeAlt from "@babeard/svelte-heroicons/mini/GlobeAlt" import { ComparisonState } from "./ComparisonState" + import LoginToggle from "../Base/LoginToggle.svelte" export let externalData: Store< | { success: { content: Record } } @@ -45,35 +46,38 @@ let enableLogin = state.featureSwitches.featureSwitchEnableLogin -{#if !$sourceUrl || !$enableLogin} - -{:else if $externalData === undefined} - -{:else if $externalData["error"] !== undefined} -
- -
-{:else if $propertyKeysExternal.length === 0 && $knownImages.size + $unknownImages.length === 0} - -{:else if !$hasDifferencesAtStart} + + + {#if !$sourceUrl || !$enableLogin} + + {:else if $externalData === undefined} + + {:else if $externalData["error"] !== undefined} +
+ +
+ {:else if $propertyKeysExternal.length === 0 && $knownImages.size + $unknownImages.length === 0} + + {:else if !$hasDifferencesAtStart} -{:else if $comparisonState !== undefined} - + {:else if $comparisonState !== undefined} + - - -{/if} + + + {/if} +