diff --git a/document-parser/data/docling_studio.db b/document-parser/data/docling_studio.db deleted file mode 100644 index b122f5d..0000000 Binary files a/document-parser/data/docling_studio.db and /dev/null differ diff --git a/frontend/src/features/document/ui/DocumentUpload.vue b/frontend/src/features/document/ui/DocumentUpload.vue index 270ce3d..f1e900b 100644 --- a/frontend/src/features/document/ui/DocumentUpload.vue +++ b/frontend/src/features/document/ui/DocumentUpload.vue @@ -27,6 +27,8 @@ import { ref } from 'vue' import { useDocumentStore } from '../store' import { useI18n } from '../../../shared/i18n' +const emit = defineEmits<{ uploaded: [docId: string] }>() + const store = useDocumentStore() const { t } = useI18n() const fileInput = ref(null) @@ -39,7 +41,10 @@ function openFilePicker() { async function onFileSelect(e: Event) { const target = e.target as HTMLInputElement const file = target.files?.[0] - if (file) await store.upload(file) + if (file) { + const doc = await store.upload(file) + if (doc) emit('uploaded', doc.id) + } target.value = '' } @@ -47,7 +52,8 @@ async function onDrop(e: DragEvent) { dragging.value = false const file = e.dataTransfer?.files?.[0] if (file && file.type === 'application/pdf') { - await store.upload(file) + const doc = await store.upload(file) + if (doc) emit('uploaded', doc.id) } } diff --git a/frontend/src/pages/HomePage.vue b/frontend/src/pages/HomePage.vue index c1f2285..8c7241f 100644 --- a/frontend/src/pages/HomePage.vue +++ b/frontend/src/pages/HomePage.vue @@ -11,7 +11,7 @@
- +
@@ -71,6 +71,10 @@ const docCount = computed(() => documentStore.documents.length) const analysisCount = computed(() => historyStore.analyses.length) const recentDocs = computed(() => documentStore.documents.slice(0, 5)) +function onUploaded() { + router.push('/studio') +} + function openInStudio(doc: Document) { documentStore.select(doc.id) router.push('/studio')