From cbf9550f0b185db30347d16e521d3dc6ef025db6 Mon Sep 17 00:00:00 2001 From: Paulo Porto Date: Wed, 27 May 2026 11:08:37 -0300 Subject: [PATCH] =?UTF-8?q?Ajustes=20visuais=20no=20comportamento=20da=20f?= =?UTF-8?q?un=C3=A7=C3=A3o=20de=20mostrar/ocultar=20a=20sidebar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content-script.js | 51 ++++----------------------------- page-bridge.js | 8 +++--- src/content/styles.css | 56 +++++++++++++++++++++++++++++++++++-- src/views/dashboard-view.js | 17 +++++++++++ 4 files changed, 79 insertions(+), 53 deletions(-) diff --git a/content-script.js b/content-script.js index cfbda10..a3818b6 100644 --- a/content-script.js +++ b/content-script.js @@ -285,44 +285,10 @@ return; } + mount?.remove(); hcmTile?.remove(); - - const header = document.querySelector(SELECTORS.header); - const functionsContainer = header?.querySelector(SELECTORS.functions); - const anchor = functionsContainer ? findUserAnchor(functionsContainer) : null; - - if (!header || !functionsContainer) { - return; - } - - ensureStyles(); - - const themedMount = mount ?? createMount(); - const overlay = ensureModal(); - - applyTheme(header, functionsContainer, anchor, themedMount, overlay); - - const targetSibling = resolveInsertionTarget( - functionsContainer, - anchor, - themedMount - ); - - if ( - themedMount.parentElement !== functionsContainer || - themedMount.nextElementSibling !== targetSibling - ) { - const verifiedTarget = - targetSibling && targetSibling.parentElement === functionsContainer - ? targetSibling - : null; - - if (verifiedTarget) { - functionsContainer.insertBefore(themedMount, verifiedTarget); - } else { - functionsContainer.appendChild(themedMount); - } - } + removeModal(); + unlockScroll(); } function createMount() { @@ -507,7 +473,8 @@ if ( action === "calendar-prev" || action === "calendar-next" || - action === "calendar-today" + action === "calendar-today" || + action === "toggle-sidebar" ) { return `[data-action="${action}"]`; } @@ -559,14 +526,6 @@ ${getHeaderSummary()} - +

Current user

${renderCurrentUserSidebar(user)}