Some cleanup.
This commit is contained in:
parent
58d4bfb948
commit
297f5caf82
1 changed files with 3 additions and 11 deletions
|
@ -303,22 +303,15 @@ window.Umi = { UI: {}, Protocol: { SockChat: { Protocol: {} } } };
|
||||||
'click': function() {
|
'click': function() {
|
||||||
const sidebar = $c('sidebar')[0];
|
const sidebar = $c('sidebar')[0];
|
||||||
const toggle = Umi.UI.Toggles.Get('menu-toggle');
|
const toggle = Umi.UI.Toggles.Get('menu-toggle');
|
||||||
const toggleOpened = 'sidebar__selector-mode--menu-toggle-opened';
|
const isClosed = toggle.classList.contains('sidebar__selector-mode--menu-toggle-closed');
|
||||||
const toggleClosed = 'sidebar__selector-mode--menu-toggle-closed';
|
|
||||||
const isClosed = toggle.classList.contains(toggleClosed);
|
|
||||||
|
|
||||||
if(sidebarAnimation !== null) {
|
if(sidebarAnimation !== null) {
|
||||||
sidebarAnimation.cancel();
|
sidebarAnimation.cancel();
|
||||||
sidebarAnimation = null;
|
sidebarAnimation = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isClosed) {
|
toggle.classList.toggle('sidebar__selector-mode--menu-toggle-opened', isClosed);
|
||||||
toggle.classList.add(toggleOpened);
|
toggle.classList.toggle('sidebar__selector-mode--menu-toggle-closed', !isClosed);
|
||||||
toggle.classList.remove(toggleClosed);
|
|
||||||
} else {
|
|
||||||
toggle.classList.add(toggleClosed);
|
|
||||||
toggle.classList.remove(toggleOpened);
|
|
||||||
}
|
|
||||||
|
|
||||||
let update;
|
let update;
|
||||||
if(isClosed)
|
if(isClosed)
|
||||||
|
@ -533,7 +526,6 @@ window.Umi = { UI: {}, Protocol: { SockChat: { Protocol: {} } } };
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// really not sure about all the watchers for the protocol just kinda being Listed here but we'll see i guess
|
|
||||||
loadingOverlay.setMessage('Connecting...');
|
loadingOverlay.setMessage('Connecting...');
|
||||||
|
|
||||||
const setLoadingOverlay = async (icon, header, message, optional) => {
|
const setLoadingOverlay = async (icon, header, message, optional) => {
|
||||||
|
|
Loading…
Reference in a new issue