Cleanup and light changes
This commit is contained in:
parent
3a4b69717d
commit
918c5b6fd7
8 changed files with 190 additions and 113 deletions
|
|
@ -46,16 +46,16 @@
|
|||
<div class="media-db-plugin-property-mapping-to">
|
||||
<input type="text" spellcheck="false" bind:value="{property.newProperty}">
|
||||
</div>
|
||||
{ /if }
|
||||
{ /if }
|
||||
{ /if }
|
||||
{ /if }
|
||||
</div>
|
||||
{ /each }
|
||||
{ /each }
|
||||
</div>
|
||||
{ #if !validationResult?.res }
|
||||
<div class="media-db-plugin-property-mapping-validation">
|
||||
{validationResult?.err?.message}
|
||||
</div>
|
||||
{ /if }
|
||||
{ /if }
|
||||
<button
|
||||
class="media-db-plugin-property-mappings-save-button {validationResult?.res ? 'mod-cta' : 'mod-muted'}"
|
||||
on:click={() => { if(model.validate().res) save(model) }}>Save
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@
|
|||
import PropertyMappingModelComponent from './PropertyMappingModelComponent.svelte';
|
||||
|
||||
export let models: PropertyMappingModel[] = [];
|
||||
|
||||
export let save: (model: PropertyMappingModel) => void;
|
||||
|
||||
// TODO: validate all the mappings before saving.
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
|
@ -16,7 +13,7 @@
|
|||
<div class="setting-item" style="display: flex; gap: 10px; flex-direction: column; align-items: stretch;">
|
||||
{ #each models as model }
|
||||
<PropertyMappingModelComponent model={model} save={save}></PropertyMappingModelComponent>
|
||||
{ /each }
|
||||
{ /each }
|
||||
|
||||
<!--
|
||||
<pre>{JSON.stringify(models, null, 4)}</pre>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue