Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

πŸ“± Responsivness fixes for edit menu, plus tooltip orphan fix

Alicia Sykesc9c7a9cd46ab
diff --git a/src/components/InteractiveEditor/EditModeSaveMenu.vue b/src/components/InteractiveEditor/EditModeSaveMenu.vue
index 812c3f3a..1303eea8 100644
--- a/src/components/InteractiveEditor/EditModeSaveMenu.vue
+++ b/src/components/InteractiveEditor/EditModeSaveMenu.vue
@@ -97,7 +97,7 @@ import StoreKeys from '@/utils/StoreMutations';
import EditPageInfo from '@/components/InteractiveEditor/EditPageInfo';
import EditAppConfig from '@/components/InteractiveEditor/EditAppConfig';
import EditMultiPages from '@/components/InteractiveEditor/EditMultiPages';
-import { modalNames } from '@/utils/defaults';
+import { modalNames } from '@/utils/config/defaults';
import AccessError from '@/components/Configuration/AccessError';
import SaveLocallyIcon from '@/assets/interface-icons/interactive-editor-save-locally.svg';
@@ -246,12 +246,19 @@ div.edit-mode-bottom-banner {
@include tablet-down {
display: flex;
flex-direction: column;
- .edit-banner-section,
- .edit-banner-section.intro-container {
+ .edit-banner-section {
max-width: 90%;
width: 100%;
margin: 0.2rem auto;
- flex-direction: column;
+
+ &.empty-space { display: none; }
+
+ &.save-buttons-container,
+ &.edit-config-buttons-container {
+ grid-template-columns: repeat(2, 1fr);
+ p.section-sub-title { grid-column: 1 / -1; }
+ @include very-tiny-phone { grid-template-columns: 1fr; }
+ }
}
}
/* Set colors for buttons */
diff --git a/src/directives/Tooltip.js b/src/directives/Tooltip.js
index 9cd1d6a3..46597fb5 100644
--- a/src/directives/Tooltip.js
+++ b/src/directives/Tooltip.js
@@ -276,6 +276,7 @@ function ensureGlobalClick() {
// Find the owner element via the tooltip id
const owner = document.querySelector(`[aria-describedby="${tip.id}"]`);
if (owner) hide(owner);
+ else tip.remove(); // Orphan β€” owner no longer in DOM
});
}, { capture: true });
}
@@ -358,7 +359,16 @@ export default {
unmounted(el) {
unbind(el);
- hide(el);
+ const state = el._tooltip;
+ if (state) {
+ clearTimeout(state.showTimer);
+ clearTimeout(state.hideTimer);
+ if (state.tooltipEl) state.tooltipEl.remove();
+ if (state.reposition) {
+ window.removeEventListener('scroll', state.reposition, { capture: true });
+ window.removeEventListener('resize', state.reposition);
+ }
+ }
delete el._tooltip;
},
};