diff --git a/front/css/app.css b/front/css/app.css index 32c5534..96aba75 100644 --- a/front/css/app.css +++ b/front/css/app.css @@ -8,3 +8,9 @@ main { padding: 20px; } } + +button.danger { + background-color: #d93526; + border-color: #d93526; + color: white; +} diff --git a/front/js/common/DeleteButton.svelte b/front/js/common/DeleteButton.svelte new file mode 100644 index 0000000..43d7496 --- /dev/null +++ b/front/js/common/DeleteButton.svelte @@ -0,0 +1,36 @@ + + +{#if !isClicked} +
+ +
+{/if} +{#if isClicked} + Are you sure? +
+ +
+
+ +
+{/if} diff --git a/front/js/common/Sortable.svelte b/front/js/common/Sortable.svelte new file mode 100644 index 0000000..abbdf59 --- /dev/null +++ b/front/js/common/Sortable.svelte @@ -0,0 +1,150 @@ + + +{#if type === "table"} + + {#each items as item (getItem(item, itemKey))} + handleDragStart(e, item)} + ondragover={handleDragOver} + ondragleave={handleDragLeave} + ondrop={(e) => handleDrop(e, item)} + ondragend={handleDragEnd} + > + {@render itemView(item)} + + {/each} + +{:else} +
+ {#each items as item (getItem(item, itemKey))} +
handleDragStart(e, item)} + ondragover={handleDragOver} + ondragleave={handleDragLeave} + ondrop={(e) => handleDrop(e, item)} + ondragend={handleDragEnd} + > + {@render itemView(item)} +
+ {/each} +
+{/if} diff --git a/front/js/entry/FieldCreateEntry/FieldCreateEntry.svelte b/front/js/entry/FieldCreateEntry/FieldCreateEntry.svelte index 6042f2a..d259ce0 100644 --- a/front/js/entry/FieldCreateEntry/FieldCreateEntry.svelte +++ b/front/js/entry/FieldCreateEntry/FieldCreateEntry.svelte @@ -2,14 +2,13 @@ import ChannelLayout from "../../layouts/ChannelLayout.svelte"; import { post } from "../../modules/remote"; import { getApp } from "../../app"; - let { channel, user, data } = $props(); + let { channel, user, data, newRank } = $props(); let name = $state(""); let alias = $state(""); const app = getApp(); - function handleSchemaCreate(e) { + function handleCreate(e) { e.preventDefault(); - console.log(data); post( app.url("fields"), { @@ -33,7 +32,7 @@ {#snippet body()}

Create a {data.type} field

-
+