diff --git a/Logic/State/UserRelatedState.ts b/Logic/State/UserRelatedState.ts index 4f0c4e391..8c9865cff 100644 --- a/Logic/State/UserRelatedState.ts +++ b/Logic/State/UserRelatedState.ts @@ -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 diff --git a/UI/BigComponents/SelectedElementView.svelte b/UI/BigComponents/SelectedElementView.svelte index e5607975d..9bf83d432 100644 --- a/UI/BigComponents/SelectedElementView.svelte +++ b/UI/BigComponents/SelectedElementView.svelte @@ -20,7 +20,6 @@ onDestroy(tags.addCallbackAndRun(tags => { _tags = tags; })); - console.log(layer.titleIcons.map(tr => tr.id)); let _metatags: Record; onDestroy(state.userRelatedState.preferencesAsTags.addCallbackAndRun(tags => { @@ -41,7 +40,7 @@
{#each layer.titleIcons as titleIconConfig} - {#if titleIconConfig.IsKnown(_tags)} + {#if ( titleIconConfig.condition?.matchesProperties(_tags) ?? true) && (titleIconConfig.metacondition?.matchesProperties(_tags) ?? true) && titleIconConfig.IsKnown(_tags)}
diff --git a/assets/layers/icons/icons.json b/assets/layers/icons/icons.json index 7b420218b..afcbb62f1 100644 --- a/assets/layers/icons/icons.json +++ b/assets/layers/icons/icons.json @@ -100,7 +100,8 @@ "labels": [ "defaults" ], - "render": "{share_link()}" + "render": "{share_link()}", + "metacondition": "_supports_sharing=yes" }, { "id": "osmlink", @@ -123,4 +124,4 @@ } ], "mapRendering": null -} \ No newline at end of file +}