From 2c66718552befdbbaa6e345d00b5d75ff7123f5c Mon Sep 17 00:00:00 2001 From: Maya Date: Wed, 11 Mar 2026 17:08:09 +0300 Subject: [PATCH] feat: global settings modal, logging fixes --- messages/en.json | 1 + .../functional/FormatDropdown.svelte | 10 +- .../functional/popups/SettingsModal.svelte | 103 ++++++++++++------ src/lib/converters/vertd.svelte.ts | 4 +- src/lib/sections/settings/Privacy.svelte | 2 +- src/lib/types/file.svelte.ts | 8 -- src/routes/settings/+page.svelte | 2 +- 7 files changed, 79 insertions(+), 51 deletions(-) diff --git a/messages/en.json b/messages/en.json index 76cbf46..66262eb 100644 --- a/messages/en.json +++ b/messages/en.json @@ -88,6 +88,7 @@ "settings": "Settings", "title": "File conversion settings", "description": "Change the conversion settings for {filename} with the selected converter. These settings may not be available for all formats. This is an early beta and may have some issues.", + "all_files": "all files", "none": "No settings available for this format.", "converter": "Converter", "image": { diff --git a/src/lib/components/functional/FormatDropdown.svelte b/src/lib/components/functional/FormatDropdown.svelte index 5cb27d1..26c93cd 100644 --- a/src/lib/components/functional/FormatDropdown.svelte +++ b/src/lib/components/functional/FormatDropdown.svelte @@ -290,7 +290,10 @@ }; const settings = () => { - if (!file) return; + log( + ["dropdown", "settings"], + `opening settings modal for ${file?.name ?? "all files"}`, + ); showSettingsModal = true; }; @@ -316,7 +319,7 @@ }); -{#if showSettingsModal && file} +{#if showSettingsModal} (showSettingsModal = false)} /> {/if} @@ -442,6 +445,7 @@ : 'border-b-separator text-muted'}" onclick={() => selectCategory(category)} > + {(m as any)[`convert.dropdown.${category}`]?.()} {/each} @@ -481,7 +485,7 @@ {m["convert.archive_file.extract"]()} - {:else if file} + {:else}