From c0bd5f2fbb23c8f76b1e7536751f8f6134deb728 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 31 Mar 2020 17:53:34 +0100 Subject: [PATCH 1/3] ability to delete databases --- .../modals/DeleteDatabase.svelte | 35 +++++++++++++++++++ .../database/ModelDataTable/modals/index.js | 1 + packages/builder/src/nav/DatabasesList.svelte | 17 +++++++++ 3 files changed, 53 insertions(+) create mode 100644 packages/builder/src/database/ModelDataTable/modals/DeleteDatabase.svelte diff --git a/packages/builder/src/database/ModelDataTable/modals/DeleteDatabase.svelte b/packages/builder/src/database/ModelDataTable/modals/DeleteDatabase.svelte new file mode 100644 index 0000000000..10fe09fa55 --- /dev/null +++ b/packages/builder/src/database/ModelDataTable/modals/DeleteDatabase.svelte @@ -0,0 +1,35 @@ + + +
+ Are you sure you want to delete {database}? +
+ + Delete + +
+ + diff --git a/packages/builder/src/database/ModelDataTable/modals/index.js b/packages/builder/src/database/ModelDataTable/modals/index.js index c986160961..7ddb1efd43 100644 --- a/packages/builder/src/database/ModelDataTable/modals/index.js +++ b/packages/builder/src/database/ModelDataTable/modals/index.js @@ -4,3 +4,4 @@ export { default as CreateEditModelModal } from "./CreateEditModel.svelte" export { default as CreateEditViewModal } from "./CreateEditView.svelte" export { default as CreateDatabaseModal } from "./CreateDatabase.svelte" export { default as CreateUserModal } from "./CreateUser.svelte" +export { default as DeleteDatabaseModal } from "./DeleteDatabase.svelte" diff --git a/packages/builder/src/nav/DatabasesList.svelte b/packages/builder/src/nav/DatabasesList.svelte index b531d34351..441a28484c 100644 --- a/packages/builder/src/nav/DatabasesList.svelte +++ b/packages/builder/src/nav/DatabasesList.svelte @@ -1,6 +1,7 @@
@@ -30,6 +42,9 @@ on:click={() => selectDatabase(database)}> {database.name} + deleteDatabase(database)} /> {/each} @@ -53,6 +68,8 @@ li { margin: 0.5rem 0; + display: flex; + align-items: center; } button { From fccd90d64d81efb829b185921fc97110683f10d8 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 31 Mar 2020 17:58:47 +0100 Subject: [PATCH 2/3] tidy up --- .../modals/DeleteDatabase.svelte | 35 ------------------- .../database/ModelDataTable/modals/index.js | 1 - 2 files changed, 36 deletions(-) delete mode 100644 packages/builder/src/database/ModelDataTable/modals/DeleteDatabase.svelte diff --git a/packages/builder/src/database/ModelDataTable/modals/DeleteDatabase.svelte b/packages/builder/src/database/ModelDataTable/modals/DeleteDatabase.svelte deleted file mode 100644 index 10fe09fa55..0000000000 --- a/packages/builder/src/database/ModelDataTable/modals/DeleteDatabase.svelte +++ /dev/null @@ -1,35 +0,0 @@ - - -
- Are you sure you want to delete {database}? -
- - Delete - -
- - diff --git a/packages/builder/src/database/ModelDataTable/modals/index.js b/packages/builder/src/database/ModelDataTable/modals/index.js index 7ddb1efd43..c986160961 100644 --- a/packages/builder/src/database/ModelDataTable/modals/index.js +++ b/packages/builder/src/database/ModelDataTable/modals/index.js @@ -4,4 +4,3 @@ export { default as CreateEditModelModal } from "./CreateEditModel.svelte" export { default as CreateEditViewModal } from "./CreateEditView.svelte" export { default as CreateDatabaseModal } from "./CreateDatabase.svelte" export { default as CreateUserModal } from "./CreateUser.svelte" -export { default as DeleteDatabaseModal } from "./DeleteDatabase.svelte" From 77f707949cda223d7586005645d595da169679eb Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 31 Mar 2020 18:11:12 +0100 Subject: [PATCH 3/3] change icon --- packages/builder/src/nav/DatabasesList.svelte | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/nav/DatabasesList.svelte b/packages/builder/src/nav/DatabasesList.svelte index 441a28484c..ba40b8c1b4 100644 --- a/packages/builder/src/nav/DatabasesList.svelte +++ b/packages/builder/src/nav/DatabasesList.svelte @@ -36,15 +36,15 @@ {/if} - + deleteDatabase(database)} /> - deleteDatabase(database)} /> + {/each}