keep analysis result

This commit is contained in:
Julian Freeman
2025-12-02 09:47:08 -04:00
parent 61e29dae1d
commit 826459746c
2 changed files with 70 additions and 71 deletions

28
src/stores/analysis.ts Normal file
View File

@@ -0,0 +1,28 @@
// filepath: src/stores/analysis.ts
import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useAnalysisStore = defineStore('analysis', () => {
const url = ref('')
const loading = ref(false)
const error = ref('')
const metadata = ref<any>(null)
const options = ref({
is_audio_only: false,
quality: 'best',
output_path: ''
})
function reset() {
url.value = ''
loading.value = false
error.value = ''
metadata.value = null
// We keep options as is, or reset them?
// Usually keeping user preference for "Audio Only" is nice,
// but let's just reset the content-related stuff.
}
return { url, loading, error, metadata, options, reset }
})