Commit 5c5d6dff authored by dindigala's avatar dindigala
Browse files

refactor: addressing review comments and renaming

parent 41e9596e
Pipeline #213928 passed with stages
in 5 minutes and 13 seconds
......@@ -21,13 +21,13 @@
<q-page-container class="root">
<router-view
:annotations="annotations"
:annotation-loaded="annotationLoaded"
:collection="collection"
:config="config"
:contenttypes="contentTypes"
:contenturls="contentUrls"
:fontsize="fontsize"
:imageurl="imageurl"
:isloading="isLoading"
:item="item"
:labels="config.labels"
:manifests="manifests"
......@@ -54,7 +54,6 @@ export default {
data() {
return {
annotations: [],
annotationLoaded: false,
collection: {},
collectiontitle: '',
config: {},
......@@ -63,6 +62,7 @@ export default {
fontsize: 16,
imageurl: '',
isCollection: false,
isLoading: false,
item: {},
itemurl: '',
itemurls: [],
......@@ -143,7 +143,7 @@ export default {
*/
async getAnnotations(url) {
this.annotations = [];
this.annotationLoaded = false;
this.isLoading = false;
try {
const annotations = await this.request(url);
......@@ -163,7 +163,7 @@ export default {
} catch (err) {
this.annotations = [];
} finally {
this.annotationLoaded = true;
this.isLoading = true;
}
},
/**
......
......@@ -19,13 +19,13 @@
<AnnotationToggles />
<LoadingProgress
v-if="!annotationLoaded || isProcessing"
:loadingprogress="!annotationLoaded || isProcessing"
<Loading
v-if="!isloading || isProcessing"
:loading="!isloading || isProcessing"
/>
<AnnotationList
v-else-if="currentAnnotations.length && annotationLoaded && !isProcessing"
v-else-if="currentAnnotations.length && isloading && !isProcessing"
class="custom-font"
:configured-annotations="currentAnnotations"
:get-icon="getIcon"
......@@ -34,7 +34,7 @@
/>
<div
v-else-if="annotationLoaded && !currentAnnotations.length && !isProcessing"
v-else-if="!currentAnnotations.length && isloading && !isProcessing"
class="q-pa-sm"
>
<Notification
......@@ -62,7 +62,7 @@ import AnnotationToggles from '@/components/annotations/toggles.vue';
import AnnotationList from '@/components/annotations/list.vue';
import AnnotationOptions from '@/components/annotations/options.vue';
import LoadingProgress from '@/components/loading.vue';
import Loading from '@/components/loading.vue';
import Notification from '@/components/notification.vue';
export default {
......@@ -71,7 +71,7 @@ export default {
AnnotationToggles,
AnnotationList,
AnnotationOptions,
LoadingProgress,
Loading,
Notification,
},
mixins: [Annotation],
......@@ -80,7 +80,7 @@ export default {
type: Array,
default: () => [],
},
annotationLoaded: {
isloading: {
type: Boolean,
default: false,
},
......@@ -157,7 +157,7 @@ export default {
this.configuredAnnotations = [];
const interval = setInterval(() => {
if (this.annotationLoaded) {
if (this.isloading) {
this.configuredAnnotations = this.filterAnnotationTypes();
const firstTab = this.annotationTabs.find((x) => x.type.length)?.key || '';
......
<template>
<q-inner-loading
:showing="loadingprogress"
:showing="loading"
>
<q-spinner
size="3em"
......@@ -12,12 +12,9 @@
<script>
export default {
name: 'LoadingProgress',
name: 'Loading',
props: {
loadingprogress: {
type: Boolean,
},
textcontentprogress: {
loading: {
type: Boolean,
},
},
......
......@@ -85,10 +85,6 @@ export default {
type: Array,
default: () => [],
},
annotationLoaded: {
type: Boolean,
default: false,
},
collection: {
type: Object,
default: () => {},
......@@ -113,6 +109,10 @@ export default {
type: String,
default: () => '',
},
isloading: {
type: Boolean,
default: false,
},
item: {
type: Object,
default: () => {},
......@@ -121,9 +121,6 @@ export default {
type: Object,
default: () => {},
},
loadingprogress: {
type: Boolean,
},
manifests: {
type: Array,
default: () => [],
......
Supports Markdown
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