diff --git a/frontend/src/animations.js b/frontend/src/animations.js index 1fb8a06..3250183 100644 --- a/frontend/src/animations.js +++ b/frontend/src/animations.js @@ -1,8 +1,22 @@ import { fade, fly, scale } from "svelte/transition"; -import { cubicInOut } from "svelte/easing"; +import { cubicInOut, linear } from "svelte/easing"; import { getItem } from "./storage"; import { smallViewport } from "./stores"; + +// Function specific for the Login and CreateAccount modals, where the transition duration is relied upon +export function maybeModalFadeIf(...e) { + if (e[1] && e[1]._condition) + return maybeModalFade(e[0]); + else + return { + delay: 0, + duration: e[1].duration, + easing: e[1].easing, + css: (_t) => "" + }; +} + export function maybeModalFade(node) { return maybeFade(node, { duration: 175, easing: cubicInOut }); } diff --git a/frontend/src/components/overlays/AddCommunity.svelte b/frontend/src/components/overlays/AddCommunity.svelte index 44163e6..6410691 100644 --- a/frontend/src/components/overlays/AddCommunity.svelte +++ b/frontend/src/components/overlays/AddCommunity.svelte @@ -1,7 +1,7 @@ - + + Create Community - + + + + + diff --git a/frontend/src/components/overlays/CreateAccount.svelte b/frontend/src/components/overlays/CreateAccount.svelte index 6e1bbd5..ba0401e 100644 --- a/frontend/src/components/overlays/CreateAccount.svelte +++ b/frontend/src/components/overlays/CreateAccount.svelte @@ -1,7 +1,7 @@ -