added i18n, refactoring

This commit is contained in:
Bachir Soussi Chiadmi
2018-02-20 14:26:09 +01:00
parent b8ae4dc3db
commit 7d6ff629b5
11 changed files with 218 additions and 94 deletions
+10 -14
View File
@@ -43,7 +43,7 @@ var _Dot = {
oninit(vn){
this.id = vn.attrs.id;
this.type = vn.attrs.type;
this.title = vn.attrs.title || "title";
this.setuptext(vn);
if(typeof vn.attrs.active !== 'undefined')
@@ -352,18 +352,14 @@ module.exports = {
_Ui.init();
},
view(vn){
console.log('_ModeConnections view', vn.attrs.lang);
return [
m(_Header),
m('main', {id:"content", 'class':'mode-connections'}, _dbs.data[vn.attrs.lang].map(p => {
if(p.id == 'intro'){
return m(_Intro,p);
}else{
return m(_Part,p);
}
})
),
m(_Footer)
];
// console.log('_ModeConnections view', vn.attrs.lang);
return m('main', {id:"content", 'class':'mode-connections'}, _dbs.data[vn.attrs.lang].map(p => {
if(p.id == 'intro'){
return m(_Intro,p);
}else{
return m(_Part,p);
}
})
);
}
}