diff --git a/frontend/src/animations.js b/frontend/src/animations.js index cf15aae..c7356bd 100644 --- a/frontend/src/animations.js +++ b/frontend/src/animations.js @@ -1,13 +1,20 @@ -import { fade, fly } from "svelte/transition"; +import { fade, fly, scale } from "svelte/transition"; import { cubicInOut } from "svelte/easing"; import { getItem } from "./storage"; export function maybeModalFade(node) { - return maybeFade(node, { duration: 160, easing: cubicInOut }); + return maybeFade(node, { duration: 175, easing: cubicInOut }); } -export function maybeModalFly(node) { - return maybeFly(node, { duration: 210, easing: cubicInOut, y: 15 }); +export function maybeModalScale(node) { + return maybeScale(node, { duration: 175, easing: cubicInOut, start: 0.93 }); +} + +export function maybeScale(...e) { + if (getItem("ui:doAnimations")) + return scale(...e); + else + return scale(e[0], { duration: 0 }); } export function maybeFly(...e) { diff --git a/frontend/src/components/overlays/CreateAccount.svelte b/frontend/src/components/overlays/CreateAccount.svelte index 963d3d8..7d46a29 100644 --- a/frontend/src/components/overlays/CreateAccount.svelte +++ b/frontend/src/components/overlays/CreateAccount.svelte @@ -2,7 +2,7 @@ import { overlayStore, OverlayType } from "../../stores"; import request from "../../request"; import { apiRoute } from "../../storage"; - import { maybeModalFly } from "../../animations"; + import { maybeModalScale } from "../../animations"; let username = ""; let password = ""; @@ -53,7 +53,7 @@