mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 11:44:40 +00:00
format: run prettify
This commit is contained in:
@@ -1,34 +1,34 @@
|
||||
import { settingsState } from "@/seqta/utils/listeners/SettingsState";
|
||||
import { animate } from "motion"
|
||||
import { animate } from "motion";
|
||||
|
||||
import { settingsPopup } from "@/interface/hooks/SettingsPopup"
|
||||
import { settingsPopup } from "@/interface/hooks/SettingsPopup";
|
||||
|
||||
export let SettingsClicked = false
|
||||
export let SettingsClicked = false;
|
||||
|
||||
export const closeExtensionPopup = (extensionPopup?: HTMLElement) => {
|
||||
if (!extensionPopup)
|
||||
extensionPopup = document.getElementById("ExtensionPopup")!
|
||||
|
||||
extensionPopup.classList.add("hide")
|
||||
if (settingsState.animations) {
|
||||
animate(1, 0, {
|
||||
onUpdate: (progress) => {
|
||||
extensionPopup.style.opacity = Math.max(0, progress).toString()
|
||||
extensionPopup.style.transform = `scale(${Math.max(0, progress)})`
|
||||
},
|
||||
type: "spring",
|
||||
stiffness: 520,
|
||||
damping: 20,
|
||||
})
|
||||
} else {
|
||||
extensionPopup.style.opacity = "0"
|
||||
extensionPopup.style.transform = "scale(0)"
|
||||
}
|
||||
|
||||
settingsPopup.triggerClose()
|
||||
return SettingsClicked = false
|
||||
if (!extensionPopup)
|
||||
extensionPopup = document.getElementById("ExtensionPopup")!;
|
||||
|
||||
extensionPopup.classList.add("hide");
|
||||
if (settingsState.animations) {
|
||||
animate(1, 0, {
|
||||
onUpdate: (progress) => {
|
||||
extensionPopup.style.opacity = Math.max(0, progress).toString();
|
||||
extensionPopup.style.transform = `scale(${Math.max(0, progress)})`;
|
||||
},
|
||||
type: "spring",
|
||||
stiffness: 520,
|
||||
damping: 20,
|
||||
});
|
||||
} else {
|
||||
extensionPopup.style.opacity = "0";
|
||||
extensionPopup.style.transform = "scale(0)";
|
||||
}
|
||||
|
||||
export function changeSettingsClicked(newVal: boolean) {
|
||||
SettingsClicked = newVal
|
||||
}
|
||||
settingsPopup.triggerClose();
|
||||
return (SettingsClicked = false);
|
||||
};
|
||||
|
||||
export function changeSettingsClicked(newVal: boolean) {
|
||||
SettingsClicked = newVal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user