Commit e30c705a authored by dindigala's avatar dindigala
Browse files

refactor: display tabs accordingly when there are two text types

parent 9652b702
Pipeline #204543 passed with stages
in 2 minutes and 53 seconds
......@@ -118,7 +118,7 @@ export default {
};
});
this.annotations.forEach((curr) => {
this.configuredAnnotations.forEach((curr) => {
const contentType = curr.body.['x-content-type'];
if (contentTypes[contentType]) {
annotationTab[contentTypes[contentType]].type.push(contentType);
......@@ -141,9 +141,10 @@ export default {
const interval = setInterval(() => {
if (this.annotationLoading) {
this.configuredAnnotations = this.filterAnnotationTypes();
const firstTab = this.annotationTabs.find((x) => x.type.length)?.key || '';
this.configuredAnnotations = this.filterAnnotationTypes();
this.highlightActiveTabContent(this.annotationTabConfig[firstTab] || []);
this.currentTab = firstTab;
clearInterval(interval);
......
......@@ -31,7 +31,7 @@
-->
<script id="tido-config" type="application/json">
{
"entrypoint": "",
"entrypoint": "https://ahikar-dev.sub.uni-goettingen.de/api/textapi/ahikar/arabic-karshuni/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