diff --git a/web/src/lib/components/maintenance/integrity/IntegrityReportTableItem.svelte b/web/src/lib/components/maintenance/integrity/IntegrityReportTableItem.svelte
index 640ed19542..1240f74a68 100644
--- a/web/src/lib/components/maintenance/integrity/IntegrityReportTableItem.svelte
+++ b/web/src/lib/components/maintenance/integrity/IntegrityReportTableItem.svelte
@@ -16,7 +16,7 @@
const { Download, Delete } = $derived(getIntegrityReportItemActions($t, id, reportType));
- function onIntegrityReportDeleteStatus({
+ const onIntegrityReportDeleteStatus = ({
id: reportId,
type,
isDeleting,
@@ -24,11 +24,11 @@
id?: string;
type?: IntegrityReportType;
isDeleting: boolean;
- }) {
+ }) => {
if (type === reportType || reportId === id) {
deleting = isDeleting;
}
- }
+ };
diff --git a/web/src/lib/services/integrity.service.ts b/web/src/lib/services/integrity.service.ts
index 47d72a2c84..d7a664a376 100644
--- a/web/src/lib/services/integrity.service.ts
+++ b/web/src/lib/services/integrity.service.ts
@@ -34,16 +34,16 @@ export const getIntegrityReportItemActions = (
reportId: string,
reportType: IntegrityReportType,
) => {
- const Download = {
+ const Download: ActionItem = {
title: $t('download'),
icon: mdiDownload,
onAction: () => {
void handleDownloadIntegrityReportFile(reportId);
},
- $if: reportType === IntegrityReportType.UntrackedFile || reportType === IntegrityReportType.ChecksumMismatch,
+ $if: () => reportType === IntegrityReportType.UntrackedFile || reportType === IntegrityReportType.ChecksumMismatch,
};
- const Delete = {
+ const Delete: ActionItem = {
title: $t('delete'),
icon: mdiTrashCanOutline,
color: 'danger',
diff --git a/web/src/routes/admin/maintenance/+page.svelte b/web/src/routes/admin/maintenance/+page.svelte
index f2e4c1ef3a..54da110c4a 100644
--- a/web/src/routes/admin/maintenance/+page.svelte
+++ b/web/src/routes/admin/maintenance/+page.svelte
@@ -32,6 +32,7 @@
const { data }: Props = $props();
const { StartMaintenance } = $derived(getMaintenanceAdminActions($t));
+ // svelte-ignore state_referenced_locally
let integrityReport: IntegrityReportSummaryResponseDto = $state(data.integrityReport);
const TYPES: IntegrityReportType[] = [
@@ -75,7 +76,7 @@
running = false;
});
- function onJobCreate({ dto }: { dto: JobCreateDto }) {
+ const onJobCreate = ({ dto }: { dto: JobCreateDto }) => {
if (
(Object.values(INTEGRITY_JOB_NAMES).includes(dto.name) ||
Object.values(INTEGRITY_REFRESH_JOB_NAMES).includes(dto.name)) &&
@@ -84,7 +85,7 @@
expectingUpdate = true;
jobs.integrityCheck.queueStatus.isActive = true;
}
- }
+ };
diff --git a/web/src/routes/admin/maintenance/integrity-report/[type]/+page.svelte b/web/src/routes/admin/maintenance/integrity-report/[type]/+page.svelte
index 3fbfcb6f87..75df959812 100644
--- a/web/src/routes/admin/maintenance/integrity-report/[type]/+page.svelte
+++ b/web/src/routes/admin/maintenance/integrity-report/[type]/+page.svelte
@@ -20,7 +20,7 @@
// svelte-ignore state_referenced_locally
let integrityReport = $state(data.integrityReport);
- async function loadMore() {
+ const loadMore = async () => {
const { items, nextCursor } = await getIntegrityReport({
$type: data.type,
cursor: integrityReport.nextCursor,
@@ -28,7 +28,7 @@
integrityReport.items.push(...items);
integrityReport.nextCursor = nextCursor;
- }
+ };
let running = true;
let expectingUpdate = false;
@@ -55,14 +55,14 @@
const { Download, Delete } = $derived(getIntegrityReportActions($t, data.type));
- function onIntegrityReportDeleted({ id, type }: { id?: string; type?: IntegrityReportType }) {
+ const onIntegrityReportDeleted = ({ id, type }: { id?: string; type?: IntegrityReportType }) => {
if (type === data.type) {
integrityReport.items = [];
integrityReport.nextCursor = undefined;
} else {
integrityReport.items = integrityReport.items.filter((report) => report.id !== id);
}
- }
+ };