From ec768ebfc21ef1eb01c2be418f42d31c74883a64 Mon Sep 17 00:00:00 2001 From: wukko Date: Sun, 21 Jul 2024 16:34:37 +0600 Subject: [PATCH] web/settings/metadata: basic filename preview component --- web/i18n/en/settings.json | 3 + .../settings/FilenamePreview.svelte | 83 +++++++++++++++++++ .../settings/save/metadata/+page.svelte | 2 + 3 files changed, 88 insertions(+) create mode 100644 web/src/components/settings/FilenamePreview.svelte diff --git a/web/i18n/en/settings.json b/web/i18n/en/settings.json index 0d20cc15..c761ff85 100644 --- a/web/i18n/en/settings.json +++ b/web/i18n/en/settings.json @@ -65,6 +65,9 @@ "metadata.filename.nerdy": "nerdy", "metadata.filename.description": "filename style using which cobalt files will be downloaded. this description is temporary as there's no dynamic preview component yet.", + "metadata.filename.preview.video": "Video Title", + "metadata.filename.preview.audio": "Audio Title - Audio Author", + "metadata.file": "file metadata", "metadata.disable.title": "disable file metadata", "metadata.disable.description": "title, artist, and other info will not be added to the file.", diff --git a/web/src/components/settings/FilenamePreview.svelte b/web/src/components/settings/FilenamePreview.svelte new file mode 100644 index 00000000..64fce4f4 --- /dev/null +++ b/web/src/components/settings/FilenamePreview.svelte @@ -0,0 +1,83 @@ + + +
+
+ {videoFilePreview}.{youtubeVideoExt} +
+
+ {audioFilePreview}.{audioFormat} +
+
+ + diff --git a/web/src/routes/settings/save/metadata/+page.svelte b/web/src/routes/settings/save/metadata/+page.svelte index 91c3d621..1da7010f 100644 --- a/web/src/routes/settings/save/metadata/+page.svelte +++ b/web/src/routes/settings/save/metadata/+page.svelte @@ -7,6 +7,7 @@ import Switcher from "$components/buttons/Switcher.svelte"; import SettingsButton from "$components/buttons/SettingsButton.svelte"; import SettingsToggle from "$components/buttons/SettingsToggle.svelte"; + import FilenamePreview from "$components/settings/FilenamePreview.svelte"; @@ -24,6 +25,7 @@ {/each} +