store connection secrets in system keyring

This commit is contained in:
SuLe
2026-05-02 03:37:52 +08:00
parent 3f71cd6dfa
commit d14329ea15
12 changed files with 935 additions and 36 deletions
@@ -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);
+7 -3
View File
@@ -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);
}
}
}