1st commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
var app=app||{};
|
||||
app.navbarinline={};
|
||||
|
||||
app.navbarinline.show=(action)=>{
|
||||
console.log('run navbar')
|
||||
if (!action) action="signin";
|
||||
app[action].show();
|
||||
const navdata={btnactions: []}
|
||||
apx.data.tpldata.navbarinlinesquarebtn[action].forEach(b=>{
|
||||
navdata.btnactions.push(apx.data.tpldata.navbarinlinesquarebtn[b])
|
||||
})
|
||||
console.log( navdata)
|
||||
document.querySelector("[name='wallet']").innerHTML=Mustache.render(apx.data.tpl.navbarinlinesquarebtn,navdata);
|
||||
|
||||
}
|
||||
|
||||
apx.readyafterupdate(app.navbarinline.show);
|
@@ -0,0 +1,8 @@
|
||||
<div class="d-flex justify-content-center">
|
||||
{{#btnactions}}
|
||||
<button class="m-1 btn btn-outline-primary" onclick="{{onclick}}"
|
||||
data-bs-toggle="tooltip" data-bs-placement="top" title="{{title}}">
|
||||
{{{icon}}}
|
||||
</button>
|
||||
{{/btnactions}}
|
||||
</div>
|
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"signin": ["addidentity", "forgetkey", "info"],
|
||||
"signup": ["login", "forgetkey", "info"],
|
||||
"info": ["back"],
|
||||
"recoverkey": ["addidentity", "forgetkey", "info"],
|
||||
"wallet": [],
|
||||
"btnlogout": {
|
||||
"onclick": "app.navbarinline.show('signin')",
|
||||
"title": "Sortir",
|
||||
"icon": "<i class='fs-3 bi bi-door-closed'></i>"
|
||||
},
|
||||
"forgetkey": {
|
||||
"onclick": "app.wallet.show('forget')",
|
||||
"title": "Trouver sa clé",
|
||||
"icon": "<i class='fs-3 bi bi-key'></i>"
|
||||
},
|
||||
"addidentity": {
|
||||
"onclick": "app.wallet.show('signup')",
|
||||
"title": "Créer une identité",
|
||||
"icon": "<i class='fs-3 bi bi-person-plus'></i>"
|
||||
},
|
||||
"info": {
|
||||
"onclick": "app.wallet.show('info')",
|
||||
"title": "En savoir plus",
|
||||
"icon": "<i class='fs-3 bi bi-info-circle'></i>"
|
||||
},
|
||||
"login": {
|
||||
"onclick": "app.wallet.show('signin')",
|
||||
"title": "S'identifier",
|
||||
"icon": "<i class='fs-3 bi bi-person-fill-check'></i>"
|
||||
},
|
||||
"back": {
|
||||
"onclick": "app.wallet.show('signin')",
|
||||
"title": "Retour",
|
||||
"icon": "<i class='fs-3 bi bi-arrow-return-left'></i>"
|
||||
}
|
||||
}
|
5
wwws/apx/src/components/signin/signin.js
Normal file
5
wwws/apx/src/components/signin/signin.js
Normal file
@@ -0,0 +1,5 @@
|
||||
var app=app||{};
|
||||
app.signin={};
|
||||
app.signin.show=()=>{
|
||||
|
||||
}
|
48
wwws/apx/src/components/signin/signin.mustache
Normal file
48
wwws/apx/src/components/signin/signin.mustache
Normal file
@@ -0,0 +1,48 @@
|
||||
<div class="card {{theme}}">
|
||||
<div class="card-body">
|
||||
<div class="m-sm-4">
|
||||
<div class="text-center">
|
||||
<img src="{{{logo}}}" alt="logo" class="img-fluid" style="max-width:180px" />
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="inputaliasauth" class="form-label">{{aliaslabel}}</label>
|
||||
<input id="inputaliasauth"
|
||||
class="form-control"
|
||||
type="text"
|
||||
placeholder="{{{aliasplaceholder}}}" />
|
||||
</div>
|
||||
<div class="mb-3 {{#nopassphrase}}d-none{{/nopassphrase}}">
|
||||
<label for="inputpassphraseauth" class="form-label">{{{passphraselabel}}}</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="inputpassphraseauth"
|
||||
placeholder="{{{passphraseplaceholder}}}">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<textarea rows="5"
|
||||
class="form-control"
|
||||
id="privatekeyauth"
|
||||
placeholder="{{privatekeyplaceholder}}"></textarea>
|
||||
<small>
|
||||
<a onclick="{{{forgetonclick}}}">{{{forgetkey}}}</a>
|
||||
</small>
|
||||
</div>
|
||||
<div>
|
||||
<label class="form-check">
|
||||
<input id="remembermeid"
|
||||
class="form-check-input bg-dark text-white"
|
||||
type="checkbox"
|
||||
value=""
|
||||
name="rememberme">
|
||||
<span class="form-check-label" for="remembermeid">{{{rememberme}}}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="text-center mt-3">
|
||||
<button class="btn btn-primary"
|
||||
onclick="apx.authentifyme(document.getElementById('inputaliasauth').value,document.getElementById('inputpassphraseauth').value,document.getElementById('privatekeyauth').value);">
|
||||
{{authentifybutton}}
|
||||
</button>
|
||||
<p class="msginfo text-danger"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
17
wwws/apx/src/components/signin/signin_fr.json
Normal file
17
wwws/apx/src/components/signin/signin_fr.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"logo": "static/img/logo/logoWhiteSimple.png",
|
||||
"commenttheme": "empty for bg-light text-dark , type bg-dark text-white for a dark theme",
|
||||
"theme": "bg-black text-light",
|
||||
"cardclass": "bg-black",
|
||||
"aliaslabel": "Votre alias (attention il est public)",
|
||||
"aliasplaceholder": "L'alias associé à votre clé public",
|
||||
"nopassphrase": true,
|
||||
"forcetrustincurrentdomain": true,
|
||||
"passphraselabel": "La passphrase de votre clé",
|
||||
"passphraseplaceholder": "Si votre clé est protégée par une passphrase",
|
||||
"passphrasecreateplaceholder": " Pour chiffrer la clé privée",
|
||||
"privatekeyplaceholder": "Coller ici votre clé privée",
|
||||
"forgetkey": "j'ai oublié ma clé",
|
||||
"rememberme": "stocker mon identité sur ce navigateur plus de 24heures. Pour supprimer la clé de ce navigateur, il suffit de se deconnecter",
|
||||
"authentifybutton": "M'authentifier"
|
||||
}
|
Reference in New Issue
Block a user