From 67b820ad475226d7741ff4b10359366fd73d008d Mon Sep 17 00:00:00 2001 From: Romein van Buren Date: Sat, 24 Jun 2023 20:43:02 +0200 Subject: [PATCH] Fixed host editing bug --- CHANGELOG.md | 1 + frontend/src/lib/stores/hosttree.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e0239e..54a7f56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ * Open dump in Explorer/Finder when finished (#43). * Made it possible (again) to input loose JSON into find view inputs, i.e. `{ key: 'val' }` or `{ 'num': 2 }` besides `{ "strict": "json" }`. * Improved error logging and dialogs. +* Fixed host editing bug. ## [v0.2.1] diff --git a/frontend/src/lib/stores/hosttree.js b/frontend/src/lib/stores/hosttree.js index c5c08d1..0f8f0ab 100644 --- a/frontend/src/lib/stores/hosttree.js +++ b/frontend/src/lib/stores/hosttree.js @@ -290,6 +290,15 @@ async function refresh() { await refresh(); }; + host.edit = async function() { + const dialog = dialogs.new(HostDetailDialog, { hostKey }); + return new Promise(resolve => { + dialog.$on('close', () => { + refresh().then(resolve); + }); + }); + }; + host.remove = async function() { await RemoveHost(hostKey); await refresh();