Skip to content

Commit 856f372

Browse files
authored
Add maintenance recompute (#3931)
1 parent af8359a commit 856f372

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

resources/js/components/maintenance/MaintenanceBackfillAlbumSizes.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<Card
3-
v-if="data !== undefined && data > 0"
3+
v-if="data !== undefined && data !== 0"
44
class="min-h-40 dark:bg-surface-800 shadow shadow-surface-950/30 rounded-lg relative"
55
pt:body:class="min-h-40 h-full"
66
pt:content:class="h-full flex justify-between flex-col"
@@ -16,7 +16,7 @@
1616
<ProgressSpinner v-if="loading" class="w-full"></ProgressSpinner>
1717
</ScrollPanel>
1818
<div class="flex gap-4 mt-1">
19-
<Button v-if="data !== 0 && data !== undefined && !loading" severity="primary" class="w-full border-none" @click="exec">
19+
<Button v-if="data !== 0 && !loading" severity="primary" class="w-full border-none" @click="exec">
2020
{{ $t("maintenance.backfill-album-sizes.button") }}
2121
</Button>
2222
</div>

resources/js/components/maintenance/MaintenanceFulfillPrecompute.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<Card
3-
v-if="data !== undefined && data > 0"
3+
v-if="data !== undefined && data !== 0"
44
class="min-h-40 dark:bg-surface-800 shadow shadow-surface-950/30 rounded-lg relative"
55
pt:body:class="min-h-40 h-full"
66
pt:content:class="h-full flex justify-between flex-col"
@@ -16,7 +16,7 @@
1616
<ProgressSpinner v-if="loading" class="w-full"></ProgressSpinner>
1717
</ScrollPanel>
1818
<div class="flex gap-4 mt-1">
19-
<Button v-if="data > 0 && !loading" severity="primary" class="w-full border-none" @click="exec">
19+
<Button v-if="data !== 0 && !loading" severity="primary" class="w-full border-none" @click="exec">
2020
{{ $t("maintenance.fulfill-precompute.button") }}
2121
</Button>
2222
</div>
@@ -40,6 +40,9 @@ const loading = ref(false);
4040
const toast = useToast();
4141
4242
const description = computed(() => {
43+
if (data.value === -1) {
44+
return "";
45+
}
4346
return sprintf(trans("maintenance.fulfill-precompute.description"), data.value);
4447
});
4548

0 commit comments

Comments
 (0)