delete branch operation

This commit is contained in:
Jan Prochazka
2022-03-26 08:12:56 +01:00
parent fc08353225
commit 9e3991556a
3 changed files with 47 additions and 10 deletions

View File

@@ -48,12 +48,35 @@
});
},
},
item.type == 'dir' && {
label: 'Reload',
onClick: () => {
reloadToken += 1;
item.type == 'dir' && [
{
label: 'Reload',
onClick: () => {
reloadToken += 1;
},
},
},
{
label: 'Delete branch',
onClick: () => {
const branch = `${item.root}:*`;
showModal(ConfirmModal, {
message: `Really delete branch ${branch} with all keys?`,
onConfirm: async () => {
await apiCall('database-connections/call-method', {
conid,
database,
method: 'mdel',
args: [branch],
});
if (onRefreshParent) {
onRefreshParent();
}
},
});
},
},
],
];
}
</script>