forked from MapComplete/MapComplete
Merge master
This commit is contained in:
commit
214ba40dfa
66 changed files with 2226 additions and 1578 deletions
|
|
@ -66,7 +66,6 @@
|
|||
|
||||
<div class="flex">
|
||||
<div class="m-4 flex w-full flex-col">
|
||||
|
||||
<NextButton clss="primary" on:click={() => state.highlightedItem.setData({ path, schema })}>
|
||||
{#if schema.hints.question}
|
||||
{schema.hints.question}
|
||||
|
|
|
|||
|
|
@ -104,7 +104,9 @@
|
|||
return `${singular} ${i}`
|
||||
}
|
||||
|
||||
let genIconF: (x: any) => ({ icon: string, color: string }) = <any>Function("value", "return " + schema.hints.icon)
|
||||
let genIconF: (x: any) => { icon: string; color: string } = <any>(
|
||||
Function("value", "return " + schema.hints.icon)
|
||||
)
|
||||
console.log("Icon lambda is", schema.hints.icon, path, genIconF("test"))
|
||||
|
||||
function genIcon(value: any): string {
|
||||
|
|
@ -117,7 +119,6 @@
|
|||
}
|
||||
return genIconF(value)?.color
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div class="pl-2">
|
||||
|
|
@ -160,13 +161,14 @@
|
|||
{#if schema.hints.icon}
|
||||
<Icon clss="w-6 h-6" icon={genIcon(value)} color={genColor(value)} />
|
||||
{/if}
|
||||
{singular} {i}
|
||||
{singular}
|
||||
{i}
|
||||
|
||||
{#if schema.hints.title}
|
||||
<div class="subtle ml-2">
|
||||
<Tr t={Translations.T(genTitle(value, singular, i))}/>
|
||||
<Tr t={Translations.T(genTitle(value, singular, i))} />
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</h3>
|
||||
<button
|
||||
class="h-fit w-fit rounded-full border border-black p-1"
|
||||
|
|
@ -177,9 +179,9 @@
|
|||
<TrashIcon class="h-4 w-4" />
|
||||
</button>
|
||||
</div>
|
||||
{:else if typeof value === "string"}
|
||||
{:else if typeof value === "string"}
|
||||
Builtin: <b>{value}</b>
|
||||
{:else}
|
||||
{:else}
|
||||
<Tr cls="font-bold" t={Translations.T(value?.question ?? value?.render)}/>
|
||||
{/if}
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -128,8 +128,11 @@
|
|||
on:submit
|
||||
/>
|
||||
</div>
|
||||
<a target="_blank" href="https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md">
|
||||
<QuestionMarkCircle class="w-6 h-6"/>
|
||||
<a
|
||||
target="_blank"
|
||||
href="https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md"
|
||||
>
|
||||
<QuestionMarkCircle class="h-6 w-6" />
|
||||
</a>
|
||||
|
||||
{#if $feedbackKey}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export interface ConfigMeta {
|
|||
typesdefault?: string
|
||||
suggestions?: []
|
||||
title?: string
|
||||
multianswer?: "true" | string,
|
||||
multianswer?: "true" | string
|
||||
icon?: string
|
||||
}
|
||||
required: boolean
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue