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