fixed minor bugs with ExtensionPopup not closing menus on close

This commit is contained in:
SethBurkart123
2023-11-29 07:06:24 +11:00
parent e3b381f85e
commit 6744069254
3 changed files with 22 additions and 2 deletions
View File
+6 -1
View File
@@ -811,8 +811,9 @@ export function closeSettings() {
'#ExtensionPopup', '#ExtensionPopup',
{ opacity: [1, 0], scale: [1, 0] }, { opacity: [1, 0], scale: [1, 0] },
{ easing: spring({ stiffness: 220, damping: 18 }) } { easing: spring({ stiffness: 220, damping: 18 }) }
); );
SettingsClicked = false; SettingsClicked = false;
document.getElementById('ExtensionIframe').contentWindow.postMessage('popupClosed', '*');
} }
extensionsettings.classList.add('hide'); extensionsettings.classList.add('hide');
@@ -841,6 +842,7 @@ function addExtensionSettings() {
extensionPopup.appendChild(extensionIframe); extensionPopup.appendChild(extensionIframe);
const container = document.getElementById('container'); const container = document.getElementById('container');
const closeExtensionPopup = () => { const closeExtensionPopup = () => {
extensionPopup.classList.add('hide'); extensionPopup.classList.add('hide');
animate( animate(
@@ -848,8 +850,10 @@ function addExtensionSettings() {
{ opacity: [1, 0], scale: [1, 0] }, { opacity: [1, 0], scale: [1, 0] },
{ easing: [.22, .03, .26, 1] } { easing: [.22, .03, .26, 1] }
); );
document.getElementById('ExtensionIframe').contentWindow.postMessage('popupClosed', '*');
SettingsClicked = false; SettingsClicked = false;
}; };
container.onclick = (event) => { container.onclick = (event) => {
if (event.target.closest('#AddedSettings') == null && SettingsClicked) { if (event.target.closest('#AddedSettings') == null && SettingsClicked) {
closeExtensionPopup() closeExtensionPopup()
@@ -1317,6 +1321,7 @@ async function AddBetterSEQTAElements(toggle) {
{ opacity: [1, 0], scale: [1, 0] }, { opacity: [1, 0], scale: [1, 0] },
{ easing: spring({ stiffness: 220, damping: 18 }) } { easing: spring({ stiffness: 220, damping: 18 }) }
); );
document.getElementById('ExtensionIframe').contentWindow.postMessage('popupClosed', '*');
SettingsClicked = false; SettingsClicked = false;
} else { } else {
extensionPopup.classList.remove('hide'); extensionPopup.classList.remove('hide');
+16 -1
View File
@@ -79,7 +79,7 @@ html {
button { button {
background: var(--background-primary) !important; background: var(--background-primary) !important;
height: auto; height: auto;
padding: 8px 16px !important; padding: 4px 16px !important;
overflow: clip !important; overflow: clip !important;
&.depressed { &.depressed {
@@ -90,10 +90,25 @@ html {
} }
} }
.PillBox__PillBox___3GjAk {
border-radius: 1rem;
overflow: hidden;
border: var(--background-secondary) 1px solid;
.PillBox__active___3Qpi9 {
background: var(--background-secondary) !important;
}
}
.legacy-root button:active, .legacy-root a:active { .legacy-root button:active, .legacy-root a:active {
background-image: unset !important; background-image: unset !important;
} }
.ace_editor {
border-radius: 1rem;
border-top: none !important;
}
#main > .dashboard { #main > .dashboard {
grid-template-columns: repeat(autofit, minmax(200px, 400px)) !important; grid-template-columns: repeat(autofit, minmax(200px, 400px)) !important;
background: unset; background: unset;