mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
feat: reset default if required selected, reset modal on close
This commit is contained in:
1 parent
d9be016544
commit
7c46e55445
11 files changed
+49
-2
No files matched your search
@@ -60,7 +60,14 @@
|
||||
</div>
|
||||
{:else}
|
||||
<Empty isButton single on:click={() => (showCreate = true)}>
|
||||
<p>Create your first Database to get started</p>
|
||||
<div class="u-text-center">
|
||||
<p class="text u-line-height-1-5">Create your first Database to get started</p>
|
||||
<p class="text u-line-height-1-5">Need a hand? Check out our documentation.</p>
|
||||
</div>
|
||||
<div class="u-flex u-gap-12">
|
||||
<Button external href="#/" text>Documentation</Button>
|
||||
<Button secondary>Create Database</Button>
|
||||
</div>
|
||||
</Empty>
|
||||
{/if}
|
||||
</Container>
|
||||
|
||||
@@ -73,7 +73,14 @@
|
||||
</div>
|
||||
{:else}
|
||||
<Empty isButton single on:click={() => (showCreate = true)}>
|
||||
<p>Create your first collection to get started</p>
|
||||
<div class="u-text-center">
|
||||
<p class="text u-line-height-1-5">Create your first collection to get started</p>
|
||||
<p class="text u-line-height-1-5">Need a hand? Check out our documentation.</p>
|
||||
</div>
|
||||
<div class="u-flex u-gap-12 ">
|
||||
<Button external href="#/" text>Documentation</Button>
|
||||
<Button secondary>Create Collection</Button>
|
||||
</div>
|
||||
</Empty>
|
||||
{/if}
|
||||
</Container>
|
||||
|
||||
+4
@@ -49,6 +49,10 @@
|
||||
xdefault = selectedAttribute.default;
|
||||
}
|
||||
|
||||
$: if (required) {
|
||||
xdefault = null;
|
||||
}
|
||||
|
||||
//TODO: refactor to use context module instead of submitted
|
||||
</script>
|
||||
|
||||
|
||||
+6
@@ -19,6 +19,12 @@
|
||||
$: if (selectedOption) {
|
||||
$option = options.find((option) => option.name === selectedOption);
|
||||
}
|
||||
|
||||
$: if (!showCreate) {
|
||||
key = null;
|
||||
selectedOption = null;
|
||||
submitted = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<Form on:submit={() => (submitted = true)}>
|
||||
|
||||
+4
@@ -51,6 +51,10 @@
|
||||
({ required, array } = selectedAttribute);
|
||||
xdefault = selectedAttribute.default;
|
||||
}
|
||||
|
||||
$: if (required) {
|
||||
xdefault = null;
|
||||
}
|
||||
</script>
|
||||
|
||||
<InputText
|
||||
|
||||
+3
@@ -58,6 +58,9 @@
|
||||
({ required, array, elements } = selectedAttribute);
|
||||
xdefault = selectedAttribute.default;
|
||||
}
|
||||
$: if (required) {
|
||||
xdefault = null;
|
||||
}
|
||||
</script>
|
||||
|
||||
<InputTags
|
||||
|
||||
+4
@@ -55,6 +55,10 @@
|
||||
({ required, array, min, max } = selectedAttribute);
|
||||
xdefault = selectedAttribute.default;
|
||||
}
|
||||
|
||||
$: if (required) {
|
||||
xdefault = null;
|
||||
}
|
||||
</script>
|
||||
|
||||
<InputNumber id="min" label="Min" bind:value={min} readonly={overview} />
|
||||
|
||||
+3
@@ -55,6 +55,9 @@
|
||||
({ required, array, min, max } = selectedAttribute);
|
||||
xdefault = selectedAttribute.default;
|
||||
}
|
||||
$: if (required) {
|
||||
xdefault = null;
|
||||
}
|
||||
</script>
|
||||
|
||||
<InputNumber id="min" label="Min" bind:value={min} readonly={overview} />
|
||||
|
||||
+3
@@ -51,6 +51,9 @@
|
||||
({ required, array } = selectedAttribute);
|
||||
xdefault = selectedAttribute.default;
|
||||
}
|
||||
$: if (required) {
|
||||
xdefault = null;
|
||||
}
|
||||
</script>
|
||||
|
||||
<InputText
|
||||
|
||||
+3
@@ -53,6 +53,9 @@
|
||||
({ required, array, size } = selectedAttribute);
|
||||
xdefault = selectedAttribute.default;
|
||||
}
|
||||
$: if (required) {
|
||||
xdefault = null;
|
||||
}
|
||||
</script>
|
||||
|
||||
<InputNumber id="size" label="Size" bind:value={size} required readonly={overview} />
|
||||
|
||||
+3
@@ -51,6 +51,9 @@
|
||||
({ required, array } = selectedAttribute);
|
||||
xdefault = selectedAttribute.default;
|
||||
}
|
||||
$: if (required) {
|
||||
xdefault = null;
|
||||
}
|
||||
</script>
|
||||
|
||||
<InputText
|
||||
|
||||
Reference in new issue
Block a user