From abf1024057b1b5344c1f063163b4134c9fb40746 Mon Sep 17 00:00:00 2001 From: Lennart Kloock Date: Fri, 26 Jan 2024 00:31:29 +0100 Subject: [PATCH] chore(website): fmt --- .../settings/image-editor-dialog.svelte | 203 ++++--- .../components/settings/image-editor.svelte | 553 +++++++++--------- .../(app)/settings/profile/+page.svelte | 6 +- 3 files changed, 398 insertions(+), 364 deletions(-) diff --git a/platform/website/src/components/settings/image-editor-dialog.svelte b/platform/website/src/components/settings/image-editor-dialog.svelte index 0011ae1b..701f0f39 100644 --- a/platform/website/src/components/settings/image-editor-dialog.svelte +++ b/platform/website/src/components/settings/image-editor-dialog.svelte @@ -3,108 +3,125 @@ import Dialog from "../dialog.svelte"; import ImageEditor from "./image-editor.svelte"; import Fa from "svelte-fa"; - import { faBorderAll, faCheck, faUpRightAndDownLeftFromCenter } from "@fortawesome/free-solid-svg-icons"; + import { + faBorderAll, + faCheck, + faUpRightAndDownLeftFromCenter, + } from "@fortawesome/free-solid-svg-icons"; import Spinner from "../spinner.svelte"; - export let src: string; + export let src: string; - const dispatch = createEventDispatcher(); + const dispatch = createEventDispatcher(); - let loading = false; - let editor: ImageEditor; - let scale: number = 1; - let grid = false; + let loading = false; + let editor: ImageEditor; + let scale: number = 1; + let grid = false; - function onSubmit() { - if (!editor) return; - loading = true; - editor.calculateResult((blob) => { - loading = false; - dispatch("submit", { blob: blob }); - }); - } + function onSubmit() { + if (!editor) return; + loading = true; + editor.calculateResult((blob) => { + loading = false; + dispatch("submit", { blob: blob }); + }); + } -
-
- -
- - - -
-
-
- - -
-
+
+
+ +
+ + + +
+
+
+ + +
+
diff --git a/platform/website/src/components/settings/image-editor.svelte b/platform/website/src/components/settings/image-editor.svelte index 52abe290..6a33162a 100644 --- a/platform/website/src/components/settings/image-editor.svelte +++ b/platform/website/src/components/settings/image-editor.svelte @@ -1,280 +1,293 @@
- - 1} class:high={aspectRatio < 1} style="--scale: {scale}; --x: {x * size}px; --y: {y * size}px" alt="upload a file" /> - {#if overlay} -
- {/if} - {#if gridOverlay} -
-
-
-
-
-
-
-
-
-
-
- {/if} + + 1} + class:high={aspectRatio < 1} + style="--scale: {scale}; --x: {x * size}px; --y: {y * size}px" + alt="upload a file" + /> + {#if overlay} +
+ {/if} + {#if gridOverlay} +
+
+
+
+
+
+
+
+
+
+
+ {/if}
diff --git a/platform/website/src/routes/(app)/settings/profile/+page.svelte b/platform/website/src/routes/(app)/settings/profile/+page.svelte index 2618be6f..0e086684 100644 --- a/platform/website/src/routes/(app)/settings/profile/+page.svelte +++ b/platform/website/src/routes/(app)/settings/profile/+page.svelte @@ -255,7 +255,11 @@ /> {/if} {#if avatarSrc} - uploadProfilePicture(e.detail.blob)} /> + uploadProfilePicture(e.detail.blob)} + /> {/if}