diff --git a/app/components/Base/Collapsible.vue b/app/components/Base/Collapsible.vue index 91b701c..93f33f2 100644 --- a/app/components/Base/Collapsible.vue +++ b/app/components/Base/Collapsible.vue @@ -1,15 +1,13 @@ @@ -30,7 +28,7 @@ const amountOfChanges = computed(() => {
- + {{ amountOfChanges }} unsaved change{{ amountOfChanges === 1 ? '' : 's' }} diff --git a/app/components/Editor/Categories.vue b/app/components/Editor/Categories.vue index 67980dc..99af714 100644 --- a/app/components/Editor/Categories.vue +++ b/app/components/Editor/Categories.vue @@ -2,6 +2,10 @@ import type { IPTCFieldWithValue } from '~/utils/iptc-iim/types' import { categories } from '~/utils/iptc-iim/categories' +defineProps<{ + fileId: string +}>() + const state = defineModel() const categoryKeys = new Set(categories.map((category) => { @@ -85,13 +89,14 @@ function updateExtraField(updatedFields: (IPTCFieldWithValue & { type: 'extra' }
-
+
diff --git a/app/components/Editor/Container.vue b/app/components/Editor/Container.vue index 8d5c1ca..04333e7 100644 --- a/app/components/Editor/Container.vue +++ b/app/components/Editor/Container.vue @@ -1,44 +1,31 @@ diff --git a/app/components/Editor/Field.vue b/app/components/Editor/Field.vue index f9c86b3..1b94c14 100644 --- a/app/components/Editor/Field.vue +++ b/app/components/Editor/Field.vue @@ -1,27 +1,95 @@ diff --git a/app/components/Editor/Field/Date.vue b/app/components/Editor/Field/Date.vue index 8e05a7c..7148a2f 100644 --- a/app/components/Editor/Field/Date.vue +++ b/app/components/Editor/Field/Date.vue @@ -2,7 +2,9 @@ import type { IPTCFieldWithValue } from '~/utils/iptc-iim/types' import { CalendarDate } from '@internationalized/date' -defineProps<{ +const props = defineProps<{ + fileId: string + original?: string disabled?: boolean required?: boolean }>() @@ -51,11 +53,12 @@ function updateDate(newDate?: CalendarDate) { } } -const hasChanged = useHasChanged(field) +const fileId = computed(() => props.fileId) +const hasChanged = useHasChanged(fileId, field)