change select ui

This commit is contained in:
Julian Freeman
2025-12-02 09:57:33 -04:00
parent 826459746c
commit ee4880a83b
2 changed files with 122 additions and 12 deletions

View File

@@ -2,15 +2,23 @@
<script setup lang="ts">
import { watch } from 'vue'
import { invoke } from '@tauri-apps/api/core'
import { Loader2, ChevronDown } from 'lucide-vue-next'
import { Loader2 } from 'lucide-vue-next'
import { useQueueStore } from '../stores/queue'
import { useSettingsStore } from '../stores/settings'
import { useAnalysisStore } from '../stores/analysis'
import AppSelect from '../components/ui/AppSelect.vue'
const queueStore = useQueueStore()
const settingsStore = useSettingsStore()
const analysisStore = useAnalysisStore()
const qualityOptions = [
{ label: 'Best Quality', value: 'best' },
{ label: '1080p', value: '1080' },
{ label: '720p', value: '720' },
{ label: '480p', value: '480' },
]
// Sync default download path if not set
watch(() => settingsStore.settings.download_path, (newPath) => {
if (newPath && !analysisStore.options.output_path) {
@@ -130,17 +138,11 @@ async function startDownload() {
<!-- Quality Dropdown -->
<div class="relative">
<select
v-model="analysisStore.options.quality"
class="w-full appearance-none bg-gray-50 dark:bg-zinc-800 border-none rounded-xl px-4 py-3 text-zinc-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none"
:disabled="analysisStore.options.is_audio_only"
>
<option value="best">Best Quality</option>
<option value="1080">1080p</option>
<option value="720">720p</option>
<option value="480">480p</option>
</select>
<ChevronDown class="absolute right-4 top-3.5 w-5 h-5 text-gray-400 pointer-events-none" />
<AppSelect
v-model="analysisStore.options.quality"
:options="qualityOptions"
:disabled="analysisStore.options.is_audio_only"
/>
</div>
</div>
</div>