Додан моніторінг застосунку

Додани веб компоненти карточок територій та повідомлень
This commit is contained in:
2025-12-08 00:14:56 +02:00
parent e41590546c
commit 85483b85bb
206 changed files with 2370 additions and 595 deletions

View File

@@ -123,7 +123,12 @@ const Router = {
// Делегування кліків по посиланнях з data-route
delegateLinks() {
window.addEventListener('click', (e) => {
const target = e.target.closest('[data-route]');
// const target = e.target.closest('[data-route]');
const pathNodes = e.composedPath();
const target = pathNodes.find(node =>
node.tagName === 'A' && node.hasAttribute('data-route')
);
if (!target || !target.href) return;
const path = target.href.replace(location.origin, '');
@@ -148,7 +153,7 @@ const Router = {
location.hash = this.clearSlashes(path);
}
if(update == true) {
if (update == true) {
window.scrollTo(0, 0); // Скидуємо прокрутку при переході
this.check();
}