feat: add delete key dialog and logic

refactor: tidy function of connection store
This commit is contained in:
tiny-craft
2023-07-06 01:22:14 +08:00
parent d7955702f8
commit 1841ccf3d3
13 changed files with 293 additions and 63 deletions

View File

@@ -191,7 +191,7 @@ const openConnection = async (name) => {
const dialog = useDialog()
const removeConnection = (name) => {
confirmDialog.warning(i18n.t('remove_tip', { type: i18n.t('conn_name'), name }), async () => {
connectionStore.removeConnection(name).then(({ success, msg }) => {
connectionStore.deleteConnection(name).then(({ success, msg }) => {
if (!success) {
message.error(msg)
}