feat(dashboard): preserve call-count prefix on hive-identity title update
On refreshState, the hive-identity title update (fired once when hive_name/swarm_name are configured) now reads any existing (N) prefix and preserves it, so the title doesn't briefly drop back to the bare identity string before refreshTabCounts re-applies the prefix.
This commit is contained in:
parent
fa62417328
commit
e24cfba124
1 changed files with 4 additions and 1 deletions
|
|
@ -3684,7 +3684,10 @@ window.marked = marked;
|
||||||
: hive || swarm;
|
: hive || swarm;
|
||||||
hiveId.textContent = label;
|
hiveId.textContent = label;
|
||||||
hiveId.hidden = false;
|
hiveId.hidden = false;
|
||||||
document.title = label + ' // h1ve-c0re';
|
// Preserve any (N) call-count prefix already applied by
|
||||||
|
// refreshTabCounts so the title doesn't flicker on reload.
|
||||||
|
const existingPrefix = document.title.match(/^(\(\d+\) )/)?.[1] || '';
|
||||||
|
document.title = existingPrefix + label + ' // h1ve-c0re';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const openDetails = snapshotOpenDetails();
|
const openDetails = snapshotOpenDetails();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue