Some cleanup.

This commit is contained in:
Pachira 2024-04-17 18:08:12 +00:00
parent 58d4bfb948
commit 297f5caf82

View file

@ -303,22 +303,15 @@ window.Umi = { UI: {}, Protocol: { SockChat: { Protocol: {} } } };
'click': function() {
const sidebar = $c('sidebar')[0];
const toggle = Umi.UI.Toggles.Get('menu-toggle');
const toggleOpened = 'sidebar__selector-mode--menu-toggle-opened';
const toggleClosed = 'sidebar__selector-mode--menu-toggle-closed';
const isClosed = toggle.classList.contains(toggleClosed);
const isClosed = toggle.classList.contains('sidebar__selector-mode--menu-toggle-closed');
if(sidebarAnimation !== null) {
sidebarAnimation.cancel();
sidebarAnimation = null;
}
if(isClosed) {
toggle.classList.add(toggleOpened);
toggle.classList.remove(toggleClosed);
} else {
toggle.classList.add(toggleClosed);
toggle.classList.remove(toggleOpened);
}
toggle.classList.toggle('sidebar__selector-mode--menu-toggle-opened', isClosed);
toggle.classList.toggle('sidebar__selector-mode--menu-toggle-closed', !isClosed);
let update;
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...');
const setLoadingOverlay = async (icon, header, message, optional) => {