Додан моніторінг застосунку
Додани веб компоненти карточок територій та повідомлень
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -1,71 +1,93 @@
|
||||
Router
|
||||
.add('auth', function () {
|
||||
pageActive('');
|
||||
Auth.init();;
|
||||
Auth.init();
|
||||
page = "Auth";
|
||||
})
|
||||
.add('territory/map', function () {
|
||||
pageActive();
|
||||
Territory_Map.init();;
|
||||
Territory_Map.init();
|
||||
page = "Territory_Map";
|
||||
})
|
||||
.add('territory/constructor', function () {
|
||||
pageActive();
|
||||
Territory_constructor.init();;
|
||||
Territory_constructor.init();
|
||||
page = "Territory_constructor";
|
||||
})
|
||||
.add('territory/manager/(.*)/(.*)', function (type, id) {
|
||||
pageActive();
|
||||
Territory_Manager.init(type, id);
|
||||
page = "Territory_Manager";
|
||||
})
|
||||
.add('territory/editor/(.*)/(.*)', function (type, id) {
|
||||
pageActive();
|
||||
Territory_editor.init(type, id);
|
||||
page = "Territory_editor";
|
||||
})
|
||||
.add('territory/card/(.*)/(.*)', function (type, id) {
|
||||
pageActive();
|
||||
Territory_card.init(type, id);
|
||||
page = "Territory_card";
|
||||
})
|
||||
.add('territory/history', function () {
|
||||
pageActive();
|
||||
Territory_History.init();
|
||||
page = "Territory_History";
|
||||
})
|
||||
.add('territory', function () {
|
||||
pageActive('territory');
|
||||
Territory_list.init();
|
||||
page = "Territory_list";
|
||||
})
|
||||
.add('sheeps/(.*)', function (name) {
|
||||
pageActive('sheeps');
|
||||
Sheeps.init(name);;
|
||||
Sheeps.init(name);
|
||||
page = "Sheeps";
|
||||
})
|
||||
.add('sheeps', function () {
|
||||
pageActive('sheeps');
|
||||
Sheeps.init();;
|
||||
Sheeps.init();
|
||||
page = "Sheeps";
|
||||
})
|
||||
.add('home', function () {
|
||||
pageActive('home');
|
||||
Home.init();
|
||||
page = "Home";
|
||||
})
|
||||
.add('schedule/constructor', function () {
|
||||
pageActive();
|
||||
Schedule_constructor.init();
|
||||
page = "Schedule_constructor";
|
||||
})
|
||||
.add('schedule', function () {
|
||||
pageActive('schedule');
|
||||
Schedule_list.init();;
|
||||
Schedule_list.init();
|
||||
page = "Schedule_list";
|
||||
})
|
||||
.add('stand/constructor', function () {
|
||||
pageActive();
|
||||
Stand_constructor.init();;
|
||||
Stand_constructor.init();
|
||||
page = "Stand_constructor";
|
||||
})
|
||||
.add('stand/editor/(.*)', function (id) {
|
||||
pageActive();
|
||||
Stand_editor.init(id);;
|
||||
Stand_editor.init(id);
|
||||
page = "Stand_editor";
|
||||
})
|
||||
.add('stand/card/(.*)', function (id) {
|
||||
pageActive();
|
||||
Stand_card.init(id);;
|
||||
Stand_card.init(id);
|
||||
page = "Stand_card";
|
||||
})
|
||||
.add('stand', function () {
|
||||
pageActive('stand');
|
||||
Stand_list.init();;
|
||||
Stand_list.init();
|
||||
page = "Stand_list";
|
||||
})
|
||||
.add('options', function () {
|
||||
pageActive('options');
|
||||
Options.init();;
|
||||
Options.init();
|
||||
page = "Options";
|
||||
})
|
||||
.add(function () {
|
||||
page_404();;
|
||||
|
||||
Reference in New Issue
Block a user