forked from MapComplete/MapComplete
Fix: always link to the wiki when tags are shown
This commit is contained in:
parent
d7021344e8
commit
8dfef62432
1 changed files with 1 additions and 7 deletions
|
|
@ -1,10 +1,8 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {TagsFilter} from "../../Logic/Tags/TagsFilter";
|
import {TagsFilter} from "../../Logic/Tags/TagsFilter";
|
||||||
import FromHtml from "../Base/FromHtml.svelte";
|
import FromHtml from "../Base/FromHtml.svelte";
|
||||||
import Constants from "../../Models/Constants.js";
|
|
||||||
import {Translation} from "../i18n/Translation";
|
import {Translation} from "../i18n/Translation";
|
||||||
import Tr from "../Base/Tr.svelte";
|
import Tr from "../Base/Tr.svelte";
|
||||||
import {onDestroy} from "svelte";
|
|
||||||
import type {SpecialVisualizationState} from "../SpecialVisualization";
|
import type {SpecialVisualizationState} from "../SpecialVisualization";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -18,12 +16,8 @@
|
||||||
*/
|
*/
|
||||||
export let embedIn: (() => Translation) | undefined = undefined;
|
export let embedIn: (() => Translation) | undefined = undefined;
|
||||||
const userDetails = state.osmConnection.userDetails;
|
const userDetails = state.osmConnection.userDetails;
|
||||||
let linkToWiki = false;
|
|
||||||
onDestroy(state.osmConnection.userDetails.addCallbackAndRunD(userdetails => {
|
|
||||||
linkToWiki = userdetails.csCount > Constants.userJourney.tagsVisibleAndWikiLinked;
|
|
||||||
}));
|
|
||||||
let tagsExplanation = "";
|
let tagsExplanation = "";
|
||||||
$: tagsExplanation = tags?.asHumanString(linkToWiki, false, {});
|
$: tagsExplanation = tags?.asHumanString(true, false, {});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if $userDetails.loggedIn}
|
{#if $userDetails.loggedIn}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue