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
+2 -2
View File
@@ -18,8 +18,8 @@ var Router = (function () {
var viewSelector = null;
var currentCleanup = null;
function add(pattern, title, template, onEnter) {
routes.push({ pattern: pattern, title: title, template: template, onEnter: onEnter });
function add(pattern, title, onEnter) {
routes.push({ pattern: pattern, title: title, onEnter: onEnter });
}
function navigate(hash) {