From 4c65aee867c6f651583905e43d9e85ab9faaaf19 Mon Sep 17 00:00:00 2001 From: JovannMC Date: Tue, 18 Feb 2025 20:56:30 +0300 Subject: [PATCH 1/4] feat: add converter status to category cards --- src/lib/converters/ffmpeg.svelte.ts | 2 +- src/routes/+page.svelte | 43 +++++++++++++++++++++++------ 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/src/lib/converters/ffmpeg.svelte.ts b/src/lib/converters/ffmpeg.svelte.ts index 963b975..bfb8fc4 100644 --- a/src/lib/converters/ffmpeg.svelte.ts +++ b/src/lib/converters/ffmpeg.svelte.ts @@ -32,6 +32,7 @@ export class FFmpegConverter extends Converter { log(["converters", this.name], `created converter`); if (!browser) return; try { + // this is just to cache the wasm and js for when we actually use it. we're not using this ffmpeg instance this.ffmpeg = new FFmpeg(); (async () => { const baseURL = @@ -40,7 +41,6 @@ export class FFmpegConverter extends Converter { coreURL: `${baseURL}/ffmpeg-core.js`, wasmURL: `${baseURL}/ffmpeg-core.wasm`, }); - // this is just to cache the wasm and js for when we actually use it. we're not using this ffmpeg instance this.ready = true; })(); } catch (err) { diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 1555deb..206721f 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -11,17 +11,29 @@ import Uploader from "$lib/components/functional/Uploader.svelte"; import { converters } from "$lib/converters"; + import { vertdLoaded } from "$lib/store/index.svelte"; import { AudioLines, Check, Film, Image } from "lucide-svelte"; const getSupportedFormats = (name: string) => converters.find((c) => c.name === name)?.supportedFormats.join(", ") || "none"; - const supportedFormats = { - images: getSupportedFormats("libvips"), - audio: getSupportedFormats("ffmpeg"), - video: getSupportedFormats("vertd"), - }; + const status = $derived({ + images: { + ready: converters.find((c) => c.name === "libvips")?.ready, + formats: getSupportedFormats("libvips"), + }, + audio: { + ready: converters.find((c) => c.name === "ffmpeg")?.ready, + formats: getSupportedFormats("ffmpeg"), + }, + video: { + ready: + converters.find((c) => c.name === "vertd")?.ready && + $vertdLoaded, + formats: getSupportedFormats("vertd"), + }, + });
@@ -66,9 +78,13 @@

Fully supported

+

+ Status: + {status.images.ready ? "ready" : "not ready"} +

Supported formats: - {supportedFormats.images} + {status.images.formats}

@@ -85,9 +101,13 @@

Fully supported

+

+ Status: + {status.audio.ready ? "ready" : "not ready"} +

Supported formats: - {supportedFormats.audio} + {status.audio.formats}

@@ -107,7 +127,14 @@ >Learn more.

-

Supported formats: {supportedFormats.video}

+

+ Status: + {status.video.ready ? "ready" : "not ready"} +

+

+ Supported formats: + {status.video.formats} +

From 10c7b035a21f5f887f576922eabdeb30a5630878 Mon Sep 17 00:00:00 2001 From: JovannMC Date: Thu, 20 Feb 2025 20:37:44 +0300 Subject: [PATCH 2/4] feat: add email to about page --- src/lib/sections/about/Vertd.svelte | 51 ++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/src/lib/sections/about/Vertd.svelte b/src/lib/sections/about/Vertd.svelte index 27502df..8f97b4f 100644 --- a/src/lib/sections/about/Vertd.svelte +++ b/src/lib/sections/about/Vertd.svelte @@ -1,8 +1,18 @@ @@ -24,11 +34,34 @@ -

- Want to support us? Contact a developer in the Discord server! -

- -
+
+

+ Want to support us? Contact a developer in the Discord + server, or send an email to + ! +

+
+ + + From 90ca53c2a5ea09b1cbbe59e648182263d2ce9090 Mon Sep 17 00:00:00 2001 From: JovannMC Date: Thu, 20 Feb 2025 20:45:16 +0300 Subject: [PATCH 3/4] feat: show check icon and toast when copied --- src/lib/sections/about/Vertd.svelte | 55 +++++++++++++++++------------ 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/src/lib/sections/about/Vertd.svelte b/src/lib/sections/about/Vertd.svelte index 8f97b4f..61b914c 100644 --- a/src/lib/sections/about/Vertd.svelte +++ b/src/lib/sections/about/Vertd.svelte @@ -1,14 +1,22 @@ @@ -90,4 +94,4 @@ easing: quintOut, }} > -{/if} \ No newline at end of file +{/if} diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index a793d0f..c8af493 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,6 +1,6 @@