edges wip

This commit is contained in:
2026-01-10 02:09:50 +02:00
parent 87ab1f57fd
commit ced6146266
19 changed files with 380 additions and 271 deletions
@@ -1,6 +1,7 @@
<script>
import SchemaLayout from "../../layouts/SchemaLayout.svelte";
import TextFieldProps from "./TextFieldProps.svelte";
import RelationFieldProps from "./RelationFieldProps.svelte";
import DeleteButton from "../../common/DeleteButton.svelte";
import { post } from "../../modules/remote";
import { getApp } from "../../app";
@@ -124,6 +125,9 @@
{#if data.field.type === "text"}
<TextFieldProps field={data.field}></TextFieldProps>
{:else if data.field.type === "relation"}
<RelationFieldProps field={data.field} schemas={data.schemas}
></RelationFieldProps>
{/if}
<button type="submit">Update</button>
@@ -0,0 +1,29 @@
<script>
let { field, schemas } = $props();
</script>
<fieldset>
<label>
Schemas
<select
bind:value={field.props.schemas}
aria-label="Select allowed schemas"
multiple
size="6"
>
<option disabled>Select allowed schemas </option>
{#each schemas as schema}
<option value={schema.id}>{schema.name}</option>
{/each}
</select>
</label>
<label>
Min characters
<input type="number" bind:value={field.props.min} />
</label>
<label>
Max characters
<input type="number" bind:value={field.props.max} />
</label>
</fieldset>