From b5caa5729951324b46215743552549822447bc01 Mon Sep 17 00:00:00 2001 From: kevmodrome Date: Fri, 3 Apr 2020 11:21:11 +0200 Subject: [PATCH] use params to select DB rather than store --- .../src/components/nav/DatabasesList.svelte | 5 +- .../database/[selectedDatabase]/index.svelte | 43 ++++++++ .../backend/database/_layout.svelte | 76 ++++++++++++++ .../backend/database/index.svelte | 98 +------------------ 4 files changed, 124 insertions(+), 98 deletions(-) create mode 100644 packages/builder/src/pages/[application]/backend/database/[selectedDatabase]/index.svelte create mode 100644 packages/builder/src/pages/[application]/backend/database/_layout.svelte diff --git a/packages/builder/src/components/nav/DatabasesList.svelte b/packages/builder/src/components/nav/DatabasesList.svelte index a9b8800dad..6eab1914a3 100644 --- a/packages/builder/src/components/nav/DatabasesList.svelte +++ b/packages/builder/src/components/nav/DatabasesList.svelte @@ -1,5 +1,6 @@ + +
+
{breadcrumbs}
+ {#if $backendUiStore.selectedDatabase.id} + { + selectedRecord = null + backendUiStore.actions.modals.show('RECORD') + }}> + Create new record + + {/if} +
+{#if $backendUiStore.selectedDatabase.id} + +{:else}Please select a database{/if} + + diff --git a/packages/builder/src/pages/[application]/backend/database/_layout.svelte b/packages/builder/src/pages/[application]/backend/database/_layout.svelte new file mode 100644 index 0000000000..2c800c18c3 --- /dev/null +++ b/packages/builder/src/pages/[application]/backend/database/_layout.svelte @@ -0,0 +1,76 @@ + + + + {#if recordOpen} + + {/if} + {#if modelOpen} + + {/if} + {#if viewOpen} + + {/if} + {#if databaseOpen} + + {/if} + {#if deleteRecordOpen} + + {/if} + {#if userOpen} + + {/if} + + +
+
+ +
+
+ + diff --git a/packages/builder/src/pages/[application]/backend/database/index.svelte b/packages/builder/src/pages/[application]/backend/database/index.svelte index 3578c503ed..46977a97c3 100644 --- a/packages/builder/src/pages/[application]/backend/database/index.svelte +++ b/packages/builder/src/pages/[application]/backend/database/index.svelte @@ -1,97 +1 @@ - - - - {#if recordOpen} - - {/if} - {#if modelOpen} - - {/if} - {#if viewOpen} - - {/if} - {#if databaseOpen} - - {/if} - {#if deleteRecordOpen} - - {/if} - {#if userOpen} - - {/if} - - -
-
-
-
{breadcrumbs}
- {#if $backendUiStore.selectedDatabase.id} - { - selectedRecord = null - backendUiStore.actions.modals.show('RECORD') - }}> - Create new record - - {/if} -
- {#if $backendUiStore.selectedDatabase.id} - - {:else}Please select a database{/if} -
-
- - +Please select a database