Commit 6da25072 authored by schneider210's avatar schneider210
Browse files

bugfix: set itemurl on init && [minor] fix indent

parent 3488d877
Pipeline #131902 passed with stages
in 4 minutes and 8 seconds
......@@ -87,6 +87,7 @@ export default {
if (this.itemurl !== node.label) {
this.$root.$emit('update-item', node.label);
}
let idx = 0;
this.itemurls.forEach((item, index) => {
if (item === node.label) {
......@@ -110,7 +111,7 @@ export default {
if (Object.keys(this.collection).length) {
return data.title && data.title[0].title ? data.title[0].title : data.label;
}
return 'Manifest';
return data.label ? data.label : 'Manifest <small>(No label available)</small>';
},
getManifest(url, seqidx) {
this.request(url)
......@@ -121,15 +122,15 @@ export default {
this.label = this.getLabel(data);
}
this.tree[0].children.push(
{ label: data.label, children: this.getItemurls(data.sequence, seqidx) },
);
if (Array.isArray(data.sequence) && data.sequence[0] !== 'undefined') {
data.sequence.map((seq) => this.itemurls.push(seq.id));
}
this.tree[0].children.push(
{ label: data.label, children: this.getItemurls(data.sequence, seqidx) },
);
// make sure that urls are set just once on init
if (!this.itemurl) {
if (!this.itemurl && data.sequence[0]) {
this.itemurl = data.sequence[0].id;
this.getImageUrl(this.itemurl);
}
......
......@@ -16,7 +16,7 @@
:name="fasArrowLeft"
size="24px"
class="q-pr-sm"
/>
/>
{{ captionprev }}
</q-btn>
......@@ -27,12 +27,12 @@
type="number"
placeholder="Page"
dense
>
>
<template v-slot:append>
<q-icon
:name="fasCheck"
size="20px"
/>
/>
</template>
</q-input>
......@@ -53,7 +53,7 @@
:name="fasArrowRight"
size="24px"
class="q-pl-sm"
/>
/>
</q-btn>
</div>
</template>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment