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

Додани веб компоненти карточок територій та повідомлень
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

@@ -27,8 +27,8 @@ const Home = {
return Home.personal.house.list;
},
setHTML: async () => {
const list = Home.personal.house.list.length > 0
? Home.personal.house.list
const list = Home.personal.house.list.length > 0
? Home.personal.house.list
: await Home.personal.house.loadAPI();
if (USER.possibilities.can_view_territory && list.length)
@@ -53,8 +53,8 @@ const Home = {
return Home.personal.homestead.list;
},
setHTML: async () => {
const list = Home.personal.homestead.list.length > 0
? Home.personal.homestead.list
const list = Home.personal.homestead.list.length > 0
? Home.personal.homestead.list
: await Home.personal.homestead.loadAPI();
if (USER.possibilities.can_view_territory && list.length)
@@ -81,8 +81,8 @@ const Home = {
return Home.group.house.list;
},
setHTML: async () => {
const list = Home.group.house.list.length > 0
? Home.group.house.list
const list = Home.group.house.list.length > 0
? Home.group.house.list
: await Home.group.house.loadAPI();
if (USER.possibilities.can_view_territory && list.length)
@@ -107,8 +107,8 @@ const Home = {
return Home.group.homestead.list;
},
setHTML: async () => {
const list = Home.group.homestead.list.length > 0
? Home.group.homestead.list
const list = Home.group.homestead.list.length > 0
? Home.group.homestead.list
: await Home.group.homestead.loadAPI();
if (USER.possibilities.can_view_territory && list.length)
@@ -124,18 +124,10 @@ const Home = {
const fragment = document.createDocumentFragment();
for (const el of list) {
const card = document.createElement("div");
card.className = "card";
card.innerHTML = `
<i style="background-image: url(${CONFIG.web}cards/${type}/${type === "house" ? "T" : "H"}${el.id}.webp);"></i>
<div class="contents">
<div class="info">
<div><p>${el.title} ${el.number}</p></div>
</div>
</div>
<a href="/territory/card/${type}/${el.id}" data-route></a>
`;
const card = document.createElement('app-territory-card');
card.image = `${CONFIG.web}cards/${type}/${type === "house" ? "T" : "H"}${el.id}.webp`;
card.address = `${el.title} ${el.number})`;
card.link = `/territory/card/${type}/${el.id}`;
fragment.appendChild(card);
}