Don't show irrelevant title icons

This commit is contained in:
Pieter Vander Vennet 2023-05-05 16:12:28 +02:00
parent e0527e9647
commit 55e12c32e5
3 changed files with 5 additions and 4 deletions

View file

@ -251,6 +251,7 @@ export default class UserRelatedState {
_theme: layout?.id,
_backend: this.osmConnection.Backend(),
_applicationOpened: new Date().toISOString(),
_supports_sharing: window.navigator.share ? "yes" : "no"
})
const osmConnection = this.osmConnection

View file

@ -20,7 +20,6 @@
onDestroy(tags.addCallbackAndRun(tags => {
_tags = tags;
}));
console.log(layer.titleIcons.map(tr => tr.id));
let _metatags: Record<string, string>;
onDestroy(state.userRelatedState.preferencesAsTags.addCallbackAndRun(tags => {
@ -41,7 +40,7 @@
<div class="flex flex-row flex-wrap pt-0.5 sm:pt-1 items-center mr-2">
{#each layer.titleIcons as titleIconConfig}
{#if titleIconConfig.IsKnown(_tags)}
{#if ( titleIconConfig.condition?.matchesProperties(_tags) ?? true) && (titleIconConfig.metacondition?.matchesProperties(_tags) ?? true) && titleIconConfig.IsKnown(_tags)}
<div class="w-8 h-8">
<TagRenderingAnswer config={titleIconConfig} {tags} {selectedElement} {state}
{layer}></TagRenderingAnswer>

View file

@ -100,7 +100,8 @@
"labels": [
"defaults"
],
"render": "{share_link()}"
"render": "{share_link()}",
"metacondition": "_supports_sharing=yes"
},
{
"id": "osmlink",
@ -123,4 +124,4 @@
}
],
"mapRendering": null
}
}