fix: router add() signature, setActivePage typo, connect race condition

- Router.add() now takes 3 params (pattern, title, onEnter) matching app.js usage
- Fixed setActiveSidebar → setActivePage in all route callbacks
- Removed premature hash-setting from connect.js — app.js now sole navigator
  (was firing router into a hidden container before showConnected ran)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-06-13 17:57:48 +02:00
co-authored by Copilot
parent c5679feb82
commit 19c5247c90
3 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ function ConnectPage(params, container) {
});
function onConnected() {
window.location.hash = '#/' + Rcon.getAddress() + '/info';
// Navigation handled by app.js — don't set hash here
}
function onDisconnected(ev) {
showError('Connection was closed — Error ' + (ev ? ev.code : 'unknown'));