Skip to content

Commit 8903bf7

Browse files
committed
Closes #40 - messaging with no animations results
1 parent b67bf42 commit 8903bf7

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/lib/processes/animations-listing/AnimationSearch.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ export class AnimationSearch extends EventTarget {
117117
// Clear and rebuild the animation list
118118
this.animation_list_container.innerHTML = ''
119119

120+
// Show "no animations found" if the filtered list is empty
121+
if (this.filtered_animations_list.length === 0) {
122+
this.animation_list_container.innerHTML = '<div class="no-animations-message">No animations found</div>'
123+
return
124+
}
125+
126+
120127
this.filtered_animations_list.forEach((animation_clip) => {
121128
if (this.animation_list_container == null) {
122129
return

src/styles.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,4 +566,10 @@ position: fixed;
566566
position: absolute;
567567
bottom: 0px;
568568
left: 0;
569+
}
570+
571+
#animations-items .no-animations-message {
572+
padding: 0.5rem;
573+
font-style: italic;
574+
font-size: 90%;
569575
}

0 commit comments

Comments
 (0)