forked from MapComplete/MapComplete
Merge develop
This commit is contained in:
commit
fec3608ca4
57 changed files with 1160 additions and 594 deletions
|
|
@ -4,6 +4,7 @@
|
|||
import LayerConfig from "../../Models/ThemeConfig/LayerConfig"
|
||||
import Searchbar from "../Base/Searchbar.svelte"
|
||||
import Translations from "../i18n/Translations"
|
||||
import { Utils } from "../../Utils"
|
||||
|
||||
export let tags: UIEventSource<Record<string, any>>
|
||||
export let tagKeys = tags.map((tgs) => (tgs === undefined ? [] : Object.keys(tgs)))
|
||||
|
|
@ -34,10 +35,19 @@
|
|||
const metaKeys: string[] = [].concat(...SimpleMetaTaggers.metatags.map((k) => k.keys))
|
||||
let allCalculatedTags = new Set<string>([...calculatedTags, ...metaKeys])
|
||||
let search = new UIEventSource<string>("")
|
||||
|
||||
function downloadAsJson(){
|
||||
Utils.offerContentsAsDownloadableFile(
|
||||
JSON.stringify(tags.data, null, " "), "tags-"+(tags.data.id ?? layer?.id ?? "")+".json"
|
||||
)
|
||||
}
|
||||
</script>
|
||||
|
||||
<section>
|
||||
<Searchbar value={search} placeholder={Translations.T("Search a key")}></Searchbar>
|
||||
<button class="as-link" on:click={() => downloadAsJson()}>
|
||||
Download as JSON
|
||||
</button>
|
||||
<table class="zebra-table break-all">
|
||||
<tr>
|
||||
<th>Key</th>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue