Hide documentation link for unofficial themes (fix #2076), add OsmCha link

This commit is contained in:
Pieter Vander Vennet 2024-08-12 23:47:22 +02:00
parent 833b4142dc
commit fde4e24abe

View file

@ -16,6 +16,7 @@
import Bug from "../../assets/svg/Bug.svelte"
import ThemeViewState from "../../Models/ThemeViewState"
import DocumentChartBar from "@babeard/svelte-heroicons/outline/DocumentChartBar"
import DocumentMagnifyingGlass from "@babeard/svelte-heroicons/outline/DocumentMagnifyingGlass"
export let state: ThemeViewState
@ -48,12 +49,13 @@
<Tr t={Translations.t.general.attribution.openIssueTracker} />
</a>
{#if layout.official}
<a
class="flex"
href={"https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Themes/" + layout.id + ".md"}
target="_blank"
>
<DocumentChartBar class="h-6 w-6" />
<DocumentMagnifyingGlass class="h-6 w-6" />
<Tr
t={Translations.t.general.attribution.openThemeDocumentation.Subs({
name: layout.title,
@ -61,6 +63,12 @@
/>
</a>
<a class="flex" href={Utils.OsmChaLinkFor(31, layout.id)}>
<DocumentChartBar class="h-6 w-6" />
<Tr t={Translations.t.general.attribution.openOsmcha.Subs({theme: layout.title})}/>
</a>
{/if}
<a class="flex" href="https://en.osm.town/@MapComplete" target="_blank">
<Mastodon class="h-6 w-6" />
<Tr t={Translations.t.general.attribution.followOnMastodon} />