update: remove menu

This commit is contained in:
Jean-Baptiste Pasquier 2019-08-08 16:00:16 +02:00
parent 4e09bb1c52
commit 5fb9545e5c
No known key found for this signature in database
GPG Key ID: F2702E6D22ED4D62
2 changed files with 34 additions and 33 deletions

View File

@ -1,26 +1,26 @@
.views-container
#circle-chat
include page-circle-chat.pug
#circle-profile
include page-circle-profile.pug
#circle-edit
include page-circle-edit.pug
#circle-create
include page-circle-create.pug
nav.jsRightMenu(role='navigation')
sib-router(default-route='circle-chat')
ul
li.jsOffsiteToggle
a Fold menu
sib-route(name='circle-chat')
li
a Chat
sib-route(name='circle-profile')
li
a Information
sib-route(name='circle-edit')
//- #circle-profile
//- include page-circle-profile.pug
//- #circle-edit
//- include page-circle-edit.pug
//- #circle-create
//- include page-circle-create.pug
//- nav.jsRightMenu(role='navigation')
//- sib-router(default-route='circle-chat')
//- ul
//- li.jsOffsiteToggle
//- a Fold menu
//- sib-route(name='circle-chat')
//- li
//- a Edit
sib-route(name='circle-create')
//- a Chat
//- sib-route(name='circle-profile')
//- li
//- a Add new
//- a Information
//- sib-route(name='circle-edit')
//- //- li
//- //- a Edit
//- sib-route(name='circle-create')
//- //- li
//- //- a Add new

View File

@ -35,15 +35,16 @@ document.addEventListener('DOMContentLoaded', function (event) {
});
});
//- Header login hide/show
// if(document.querySelector('sib-auth').getUser() !== null) {
// document.querySelector('button[role="log in"]').style.display = 'none';
// //- Token expired, hack for ask relogin
// if(new Date(document.querySelector('sib-auth').getUser().expires_at*1000) <= new Date()) {
// document.querySelector('button[role="log in"]').style.display = '';
// document.querySelector('button[role="log in"]').style.color = 'red';
// document.querySelector('button[role="log in"]').innerHTML = 'Re-login';
// }
// }
document.querySelector('sib-auth').getUser().then(user => {
if(user !== null) {
document.querySelector('button[role="log in"]').style.display = 'none';
//- Token expired, hack for ask relogin
if(new Date(document.querySelector('sib-auth').getUser().expires_at*1000) <= new Date()) {
document.querySelector('button[role="log in"]').style.display = '';
document.querySelector('button[role="log in"]').style.color = 'red';
document.querySelector('button[role="log in"]').innerHTML = 'Re-login';
}
}
}).catch(error => console.log(error));
});