Hiding empty search sections.

This commit is contained in:
DebaucheryLibrarian 2021-02-26 03:04:09 +01:00
parent 8641651a55
commit 772fef5ff8
1 changed files with 21 additions and 22 deletions

View File

@ -5,15 +5,10 @@
class="summary" class="summary"
>Searching...</span> >Searching...</span>
<span <template v-if="!loader && actors.length > 0">
v-if="!loading" <span class="summary">Found {{ actors.length }} actors for '{{ query }}'</span>
class="summary"
>Found {{ actors.length }} actors for '{{ query }}'</span>
<div <div class="tiles">
v-if="!loading && actors.length > 0"
class="tiles"
>
<Actor <Actor
v-for="actor in actors" v-for="actor in actors"
:key="`actor-${actor.id}`" :key="`actor-${actor.id}`"
@ -21,17 +16,21 @@
:alias="actor.aliasFor && actor" :alias="actor.aliasFor && actor"
/> />
</div> </div>
</template>
<span <template v-if="!loader && releases.length > 0">
v-if="!loading" <span class="summary">Found {{ releases.length }} releases for '{{ query }}'</span>
class="summary"
>Found {{ releases.length }} releases for '{{ query }}'</span>
<Releases <Releases
v-if="!loading && releases.length > 0"
class="embedded" class="embedded"
:releases="releases" :releases="releases"
/> />
</template>
<span
v-if="!loading && actors.length === 0 && releases.length === 0"
class="summary"
>No results</span>
</div> </div>
</template> </template>