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