mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-02 19:02:31 +00:00
fix: hide native discovery editor immediately on target change
This commit is contained in:
@@ -1348,7 +1348,7 @@ export function LxcAppPanel({ vmid, ctIp, onChange, managed, initialData, oci }:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ── Editor ─────────────────────────────────────────────────────
|
// ── Editor ─────────────────────────────────────────────────────
|
||||||
if (editing) {
|
if (editorOpen && editing) {
|
||||||
const draft = editing.draft
|
const draft = editing.draft
|
||||||
const method = draft.installed_via || ""
|
const method = draft.installed_via || ""
|
||||||
const isPackaged = method === "dpkg" || method === "apk"
|
const isPackaged = method === "dpkg" || method === "apk"
|
||||||
|
|||||||
@@ -134,6 +134,13 @@ async function main() {
|
|||||||
assert.ok(text(failed.tree()).includes('nativeScanFailed'))
|
assert.ok(text(failed.tree()).includes('nativeScanFailed'))
|
||||||
assert.equal(failed.calls.filter(c => c.url.endsWith('/apps/suggestions') && c.method === 'POST').length, 0)
|
assert.equal(failed.calls.filter(c => c.url.endsWith('/apps/suggestions') && c.method === 'POST').length, 0)
|
||||||
|
|
||||||
|
const editorSwitch = fixture()
|
||||||
|
editorSwitch.render(); await editorSwitch.settle()
|
||||||
|
await editorSwitch.button('searchApplications').props.onClick(); editorSwitch.render()
|
||||||
|
await editorSwitch.button('registerButton').props.onClick(); editorSwitch.render()
|
||||||
|
editorSwitch.render({vmid: 102})
|
||||||
|
assert.ok(!text(editorSwitch.tree()).includes('saveButton'), 'old editor must disappear in the very first render of another CT')
|
||||||
|
|
||||||
const late = fixture()
|
const late = fixture()
|
||||||
late.render(); await late.settle(); late.holdScan()
|
late.render(); await late.settle(); late.holdScan()
|
||||||
const scan = late.button('searchApplications').props.onClick()
|
const scan = late.button('searchApplications').props.onClick()
|
||||||
|
|||||||
Reference in New Issue
Block a user