maj site admin
This commit is contained in:
7
.gitignore
vendored
7
.gitignore
vendored
@@ -3,8 +3,7 @@
|
|||||||
wwws/*/dist/**
|
wwws/*/dist/**
|
||||||
!wwws/*/src/
|
!wwws/*/src/
|
||||||
!wwws/*/src/**
|
!wwws/*/src/**
|
||||||
!wwws/itm/
|
wwws/itm/*
|
||||||
!wwws/itm/**
|
|
||||||
wwws/cdn/lib/*
|
wwws/cdn/lib/*
|
||||||
!wwws/cdn/lib/libsource.json
|
!wwws/cdn/lib/libsource.json
|
||||||
devices
|
devices
|
||||||
@@ -13,4 +12,6 @@ nations
|
|||||||
pagans
|
pagans
|
||||||
persons
|
persons
|
||||||
towns
|
towns
|
||||||
tribes
|
tribes
|
||||||
|
# Ignore dynamique file
|
||||||
|
wwws/*/src/static/css/output.css
|
||||||
|
36
options/itm/formpagans_fr.json
Normal file
36
options/itm/formpagans_fr.json
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"optionid":"profil_en",
|
||||||
|
"title": "Profil",
|
||||||
|
"description": "Profil available in apxtri",
|
||||||
|
"commment": "",
|
||||||
|
"lastupdatedata": "",
|
||||||
|
"lst_idx": [
|
||||||
|
"anonymous",
|
||||||
|
"pagan",
|
||||||
|
"mayor",
|
||||||
|
"druid",
|
||||||
|
"person"
|
||||||
|
],
|
||||||
|
"itms": {
|
||||||
|
"anonymous": {
|
||||||
|
"title": "Unidentified user",
|
||||||
|
"description": "Unknown to the apxtri network"
|
||||||
|
},
|
||||||
|
"pagan": {
|
||||||
|
"title": "User with an apxtri identity",
|
||||||
|
"description": "This profile can digitally sign on the apxtri blockchain"
|
||||||
|
},
|
||||||
|
"mayor": {
|
||||||
|
"title": "Administrator of a city",
|
||||||
|
"description": "He manages the rules specific to a tribe grouping, he finances this city and can define its billing terms for welcoming tribes"
|
||||||
|
},
|
||||||
|
"druid": {
|
||||||
|
"title": "Administrator of a tribe",
|
||||||
|
"description": "He has a private space in a city, to apply and enforce the rules of the tribe."
|
||||||
|
},
|
||||||
|
"person": {
|
||||||
|
"title": "A member of a tribe",
|
||||||
|
"description": "A person has an account in a tribe with their alias, it allows them to exchange within a tribe according to the rules set by the druid."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
0
wco/apxform/apxform.js
Normal file
0
wco/apxform/apxform.js
Normal file
61
wco/apxform/example.json
Normal file
61
wco/apxform/example.json
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
"optionid": "formpagans",
|
||||||
|
"title": "Collecte des données publiques de Pagans",
|
||||||
|
"description": "Profil disponible dans apxtri",
|
||||||
|
"comment": "",
|
||||||
|
"lastupdatedata": "",
|
||||||
|
"lst_idx": [
|
||||||
|
"alias",
|
||||||
|
"email",
|
||||||
|
"profil",
|
||||||
|
"biography",
|
||||||
|
"trusted"
|
||||||
|
],
|
||||||
|
"itms": {
|
||||||
|
"alias": {
|
||||||
|
"title": "Alias",
|
||||||
|
"description": "Identifiant public de l’utilisateur dans le réseau apxtri",
|
||||||
|
"type": "string",
|
||||||
|
"widget": "input",
|
||||||
|
"placeholder": "Entrez votre alias",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"title": "Email de récupération",
|
||||||
|
"description": "Permet de récupérer vos clés en cas de perte",
|
||||||
|
"type": "string",
|
||||||
|
"widget": "input",
|
||||||
|
"placeholder": "Entrez votre email",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
"profil": {
|
||||||
|
"title": "Profil",
|
||||||
|
"description": "Sélectionnez votre rôle dans le réseau",
|
||||||
|
"type": "string",
|
||||||
|
"widget": "select",
|
||||||
|
"options": [
|
||||||
|
{ "value": "anonymous", "label": "Utilisateur non identifié" },
|
||||||
|
{ "value": "pagan", "label": "Utilisateur avec identité apxtri" },
|
||||||
|
{ "value": "mayor", "label": "Administrateur d'une cité" },
|
||||||
|
{ "value": "druid", "label": "Administrateur d'une tribu" },
|
||||||
|
{ "value": "person", "label": "Membre d'une tribu" }
|
||||||
|
],
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"biography": {
|
||||||
|
"title": "Biographie",
|
||||||
|
"description": "Quelques mots sur vous",
|
||||||
|
"type": "string",
|
||||||
|
"widget": "textarea",
|
||||||
|
"placeholder": "Présentez-vous…",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
"trusted": {
|
||||||
|
"title": "Domaine de confiance",
|
||||||
|
"description": "Autoriser ce domaine à stocker vos clés privées",
|
||||||
|
"type": "boolean",
|
||||||
|
"widget": "checkbox",
|
||||||
|
"required": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
0
wco/apxform/form.mustache
Normal file
0
wco/apxform/form.mustache
Normal file
53
wco/apxprofil/apxprofil.js
Normal file
53
wco/apxprofil/apxprofil.js
Normal 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`;
|
||||||
|
|
||||||
|
}
|
7
wco/apxprofil/main_fr.mustache
Normal file
7
wco/apxprofil/main_fr.mustache
Normal 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>
|
0
wco/apxprofil/screenmyalias_fr.mustache
Normal file
0
wco/apxprofil/screenmyalias_fr.mustache
Normal file
0
wco/apxprofil/screenmypublicdata_fr.mustache
Normal file
0
wco/apxprofil/screenmypublicdata_fr.mustache
Normal file
0
wco/apxprofil/screenmytowns_fr.mustache
Normal file
0
wco/apxprofil/screenmytowns_fr.mustache
Normal file
0
wco/apxprofil/screenmytribes_fr.mustache
Normal file
0
wco/apxprofil/screenmytribes_fr.mustache
Normal file
31
wco/itm/apxprofil.json
Normal file
31
wco/itm/apxprofil.json
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"wconame": "apxprofil",
|
||||||
|
"owner": "philc",
|
||||||
|
"price": 1,
|
||||||
|
"aliascode": [],
|
||||||
|
"commentaliascode": "if paid wco then [tribename_uniquecode,...]",
|
||||||
|
"codehash": "123",
|
||||||
|
"thumbnail": "",
|
||||||
|
"title": "Manage a pagans profil",
|
||||||
|
"description": "Allow for an alias to manage its public data, and some private data like towns i am following, tribes i joined, my public data link to this alias, eventually my other alias and their privatekey",
|
||||||
|
"lang": ["fr"],
|
||||||
|
"tpl": {
|
||||||
|
"apxprofilmain":"apxtri/objects/wco/apxprofil/main",
|
||||||
|
"apxprofilscreenmyalias":"apxtri/objects/wco/apxprofil/screenmyalias",
|
||||||
|
"apxprofilscreenpublicdata":"apxtri/objects/wco/apxprofil/screenpublicdata",
|
||||||
|
"apxprofilscreenmytowns":"apxtri/objects/wco/apxprofil/screenmytowns",
|
||||||
|
"apxprofilscreenmytribes":"apxtri/objects/wco/apxprofil/screenmytribes"
|
||||||
|
},
|
||||||
|
"tpldatamodel": { "apxauth": "apxtri/objects/wco/apxprofil/exampleapxprofil" },
|
||||||
|
"options": {
|
||||||
|
"profil": "{{tribeId}}/objects/options/profil"
|
||||||
|
},
|
||||||
|
"ref": {
|
||||||
|
"Odmdb": "apxtri/models/tplstrings/Odmdb",
|
||||||
|
"Pagans": "apxtri/models/tplstrings/Pagans",
|
||||||
|
"Persons": "apxtri/models/tplstrings/Persons",
|
||||||
|
"Tribes":"apxtri/models/tplstrings/Tribes",
|
||||||
|
"Towns":"apxtri/models/tplstrings/Towns"
|
||||||
|
},
|
||||||
|
"schema": ["apxtri/objects/pagans", "{{tribe}}/objects/persons","{{tribe}}/objects/tribes","{{tribe}}/objects/towns"]
|
||||||
|
}
|
@@ -5,9 +5,6 @@ apx.simplemobnav.loadwco = (id, ctx) => {
|
|||||||
const tpldataname = `${apx.data.pagename}_${id}_simplemobnav`;
|
const tpldataname = `${apx.data.pagename}_${id}_simplemobnav`;
|
||||||
const simplemobnavid = document.getElementById(id)
|
const simplemobnavid = document.getElementById(id)
|
||||||
console.log("load simplemobnav with tpldataname:", tpldataname, " id:", id, " ctx:", ctx);
|
console.log("load simplemobnav with tpldataname:", tpldataname, " id:", id, " ctx:", ctx);
|
||||||
// check if authenticate if yes then show myworld instead of signin
|
|
||||||
//console.log("ggggggggggggg",apx.data.headers.xalias)
|
|
||||||
//if (apx.data.headers.xalias!="anonymous") ctx.link="myworld";
|
|
||||||
let initmenu;
|
let initmenu;
|
||||||
if (simplemobnavid.innerHTML.trim() === "") {
|
if (simplemobnavid.innerHTML.trim() === "") {
|
||||||
// Get 1st menu matching the first profil in profilmenu
|
// Get 1st menu matching the first profil in profilmenu
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="fr" data-theme="apxtridark" class="h-full bg-base-200 text-neutral-content ">
|
<html lang="fr" data-theme="apxtridark">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>Mon profil</title>
|
<title>Mon profil</title>
|
||||||
@@ -34,9 +34,8 @@
|
|||||||
xuuid:0
|
xuuid:0
|
||||||
},
|
},
|
||||||
pagename: "myprofil",
|
pagename: "myprofil",
|
||||||
pageauth: "apxid",
|
|
||||||
wcoobserver:true,
|
wcoobserver:true,
|
||||||
allowedprofils:["anonymous"],
|
allowedprofils:["pagans"],
|
||||||
version:0
|
version:0
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -48,19 +47,16 @@
|
|||||||
<script src="/apxtrilib/checkjson.js"></script>
|
<script src="/apxtrilib/checkjson.js"></script>
|
||||||
|
|
||||||
<script src="/api/apxtri/wwws/getwco/apx.js?wcotribe=apxtri&tribe=apxtri&xapp=admin&pagename=apxid&code=enjoy"></script>
|
<script src="/api/apxtri/wwws/getwco/apx.js?wcotribe=apxtri&tribe=apxtri&xapp=admin&pagename=apxid&code=enjoy"></script>
|
||||||
<script src="/api/apxtri/wwws/getwco/simplemobnav.js?wcotribe=apxtri&tribe=apxtri&xapp=admin&pagename=apxid&code=enjoy&tagid=mydata"></script>
|
<script src="/api/apxtri/wwws/getwco/simplemobnav.js?wcotribe=apxtri&tribe=apxtri&xapp=admin&pagename=myprofil&code=enjoy&tagid=mydata"></script>
|
||||||
|
<script src="/api/apxtri/wwws/getwco/apxprofil.js?wcotribe=apxtri&tribe=apxtri&xapp=admin&pagename=myprofil&code=enjoy&tagid=mychoice"></script>
|
||||||
</head>
|
</head>
|
||||||
<body class="h-full">
|
<body class="bg-base-100 flex items-center justify-center min-h-screen">
|
||||||
<div class="flex items-center justify-center min-h-screen px-4">
|
<div class="flex items-center justify-center min-h-screen px-4">
|
||||||
|
|
||||||
<div
|
<div
|
||||||
id="mydata"
|
id="mydata"
|
||||||
wco-name="simplemobnav"
|
wco-name="simplemobnav"
|
||||||
class="bg-base-100 min-h-screen w-full p-4 text-center">
|
class="w-full h-screen sm:w-[600px] bg-base-100 rounded-none sm:rounded-2xl shadow-xl flex flex-col overflow-hidden">
|
||||||
</div>
|
</div>
|
||||||
<!--div wco-name="chatroom" class="hidden min-h-full flex-col justify-center px-6 py-12 lg:px-8">
|
|
||||||
</div-->
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
"textContent": "Never miss an opportunity"
|
"textContent": "Never miss an opportunity"
|
||||||
},
|
},
|
||||||
"textlist": true,
|
"textlist": true,
|
||||||
"commentmenutype": "textlist: vertical list of menu with texte, buttonlist: horizontal btn",
|
"commentmenutype": "textlist:true == vertical list of menu with texte, buttonlist:true == horizontal btn",
|
||||||
"profilmenu": [
|
"profilmenu": [
|
||||||
{
|
{
|
||||||
"mainprofil": "persons",
|
"mainprofil": "persons",
|
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
|
||||||
|
}
|
109
wwws/admin/src/tpldata/myprofil_mydata_simplemobnav_fr.json
Normal file
109
wwws/admin/src/tpldata/myprofil_mydata_simplemobnav_fr.json
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
{
|
||||||
|
"contentwconame": "apxprofil",
|
||||||
|
"contentid": "mychoice",
|
||||||
|
"logobgdark": {
|
||||||
|
"src": "static/img/logo/logobgdark.png",
|
||||||
|
"alt": "apxtri"
|
||||||
|
},
|
||||||
|
"logobglight": {
|
||||||
|
"src": "static/img/logo/logobglight.png",
|
||||||
|
"alt": "apxtri"
|
||||||
|
},
|
||||||
|
"claim": {
|
||||||
|
"textContent": "L'Unique et sa Propriété"
|
||||||
|
},
|
||||||
|
"navtpl":"navbuttonh",
|
||||||
|
"classnavbutton":"btn-primary hover:bg-secondary",
|
||||||
|
"classnavlist":{"p":"text-sm text-gray-500","a":"text-secondary hover:text-primary"},
|
||||||
|
"profilmenu": [
|
||||||
|
{
|
||||||
|
"mainprofil": "major",
|
||||||
|
"link": "mytowns"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mainprofil": "druid",
|
||||||
|
"link": "mytribes"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mainprofil": "persons",
|
||||||
|
"link": "myalias"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mainprofil": "pagans",
|
||||||
|
"link": "mypublicdata"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"link": "mytowns",
|
||||||
|
"d":"M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z",
|
||||||
|
"shortlabel":"Villes",
|
||||||
|
"label": "Mes villes",
|
||||||
|
"textlink": "Mes villes suivies",
|
||||||
|
"allowedprofil":["pagans"],
|
||||||
|
"action":"navigation",
|
||||||
|
"next": [
|
||||||
|
"mytribes",
|
||||||
|
"myalias",
|
||||||
|
"mypublicdata",
|
||||||
|
"back"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"link": "mytribes",
|
||||||
|
"d":"M13.5 10.5V6.75a4.5 4.5 0 1 1 9 0v3.75M3.75 21.75h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H3.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z",
|
||||||
|
"shortlabel": "Tribus",
|
||||||
|
"label": "Mes tribus",
|
||||||
|
"textlink": "Mes tribus suivis",
|
||||||
|
"allowedprofil":["pagans"],
|
||||||
|
"action":"navigation",
|
||||||
|
"next": [
|
||||||
|
"mytowns",
|
||||||
|
"myalias",
|
||||||
|
"mypublicdata",
|
||||||
|
"back"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"link": "myalias",
|
||||||
|
"d":"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z",
|
||||||
|
"shortlabel": "Alias",
|
||||||
|
"label": "Mes alias",
|
||||||
|
"textlink": "Lien cours avec vos identifiant par alias",
|
||||||
|
"allowedprofil":["pagans"],
|
||||||
|
"action":"navigation",
|
||||||
|
"next": [
|
||||||
|
"mytowns",
|
||||||
|
"mytribes",
|
||||||
|
"mypublicdata",
|
||||||
|
"back"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"link": "mypublicdata",
|
||||||
|
"d":"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z",
|
||||||
|
"shortlabel": "Public data",
|
||||||
|
"label": " Mes données public",
|
||||||
|
"textlink": "Info associée à cet alias",
|
||||||
|
"allowedprofil":["pagans"],
|
||||||
|
"action":"navigation",
|
||||||
|
"next": [
|
||||||
|
"mytowns",
|
||||||
|
"mytribes",
|
||||||
|
"myalias",
|
||||||
|
"back"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"link": "back",
|
||||||
|
"d":"M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3",
|
||||||
|
"shortlabel":"Retour",
|
||||||
|
"label": "Retour au menu ",
|
||||||
|
"allowedprofil":["anonymous"],
|
||||||
|
"action":"gohome",
|
||||||
|
"wconame":"apxprofil",
|
||||||
|
"textlink": "Retour",
|
||||||
|
"next": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Reference in New Issue
Block a user