From f7f1194d63716dc6bcd27af7318f697eac2bcca6 Mon Sep 17 00:00:00 2001 From: StyxX65 <150797939+StyxX65@users.noreply.github.com> Date: Tue, 21 Apr 2026 20:33:16 +0200 Subject: [PATCH] Fix: Profile copy rename not reflected in left column until modal reopen --- CHANGELOG.md | 8 ++++++++ static/js/profiles.js | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6ad53a..9c2f029 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ Version numbers follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html --- +## [1.6.23] — 2026-04-21 + +### Fixed + +- **Profile copy rename not reflected in left column until modal reopen** — saving a renamed profile via the full editor (`_pmgmtSaveFullEdit`) called `loadProfiles()` to refresh `S._profiles` but never called `_renderProfileMgmt()`, so the left-column list was not repainted. The new name only appeared after closing and reopening the modal. Fixed by calling `_renderProfileMgmt()` immediately after `loadProfiles()` and re-applying the `.active` highlight to the correct row. + +--- + ## [1.6.22] — 2026-04-21 ### Added diff --git a/static/js/profiles.js b/static/js/profiles.js index 4bbd043..873311a 100644 --- a/static/js/profiles.js +++ b/static/js/profiles.js @@ -645,6 +645,7 @@ async function _pmgmtSaveFullEdit() { const d = await r.json(); if (d.error) { alert(d.error); return; } await loadProfiles(); + _renderProfileMgmt(); window._pmgmtNewDraft = null; log(t('m365_profile_saved','Profile saved') + ': ' + name); // Show inline saved feedback without closing the modal @@ -658,7 +659,10 @@ async function _pmgmtSaveFullEdit() { } // Re-open the editor for the saved profile so it reflects the saved state const saved = S._profiles.find(function(p) { return p.name === name; }); - if (saved) { window._pmgmtEditId = saved.id; } + if (saved) { + window._pmgmtEditId = saved.id; + document.querySelectorAll('.pmgmt-row').forEach(r => r.classList.toggle('active', r.dataset.id === saved.id)); + } } catch(e) { alert('Save failed: ' + e.message); } }