Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
TessavWalstijn committed Nov 4, 2023
2 parents 3107fcf + 77ebfd4 commit 1f38930
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/components/DataEditor/DataEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const manifestStore = useManifest()
const items = ref(manifestStore.getItems)

Check failure on line 9 in src/components/DataEditor/DataEditor.vue

View workflow job for this annotation

GitHub Actions / publish

'items' is declared but its value is never read.
const imageData = ref([])
const terms = ref([])

Check failure on line 11 in src/components/DataEditor/DataEditor.vue

View workflow job for this annotation

GitHub Actions / publish

'terms' is declared but its value is never read.
const newManifestUrl = ref('')
function renderImage(item: any) {
let width = imageData.value[0]
Expand Down Expand Up @@ -82,6 +83,23 @@ function saveAnnotations() {
//console.log(item);
//console.log(index);
})
fetch('https://nijdam.nu/maniiifision-api/manifests/save.php', {
method: 'POST',
body: JSON.stringify(manifestStore.manifest),
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
})
.then(function (response) {
return response.json()
})
.then(function (data) {
console.log(data)
newManifestUrl.value = data.url
})
console.log(JSON.stringify(manifestStore.manifest))
}
Expand Down Expand Up @@ -170,6 +188,7 @@ async function fetchTerms(name: string) {
type="button"
value="Save Annotations to new IIIF manifest"
@click="saveAnnotations()" />
{{ newManifestUrl }}
</div>
</Container>
</template>
Expand Down

0 comments on commit 1f38930

Please sign in to comment.