Fix: always link to the wiki when tags are shown

This commit is contained in:
Pieter Vander Vennet 2023-05-29 02:17:54 +02:00
parent d7021344e8
commit 8dfef62432

View file

@ -1,10 +1,8 @@
<script lang="ts">
import {TagsFilter} from "../../Logic/Tags/TagsFilter";
import FromHtml from "../Base/FromHtml.svelte";
import Constants from "../../Models/Constants.js";
import {Translation} from "../i18n/Translation";
import Tr from "../Base/Tr.svelte";
import {onDestroy} from "svelte";
import type {SpecialVisualizationState} from "../SpecialVisualization";
/**
@ -18,12 +16,8 @@
*/
export let embedIn: (() => Translation) | undefined = undefined;
const userDetails = state.osmConnection.userDetails;
let linkToWiki = false;
onDestroy(state.osmConnection.userDetails.addCallbackAndRunD(userdetails => {
linkToWiki = userdetails.csCount > Constants.userJourney.tagsVisibleAndWikiLinked;
}));
let tagsExplanation = "";
$: tagsExplanation = tags?.asHumanString(linkToWiki, false, {});
$: tagsExplanation = tags?.asHumanString(true, false, {});
</script>
{#if $userDetails.loggedIn}