From c5e3a78e137eac24334bf26ce835cc3ea392861f Mon Sep 17 00:00:00 2001 From: kevmodrome Date: Tue, 14 Apr 2020 11:09:44 +0200 Subject: [PATCH] moved unused component and updated records to model --- .../src/components/database/IndexView.svelte | 151 ----------------- .../modals/CreateEditView.svelte | 152 +++++++++++++++++- 2 files changed, 148 insertions(+), 155 deletions(-) delete mode 100644 packages/builder/src/components/database/IndexView.svelte diff --git a/packages/builder/src/components/database/IndexView.svelte b/packages/builder/src/components/database/IndexView.svelte deleted file mode 100644 index 0b8884b989..0000000000 --- a/packages/builder/src/components/database/IndexView.svelte +++ /dev/null @@ -1,151 +0,0 @@ - - - - -

Create / Edit View

-
-
-

Settings

- {#if $store.errors && $store.errors.length > 0} - - {/if} -
-
- -
-
- -
-
- -
-
- Which models would you like to add to this view? -
- {#each indexableRecords as rec} - toggleAllowedRecord(rec)} /> - {rec.node.name} - {/each} -
- -

Snippets

- {#each Object.values(SNIPPET_EDITORS) as snippetType} - (currentSnippetEditor = snippetType)}> - {snippetType} - - {/each} - {#if currentSnippetEditor === SNIPPET_EDITORS.MAP} - - {:else if currentSnippetEditor === SNIPPET_EDITORS.FILTER} - - {:else if currentSnippetEditor === SNIPPET_EDITORS.SHARD} - - {/if} - - - Save - - - {#if !$store.currentNodeIsNew} - Delete - {/if} - - - - diff --git a/packages/builder/src/components/database/ModelDataTable/modals/CreateEditView.svelte b/packages/builder/src/components/database/ModelDataTable/modals/CreateEditView.svelte index 1c025d039b..7d88dfd864 100644 --- a/packages/builder/src/components/database/ModelDataTable/modals/CreateEditView.svelte +++ b/packages/builder/src/components/database/ModelDataTable/modals/CreateEditView.svelte @@ -1,7 +1,151 @@ -
- -
+ + +

Create / Edit View

+
+
+

Settings

+ {#if $store.errors && $store.errors.length > 0} + + {/if} +
+
+ +
+
+ +
+
+ +
+
+ Which models would you like to add to this view? +
+ {#each indexableModels as model} + toggleAllowedModel(model)} /> + {model.node.name} + {/each} +
+ +

Snippets

+ {#each Object.values(SNIPPET_EDITORS) as snippetType} + (currentSnippetEditor = snippetType)}> + {snippetType} + + {/each} + {#if currentSnippetEditor === SNIPPET_EDITORS.MAP} + + {:else if currentSnippetEditor === SNIPPET_EDITORS.FILTER} + + {:else if currentSnippetEditor === SNIPPET_EDITORS.SHARD} + + {/if} + + + Save + + + {#if !$store.currentNodeIsNew} + Delete + {/if} + + + +