1
0
Fork 0
mirror of https://github.com/bastienwirtz/homer.git synced 2026-01-22 18:06:11 +00:00

Remove showWhenEmpty option and always show data for consistency

This commit is contained in:
Igor Kulman 2025-09-21 22:21:48 +02:00 committed by Bastien Wirtz
parent 1b6c3e6213
commit 843a814ac5

View file

@ -4,7 +4,7 @@
<p class="title is-4">{{ item.name }}</p>
<p class="subtitle is-6">
<span v-if="error" class="error">An error has occurred.</span>
<template v-else-if="count > 0 || shouldShowWhenEmpty">
<template v-else>
<span class="down monospace">
<p class="fas fa-download"></p>
{{ downRate }}
@ -17,7 +17,7 @@
</p>
</template>
<template #indicator>
<span v-if="!error && (count > 0 || shouldShowWhenEmpty)" class="count"
<span v-if="!error" class="count"
>{{ count || 0 }}
<template v-if="(count || 0) === 1">torrent</template>
<template v-else>torrents</template>
@ -65,10 +65,6 @@ export default {
upRate: function () {
return displayRate(this.ul);
},
shouldShowWhenEmpty: function () {
// Default to true (show when empty) unless explicitly set to false
return this.item.showWhenEmpty !== false;
},
},
created() {
// Validate that endpoint is configured