Commit fcff7624 authored by schneider210's avatar schneider210
Browse files

refactor: show notification if annotations aren't available

parent 766d4a4a
Pipeline #203318 passed with stages
in 4 minutes and 1 second
...@@ -154,7 +154,6 @@ export default { ...@@ -154,7 +154,6 @@ export default {
} }
} catch (err) { } catch (err) {
this.annotations = []; this.annotations = [];
this.$q.notify({ message: 'No annotations available' });
} finally { } finally {
this.annotationLoading = true; this.annotationLoading = true;
} }
...@@ -387,7 +386,6 @@ export default { ...@@ -387,7 +386,6 @@ export default {
: this.getManifest(this.config.entrypoint); : this.getManifest(this.config.entrypoint);
}, },
}, },
}; };
</script> </script>
......
...@@ -17,33 +17,29 @@ ...@@ -17,33 +17,29 @@
/> />
</q-tabs> </q-tabs>
<!-- <div
v-if="currentAnnotations.length"
class="q-ma-sm"
> -->
<AnnotationToggles /> <AnnotationToggles />
<AnnotationList <AnnotationList
v-if="currentAnnotations.length"
:configured-annotations="currentAnnotations" :configured-annotations="currentAnnotations"
:get-icon="getIcon" :get-icon="getIcon"
:status-check="statusCheck" :status-check="statusCheck"
:toggle="toggle" :toggle="toggle"
/> />
<div
v-else
class="q-pa-sm"
>
<Notification :message="$t(messages.none)" />
</div>
<AnnotationOptions <AnnotationOptions
:selected-all="selectedAll" :selected-all="selectedAll"
:selected-none="selectedNone" :selected-none="selectedNone"
:on-highlight-all="onHighlightAll" :on-highlight-all="onHighlightAll"
:on-highlight-none="onHighlightNone" :on-highlight-none="onHighlightNone"
/> />
<!-- </div> -->
<!-- <div
v-else
class="q-pa-sm"
>
<Notification :message="$t(messages.none)" />
</div> -->
</div> </div>
</template> </template>
...@@ -54,7 +50,7 @@ import AnnotationToggles from '@/components/annotations/toggles.vue'; ...@@ -54,7 +50,7 @@ import AnnotationToggles from '@/components/annotations/toggles.vue';
import AnnotationList from '@/components/annotations/list.vue'; import AnnotationList from '@/components/annotations/list.vue';
import AnnotationOptions from '@/components/annotations/options.vue'; import AnnotationOptions from '@/components/annotations/options.vue';
// import Notification from '@/components/notification.vue'; import Notification from '@/components/notification.vue';
export default { export default {
name: 'Annotations', name: 'Annotations',
...@@ -62,7 +58,7 @@ export default { ...@@ -62,7 +58,7 @@ export default {
AnnotationToggles, AnnotationToggles,
AnnotationList, AnnotationList,
AnnotationOptions, AnnotationOptions,
// Notification, Notification,
}, },
props: { props: {
annotations: { annotations: {
...@@ -271,8 +267,8 @@ export default { ...@@ -271,8 +267,8 @@ export default {
updateToggleState(annotation, text = 'toggle', list = 'toggle') { updateToggleState(annotation, text = 'toggle', list = 'toggle') {
const id = this.stripAnnotationId(annotation.target.id); const id = this.stripAnnotationId(annotation.target.id);
document.getElementById(id).classList.[text]('annotation-disabled'); document.getElementById(id).classList[text]('annotation-disabled');
document.getElementById(`list${id}`).classList.[list]('bg-grey-2'); document.getElementById(`list${id}`).classList[list]('bg-grey-2');
}, },
}, },
}; };
......
<template> <template>
<q-page-sticky <q-page-sticky
:offset="[18, 18]" :offset="[16, 16]"
position="bottom-right" position="bottom-right"
> >
<q-fab <q-fab
......
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