From f31ea55ca06b9202adebfb0344be85a95d0af697 Mon Sep 17 00:00:00 2001 From: arabcoders Date: Tue, 19 Aug 2025 23:06:46 +0300 Subject: [PATCH 1/3] Fixed order by and sorting --- ui/app/components/YTDLPOptions.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ui/app/components/YTDLPOptions.vue b/ui/app/components/YTDLPOptions.vue index 5ca1470b..2d23f5b2 100644 --- a/ui/app/components/YTDLPOptions.vue +++ b/ui/app/components/YTDLPOptions.vue @@ -267,12 +267,16 @@ const grouped = computed<{ name: string, items: YTDLPOption[] }[]>(() => { map.get(key)!.push(o) } - const out = Array.from(map.entries()).map(([name, items]) => { - items.sort((a, b) => (a.flags[0] || '').localeCompare(b.flags[0] || '')) - return { name, items } - }) + const dir = 'asc' === sortDir.value ? 1 : -1 + const out = Array.from(map.entries()).map(([name, items]) => ({ name, items })) + + if ('group' === sortBy.value) { + out.sort((a, b) => a.name.localeCompare(b.name) * dir) + } else { + // When sorting by flag, groups should still be in alphabetical order + out.sort((a, b) => a.name.localeCompare(b.name)) + } - out.sort((a, b) => a.name.localeCompare(b.name)) return out }) From a0533a08611ac5b35cb79800970c09dc8dc4b69f Mon Sep 17 00:00:00 2001 From: arabcoders Date: Wed, 20 Aug 2025 16:19:43 +0300 Subject: [PATCH 2/3] Added autocomplete for cli options --- ui/app/assets/css/style.css | 8 +- ui/app/components/ConditionForm.vue | 34 +- ui/app/components/DLFields.vue | 16 +- ui/app/components/GetInfo.vue | 5 +- ui/app/components/InputAutocomplete.vue | 133 +++++ ui/app/components/NewDownload.vue | 40 +- ui/app/components/PresetForm.vue | 36 +- ui/app/components/TaskForm.vue | 33 +- ui/app/components/TextareaAutocomplete.vue | 136 +++++ ui/app/components/YTDLPOptions.vue | 8 +- ui/app/layouts/default.vue | 16 +- ui/app/pages/tasks.vue | 2 +- ui/app/stores/ConfigStore.ts | 1 + ui/app/types/autocomplete.d.ts | 9 + ui/app/types/config.d.ts | 3 + ui/app/types/ytdlp.d.ts | 8 + ui/package.json | 4 +- ui/pnpm-lock.yaml | 607 ++++++++++----------- uv.lock | 12 +- 19 files changed, 724 insertions(+), 387 deletions(-) create mode 100644 ui/app/components/InputAutocomplete.vue create mode 100644 ui/app/components/TextareaAutocomplete.vue create mode 100644 ui/app/types/autocomplete.d.ts create mode 100644 ui/app/types/ytdlp.d.ts diff --git a/ui/app/assets/css/style.css b/ui/app/assets/css/style.css index f4db7fe0..17fefacd 100644 --- a/ui/app/assets/css/style.css +++ b/ui/app/assets/css/style.css @@ -358,9 +358,11 @@ div.is-centered { justify-content: center; } - .modal-content-max { - width: max-content; + width: calc(100% - 20px); + max-width: 1344px; + min-width: 320px; + box-sizing: border-box; padding: 0; - margin: 0; + margin: 0 auto; } diff --git a/ui/app/components/ConditionForm.vue b/ui/app/components/ConditionForm.vue index ee1edaa7..e7ff9fed 100644 --- a/ui/app/components/ConditionForm.vue +++ b/ui/app/components/ConditionForm.vue @@ -90,22 +90,20 @@
-