-
-
Notifications
You must be signed in to change notification settings - Fork 363
Expand file tree
/
Copy pathMaintenanceDuplicateChecker.vue
More file actions
64 lines (60 loc) · 2.15 KB
/
MaintenanceDuplicateChecker.vue
File metadata and controls
64 lines (60 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<template>
<Card
class="min-h-40 dark:bg-surface-800 shadow shadow-surface-950/30 rounded-lg relative"
pt:body:class="min-h-40 h-full"
pt:content:class="h-full flex justify-between flex-col"
>
<template #title>
<div class="text-center">
{{ $t("maintenance.duplicate-finder.title") }}
</div>
</template>
<template #content>
<div class="w-full h-40 text-sm text-muted-color">
<div class="w-full ltr:text-left rtl:text-right">
<h2 class="mb-4">{{ $t("maintenance.duplicate-finder.description") }}</h2>
<p v-if="data !== undefined && data.pure_duplicates + data.duplicates_within_album + data.title_duplicates > 0">
{{ $t("maintenance.duplicate-finder.duplicates-all") }}: {{ data.pure_duplicates }}<br />
{{ $t("maintenance.duplicate-finder.duplicates-title") }}: {{ data.title_duplicates }}<br />
{{ $t("maintenance.duplicate-finder.duplicates-per-album") }}: {{ data.duplicates_within_album }}<br />
</p>
<ProgressSpinner v-if="data === undefined && isLoaded" class="w-full"></ProgressSpinner>
</div>
</div>
<div class="flex gap-4 mt-1">
<Button
v-if="data !== undefined && data.pure_duplicates"
as="router-link"
to="/duplicatesFinder"
severity="primary"
class="w-full border-none self-end"
>
{{ $t("maintenance.duplicate-finder.show") }}
</Button>
<Button v-if="!isLoaded" @click="load" severity="primary" class="w-full border-none self-end">
{{ $t("maintenance.duplicate-finder.load") }}
</Button>
</div>
</template>
</Card>
</template>
<script setup lang="ts">
import { ref } from "vue";
import Button from "primevue/button";
import Card from "primevue/card";
import ProgressSpinner from "primevue/progressspinner";
import MaintenanceService from "@/services/maintenance-service";
const data = ref<App.Http.Resources.Models.Duplicates.DuplicateCount | undefined>(undefined);
const isLoaded = ref(false);
function load() {
isLoaded.value = true;
MaintenanceService.getDuplicatesCount().then((response) => {
data.value = response.data;
});
}
</script>
<style lang="css" scoped>
.lychee-dark .p-card {
--p-card-background: var(--p-surface-800);
}
</style>