mirror of
https://github.com/garraflavatra/rolens.git
synced 2024-12-01 13:20:54 +00:00
Drop databases and collections
This commit is contained in:
parent
c9a035ed59
commit
d139a077d9
@ -135,7 +135,17 @@
|
|||||||
newDb = {};
|
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:activeKey={activeDbKey}
|
||||||
bind:activeChildKey={activeCollKey}
|
bind:activeChildKey={activeCollKey}
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
{#if actions?.length}
|
{#if actions?.length}
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
{#each actions as action}
|
{#each actions as action}
|
||||||
<button class="btn" on:click={action.fn}>
|
<button class="btn" on:click={action.fn} disabled={action.disabled}>
|
||||||
{#if action.icon}<Icon name={action.icon} />{/if}
|
{#if action.icon}<Icon name={action.icon} />{/if}
|
||||||
{action.label || ''}
|
{action.label || ''}
|
||||||
</button>
|
</button>
|
||||||
|
Loading…
Reference in New Issue
Block a user