diff --git a/frontend/src/app.svelte b/frontend/src/app.svelte index 24e6fbc..ee7b3cc 100644 --- a/frontend/src/app.svelte +++ b/frontend/src/app.svelte @@ -135,7 +135,17 @@ newDb = {}; } } }, - { icon: '-' }, + { icon: '-', fn: evt => { + if (activeCollKey) { + contextMenu.show(evt, [ + { label: 'Drop database', fn: () => dropDatabase(activeDbKey) }, + { label: 'Drop collection', fn: () => dropCollection(activeDbKey, activeCollKey) }, + ]); + } + else { + dropDatabase(activeDbKey); + } + }, disabled: !activeDbKey }, ]} bind:activeKey={activeDbKey} bind:activeChildKey={activeCollKey} diff --git a/frontend/src/components/grid.svelte b/frontend/src/components/grid.svelte index 786dd8f..8ee7cf0 100644 --- a/frontend/src/components/grid.svelte +++ b/frontend/src/components/grid.svelte @@ -87,7 +87,7 @@ {#if actions?.length}
{#each actions as action} -