forked from MapComplete/MapComplete
Studio: get basic translations working kindoff
This commit is contained in:
parent
2923020575
commit
b58ba665b5
36 changed files with 13542 additions and 15486 deletions
16
UI/Studio/SchemaBasedTranslationInput.svelte
Normal file
16
UI/Studio/SchemaBasedTranslationInput.svelte
Normal file
|
@ -0,0 +1,16 @@
|
|||
<script lang="ts">
|
||||
import EditLayerState from "./EditLayerState";
|
||||
import type { ConfigMeta } from "./configMeta";
|
||||
import { UIEventSource } from "../../Logic/UIEventSource";
|
||||
import TranslationInput from "../InputElement/Helpers/TranslationInput.svelte";
|
||||
|
||||
export let state: EditLayerState;
|
||||
export let path: (string | number)[] = [];
|
||||
export let schema: ConfigMeta;
|
||||
|
||||
let value = new UIEventSource<string>("{}");
|
||||
console.log("Registering translation to path", path)
|
||||
state.register(path, value.mapD(v => JSON.parse(value.data )));
|
||||
</script>
|
||||
|
||||
<TranslationInput {value} />
|
Loading…
Add table
Add a link
Reference in a new issue