The next-generation file converter. Open source, fully local* and free forever.
feat: beta badge + tooltip
JovannMC90103e6273eb
diff --git a/messages/en.json b/messages/en.jsonindex df485b7..ba1fd79 100644--- a/messages/en.json+++ b/messages/en.json@@ -93,7 +93,11 @@"settings": {"settings": "Settings","title": "File conversion settings",- "description": "Change the conversion settings for <b>{filename}</b> with the selected converter. These settings may not be available for all formats. <b>This is an early beta and may have some issues.</b>",+ "badge": {+ "text": "BETA",+ "tooltip": "Early feature preview - may have some issues."+ },+ "description": "Change the conversion settings for <b>{filename}</b> with the selected converter. These settings may not be available for all formats.","all_files": "all files","none": "No settings available for this format.","converter": "Converter",diff --git a/src/lib/components/functional/popups/Modal.svelte b/src/lib/components/functional/popups/Modal.svelteindex d21f1f4..a273b87 100644--- a/src/lib/components/functional/popups/Modal.svelte+++ b/src/lib/components/functional/popups/Modal.svelte@@ -1,18 +1,26 @@<script lang="ts">+ import Tooltip from "$lib/components/visual/Tooltip.svelte";import { duration, fade } from "$lib/util/animation";import type { SearchIcon } from "@lucide/svelte";import { quintOut } from "svelte/easing";- interface ModalButton {+ export interface ModalButton {text: string;action: () => void;primary?: boolean;}- interface Props {+ export interface ModalBadge {+ text: string;+ tooltip?: string;+ color: string;+ }++ export interface Props {icon: typeof SearchIcon;title: string;color: string;+ badge: ModalBadge | null;buttons: ModalButton[];// eslint-disable-next-line @typescript-eslint/no-explicit-anychildren: () => any;@@ -23,6 +31,7 @@icon: Icon,title,color,+ badge,buttons,children,onclose,@@ -90,6 +99,23 @@<Icon size="16" color="black" /></div><p class="text-lg font-semibold">{title}</p>+ {#if badge && badge.text}+ {#if badge.tooltip}+ <Tooltip text={badge.tooltip} position="bottom">+ <div+ class="rounded-md bg-{badge.color} px-1.5 py-0.5 text-sm font-display text-white"+ >+ {badge.text}+ </div>+ </Tooltip>+ {:else}+ <div+ class="rounded-md bg-{badge.color} px-1.5 py-0.5 text-sm font-display text-white"+ >+ {badge.text}+ </div>+ {/if}+ {/if}</div></div>diff --git a/src/lib/components/functional/popups/SettingsModal.svelte b/src/lib/components/functional/popups/SettingsModal.svelteindex 8f2b182..539741b 100644--- a/src/lib/components/functional/popups/SettingsModal.svelte+++ b/src/lib/components/functional/popups/SettingsModal.svelte@@ -97,6 +97,11 @@icon={SearchIcon}title={m["convert.settings.title"]()}color="purple"+ badge={{+ text: m["convert.settings.badge.text"](),+ tooltip: m["convert.settings.badge.tooltip"](),+ color: "accent-pink",+ }}buttons={[{text: "Cancel",diff --git a/src/lib/converters/ffmpeg/ffmpeg.codecs.ts b/src/lib/converters/ffmpeg/ffmpeg.codecs.tsindex 7d68288..4bf0562 100644--- a/src/lib/converters/ffmpeg/ffmpeg.codecs.ts+++ b/src/lib/converters/ffmpeg/ffmpeg.codecs.ts@@ -1,7 +1,6 @@// prettier-ignoreexport const animatedImageFormats = ["gif", "webp", "apng"];-export const getCodecs = (ext: string,isAlac: boolean = false,diff --git a/src/lib/converters/ffmpeg/ffmpeg.svelte.ts b/src/lib/converters/ffmpeg/ffmpeg.svelte.tsindex 70c63ed..704c157 100644--- a/src/lib/converters/ffmpeg/ffmpeg.svelte.ts+++ b/src/lib/converters/ffmpeg/ffmpeg.svelte.ts@@ -6,10 +6,7 @@ import { error, log } from "$lib/util/logger";import { m } from "$lib/paraglide/messages";import { Settings } from "$lib/sections/settings/index.svelte";import { ToastManager } from "$lib/util/toast.svelte";-import {- getCodecs,- toArgs,-} from "./ffmpeg.codecs";+import { getCodecs, toArgs } from "./ffmpeg.codecs";import { buildImageSequenceCommand } from "./ffmpeg.animated";import { extractAlbumArt, avWithArt, avWithBg } from "./utils/ffmpeg";import type {