Skip to content

Commit

Permalink
fix: change the logic of showing the message box in annotations list
Browse files Browse the repository at this point in the history
  • Loading branch information
orlinmalkja committed Nov 5, 2024
1 parent 272bfa7 commit 936c1e8
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/components/annotations/variants/VariantsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,21 @@ function getWitnessColor(witness: string) {
}
function getVariantsListInfoMessage(): string {
if (annotationStore.filteredAnnotations.length === 0) {
return i18n[lang.value]['no_annotations_in_view']
}
if (annotationStore.isSingleSelectMode) {
if (annotationStore.isSingleSelectMode
&& annotationStore.filteredAnnotations.length > 0) {
return i18n[lang.value]['single_select_mode_info_message']
}
return i18n[lang.value]['no_annotations_in_view']
}
function getVariantsListInfoTitle(): string {
if (annotationStore.filteredAnnotations.length === 0) {
return i18n[lang.value]['no_annotations_available']
}
if (annotationStore.isSingleSelectMode) {
if (annotationStore.isSingleSelectMode
&& annotationStore.filteredAnnotations.length > 0) {
return i18n[lang.value]['single_select_mode']
}
return i18n[lang.value]['no_annotations_available']
}
function showLineSeparator(visibleAnnotations, i) {
if (visibleAnnotations[i+1]) {
Expand Down

0 comments on commit 936c1e8

Please sign in to comment.