Commit 968ea868 authored by dindigala's avatar dindigala
Browse files

refactor: renamed prop and added i18n to tab titles

parent 28b94120
Pipeline #202054 passed with stages
in 3 minutes and 23 seconds
......@@ -11,7 +11,7 @@
<q-tab
v-for="annotationTab in annotationTabs"
:key="annotationTab.key"
:label="annotationTab.collectionTitle"
:label="$t(annotationTab.collectionTitle)"
:name="annotationTab.key"
@click="activeTab(annotationTab.key)"
/>
......@@ -24,7 +24,7 @@
<AnnotationToggles />
<AnnotationList
:hot-annotations="currentAnnotations"
:configured-annotations="currentAnnotations"
:get-icon="getIcon"
:status-check="statusCheck"
:toggle="toggle"
......@@ -79,7 +79,7 @@ export default {
},
data() {
return {
hotAnnotations: [],
configuredAnnotations: [],
ids: [],
messages: {
none: 'noAnnotationMessage',
......@@ -96,7 +96,7 @@ export default {
currentAnnotations() {
const contentType = this.annotationTabs.find((collection) => collection.key === this.currentTab);
return this.hotAnnotations.filter((annotationCollection) => contentType.type.includes(annotationCollection.body['x-content-type']));
return this.configuredAnnotations.filter((annotationCollection) => contentType.type.includes(annotationCollection.body['x-content-type']));
},
annotationTabs() {
return [
......@@ -122,7 +122,7 @@ export default {
const interval = setInterval(() => {
if (this.annotationLoading) {
this.hotAnnotations = this.filterAnnotationTypes();
this.configuredAnnotations = this.filterAnnotationTypes();
this.highlightActiveTabContent('editorial');
clearInterval(interval);
}
......@@ -220,8 +220,8 @@ export default {
},
statusCheck() {
const num = this.hotAnnotations.length;
const active = this.hotAnnotations.filter((annotation) => annotation.status === true).length;
const num = this.configuredAnnotations.length;
const active = this.configuredAnnotations.filter((annotation) => annotation.status === true).length;
if (num === active) {
this.selectedAll = false;
......@@ -255,7 +255,7 @@ export default {
},
toggleTo(bool) {
this.hotAnnotations.filter((annotation) => annotation.status === bool).map((annotation) => this.toggle(annotation));
this.configuredAnnotations.filter((annotation) => annotation.status === bool).map((annotation) => this.toggle(annotation));
this.selectedAll = bool;
this.selectedNone = !bool;
},
......
<template>
<q-list>
<q-item
v-for="annotation in hotAnnotations"
v-for="annotation in configuredAnnotations"
:id="'list' + annotation.strippedId"
:key="annotation.strippedId"
class="q-pa-sm q-pl-xs q-mb-xs"
......@@ -39,7 +39,7 @@ export default {
type: Function,
default: () => null,
},
hotAnnotations: {
configuredAnnotations: {
type: Array,
default: () => [],
},
......
......@@ -14,6 +14,7 @@ export default {
defaultView: 'Ansicht zurücksetzen',
Description: 'Beschreibung',
Editor: 'Herausgeber',
Editorial: 'Redaktionell',
Editors: 'Herausgeber',
hide: 'Verstecke',
Image: 'Digitalisat',
......@@ -34,6 +35,7 @@ export default {
Location: 'Aktueller Aufbewahrungsort',
Manuscript: 'Manuskript',
Metadata: 'Metadaten',
Motifs: 'Motive',
next: 'Näch.',
notificationTitle: 'Keine Annotationen verfügbar',
noAnnotationMessage: 'Die aktuelle Ansicht enthält keine Annotationen.',
......
......@@ -14,6 +14,7 @@ export default {
defaultView: 'Reset panels to default view',
Description: 'Description',
Editor: 'Editor',
Editorial: 'Editorial',
Editors: 'Editors',
hide: 'Hide',
Image: 'Image',
......@@ -34,6 +35,7 @@ export default {
Location: 'Current location',
Manuscript: 'Manuscript',
Metadata: 'Metadata',
Motifs: 'Motifs',
next: 'Next',
notificationTitle: 'No Annotations available',
noAnnotationMessage: 'The current view has no annotations to display.',
......
......@@ -31,7 +31,7 @@
-->
<script id="tido-config" type="application/json">
{
"entrypoint": "https://ahikar-dev.sub.uni-goettingen.de/api/textapi/ahikar/arabic-karshuni/collection.json",
"entrypoint": "https://ahikar-dev.sub.uni-goettingen.de/api/textapi/ahikar/syriac/collection.json",
"annotations": {
"show": true,
"types": [
......
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