maj site admin

This commit is contained in:
2025-10-01 15:10:50 +02:00
parent 46cf2e83e2
commit b804230b1b
17 changed files with 312 additions and 18 deletions

View File

@@ -0,0 +1,53 @@
var apx = apx || {};
apx.apxprofil = {};
apx.apxprofil.loadwco = async (id, ctx) => {
console.log(
`Load wconame:apxauth apx.apxauth.loadwco with id:${id} and ctx: ${JSON.stringify(
ctx
)}`
);
// Check that in localdb tpl exist if not means it is not authenticated
if (!apx.data.tpl[`apxauthscreen${ctx.link}`]) ctx.link="signin";
const tpldataname = `${apx.data.pagename}_${id}_apxprofil`;
const destid = document.getElementById(id);
const data = apx.apxprofil.getdata(id, ctx);
if (destid.innerHTML.trim() === "") {
destid.innerHTML = Mustache.render(apx.data.tpl.apxprofilmain, data);
}
destid.querySelector(`.screenaction`).innerHTML = Mustache.render(
apx.data.tpl[`apxprofilscreen${ctx.link}`],
data
);
apxauthid.querySelector(`.msginfo`).innerHTML = "";
};
apx.apxprofil.getdata = (id, ctx) => {
const tpldataname = `${apx.data.pagename}_${id}_apxauth`;
const data = JSON.parse(JSON.stringify(apx.data.tpldata[tpldataname]));
data.id = id;
data.xalias = apx.data.headers.xalias;
data.xtribe = apx.data.headers.xtribe;
data.emailsupport = apx.data?.appdata?.emailsupport
? apx.data.appdata.emailsupport
: "";
console.log("data:",data)
switch (ctx.link) {
case "alias":
break;
case "unique":
break;
case "tribes":
break;
case "towns":
break;
default:
break;
}
console.log("data for tpl:", data);
return data;
};
apx.apxprofil.gohome=()=>{
window.location.href=`apxid_${apx.data.headers.xlang}.html`;
}

View File

@@ -0,0 +1,7 @@
<!-- screen action-->
<div class="screenaction mt-5 px-7 w-full">
</div>
<!-- feedback action-->
<div class="my-5 w-full">
<p class="msginfo text-center text-info"></p>
</div>

View File

View File

View File