update TWA Management v0.0.1

This commit is contained in:
2025-11-05 10:08:06 +07:00
parent d4e91c7960
commit b4b191f829
73 changed files with 2249 additions and 418 deletions

View File

@ -541,6 +541,7 @@ class AApp extends window.AObject {
this.metaPage = document.head.querySelector("meta[name=idPage]");
this.pageName = this.metaPage.getAttribute("pageName");
this.lName = this.metaPage.getAttribute("layName");
console.log(this.lName);
var tmp = document.querySelector(container);
this.mainApp = tmp.querySelector("[main-content]") ? tmp.querySelector("[main-content]") : tmp;
var f = function (ev) {
@ -688,6 +689,7 @@ class AApp extends window.AObject {
doc: doc,
dynamicF: a.dynamicF
};
this.setContentPage(obj, url);
} else {
this.getPage(url, result)
@ -721,7 +723,9 @@ class AApp extends window.AObject {
document.title = page.title + " - " + this.pageName;
var meta = document.head.querySelector("meta[name=idPage]");
document.body.setAttribute("page", page.idPage);
meta.content = page.idPage;
this.lName = page.lName;
meta.setAttribute("layName", page.lName);
this.loadContentPage(page.html);
window.history.pushState({"url":url}, page.title, url);
@ -821,6 +825,7 @@ class AApp extends window.AObject {
}).bind(this)();
}
loadedLayout() {
console.log(this.lName);
if (this.lName !== "None") {
const l = window.ALayout.get(this.lName);
if (!l.isLoaded) {
@ -831,7 +836,6 @@ class AApp extends window.AObject {
}
}
setLayout(o) {
var oP = new DOMParser();
var pHtml = oP.parseFromString(o.Content, 'text/html');
(function () {