Fix: don't check if someone is logged in for a taghint

This commit is contained in:
Pieter Vander Vennet 2025-01-25 18:37:09 +01:00
parent 6c0d54d769
commit 2f7e35a16e

View file

@ -11,19 +11,15 @@
* Depending on the options, it'll link through to the wiki or might be completely hidden * Depending on the options, it'll link through to the wiki or might be completely hidden
*/ */
export let tags: TagsFilter export let tags: TagsFilter
export let state: SpecialVisualizationState
export let currentProperties: Record<string, string | any> = {} export let currentProperties: Record<string, string | any> = {}
/** /**
* If given, this function will be called to embed the given tags hint into this translation * If given, this function will be called to embed the given tags hint into this translation
*/ */
export let embedIn: ((string: string) => Translation) | undefined = undefined export let embedIn: ((string: string) => Translation) | undefined = undefined
const userDetails = state?.osmConnection?.userDetails
let tagsExplanation = "" let tagsExplanation = ""
$: tagsExplanation = tags?.asHumanString(true, false, currentProperties) $: tagsExplanation = tags?.asHumanString(true, false, currentProperties)
</script> </script>
{#if !userDetails}
<div class="break-words" style="word-break: break-word"> <div class="break-words" style="word-break: break-word">
{#if tags === undefined} {#if tags === undefined}
<slot name="no-tags"><Tr cls="subtle" t={Translations.t.general.noTagsSelected} /></slot> <slot name="no-tags"><Tr cls="subtle" t={Translations.t.general.noTagsSelected} /></slot>
@ -33,4 +29,3 @@
<Tr t={embedIn(tagsExplanation)} /> <Tr t={embedIn(tagsExplanation)} />
{/if} {/if}
</div> </div>
{/if}