update: remove menu
This commit is contained in:
parent
4e09bb1c52
commit
5fb9545e5c
@ -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
|
@ -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));
|
||||
|
||||
});
|
Loading…
Reference in New Issue
Block a user