mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-30 00:19:35 +00:00
store connection secrets in system keyring
This commit is contained in:
@@ -269,11 +269,11 @@ async function save() {
|
||||
try {
|
||||
if (editingId.value) {
|
||||
const updated: ConnectionConfig = { ...form.value, id: editingId.value };
|
||||
store.updateConnection(updated);
|
||||
await store.updateConnection(updated);
|
||||
store.stopEditing();
|
||||
} else {
|
||||
const config: ConnectionConfig = { ...form.value, id: crypto.randomUUID() };
|
||||
store.addConnection(config);
|
||||
await store.addConnection(config);
|
||||
open.value = false;
|
||||
await nextTick();
|
||||
emit("connectStarted", config.name);
|
||||
|
||||
@@ -220,11 +220,15 @@ function deleteConnection() {
|
||||
showDeleteConfirm.value = true;
|
||||
}
|
||||
|
||||
function confirmDelete() {
|
||||
async function confirmDelete() {
|
||||
const node = props.node;
|
||||
if (node.connectionId) {
|
||||
connectionStore.disconnect(node.connectionId);
|
||||
connectionStore.removeConnection(node.connectionId);
|
||||
try {
|
||||
await connectionStore.disconnect(node.connectionId);
|
||||
await connectionStore.removeConnection(node.connectionId);
|
||||
} catch (e: any) {
|
||||
toast(t("connection.saveFailed", { message: e?.message || String(e) }), 5000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user