diff --git a/src/UI/Popup/AllTagsPanel.svelte b/src/UI/Popup/AllTagsPanel.svelte index 86238924f1..614e88bcf0 100644 --- a/src/UI/Popup/AllTagsPanel.svelte +++ b/src/UI/Popup/AllTagsPanel.svelte @@ -2,6 +2,7 @@ import { Store, UIEventSource } from "../../Logic/UIEventSource" import SimpleMetaTaggers from "../../Logic/SimpleMetaTagger" import LayerConfig from "../../Models/ThemeConfig/LayerConfig" + import { Utils } from "../../Utils" export let tags: UIEventSource> export let tagKeys = tags.map((tgs) => (tgs === undefined ? [] : Object.keys(tgs))) @@ -31,9 +32,18 @@ const metaKeys: string[] = [].concat(...SimpleMetaTaggers.metatags.map((k) => k.keys)) let allCalculatedTags = new Set([...calculatedTags, ...metaKeys]) + + function downloadAsJson(){ + Utils.offerContentsAsDownloadableFile( + JSON.stringify(tags.data, null, " "), "tags-"+(tags.data.id ?? layer?.id ?? "")+".json" + ) + }
+
Key