Remove classic mobile quick actions
This commit is contained in:
parent
54024d6bcd
commit
5adff65791
@ -526,10 +526,10 @@
|
|||||||
let current = '#tab-organic';
|
let current = '#tab-organic';
|
||||||
const isMobileView = () => window.matchMedia('(max-width: 1023px)').matches;
|
const isMobileView = () => window.matchMedia('(max-width: 1023px)').matches;
|
||||||
const updateMobileActionBarVisibility = () => {
|
const updateMobileActionBarVisibility = () => {
|
||||||
if (!mobileActionBar) return;
|
|
||||||
const modalOpen = !!document.querySelector('.color-modal:not(.hidden)');
|
const modalOpen = !!document.querySelector('.color-modal:not(.hidden)');
|
||||||
const shouldShow = current === '#tab-organic' && isMobileView() && !modalOpen;
|
const isMobile = isMobileView();
|
||||||
mobileActionBar.classList.toggle('hidden', !shouldShow);
|
const showOrganic = isMobile && !modalOpen && current === '#tab-organic';
|
||||||
|
if (mobileActionBar) mobileActionBar.classList.toggle('hidden', !showOrganic);
|
||||||
};
|
};
|
||||||
const wireMobileActionButtons = () => {
|
const wireMobileActionButtons = () => {
|
||||||
const guardOrganic = () => current === '#tab-organic';
|
const guardOrganic = () => current === '#tab-organic';
|
||||||
@ -549,6 +549,7 @@
|
|||||||
on('mobile-act-export', () => clickBtn('[data-export="png"]'));
|
on('mobile-act-export', () => clickBtn('[data-export="png"]'));
|
||||||
};
|
};
|
||||||
wireMobileActionButtons();
|
wireMobileActionButtons();
|
||||||
|
|
||||||
window.addEventListener('resize', updateMobileActionBarVisibility);
|
window.addEventListener('resize', updateMobileActionBarVisibility);
|
||||||
function setTab(id, isInitial = false) {
|
function setTab(id, isInitial = false) {
|
||||||
if (!id || !document.querySelector(id)) id = '#tab-organic';
|
if (!id || !document.querySelector(id)) id = '#tab-organic';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user