Only shows spinner when no loading is happening. #11

This commit is contained in:
mateuswetah 2022-06-30 09:11:10 -03:00
parent 5a8015e251
commit 7099f55982
2 changed files with 25 additions and 16 deletions

View File

@ -13,9 +13,9 @@
:message="$t('label_loading')"
>
</ion-loading>
<ion-spinner v-if="isSearching" name="bubbles"></ion-spinner>
<ion-spinner v-if="isSearching"></ion-spinner>
<div
v-if="!isSearching && (!tainacanStore.totalCollectionItems || tainacanStore.totalCollectionItems == '0')"
v-if="!isLoading && !isSearching && (!tainacanStore.totalCollectionItems || tainacanStore.totalCollectionItems == '0')"
class="results-not-found"
>
<span> {{$t('label_no_results_found')}} </span>
@ -196,7 +196,7 @@ export default defineComponent({
</script>
<style>
.add-items-button {
.add-items-button {
position: fixed;
bottom: 16px;
right: 16px;
@ -206,5 +206,8 @@ export default defineComponent({
--padding-top: 16px;
--padding-end: 24px;
--border-radius: 18px;
}
}
ion-spinner {
margin-top: 2rem;
}
</style>

View File

@ -11,8 +11,8 @@
<ion-refresher slot="fixed" @ionRefresh="doRefresh($event)">
<ion-refresher-content></ion-refresher-content>
</ion-refresher>
<ion-spinner v-if="isSearching" name="bubbles"></ion-spinner>
<div v-if="!isSearching && (!tainacanStore.totalItems || tainacanStore.totalItems == '0')" class="results-not-found">
<ion-spinner v-if="isSearching"></ion-spinner>
<div v-if="!isLoading && !isSearching && (!tainacanStore.totalItems || tainacanStore.totalItems == '0')" class="results-not-found">
<span> {{$t('label_no_results_found')}} </span>
</div>
<items-list :items="tainacanStore.items"></items-list>
@ -112,3 +112,9 @@ export default {
},
}
</script>
<style scoped>
ion-spinner {
margin-top: 2rem;
}
</style>