Changed dead site alert threshold to weeks.

This commit is contained in:
DebaucheryLibrarian 2025-09-15 05:23:28 +02:00
parent 50d280a3c9
commit 87a800edc9
1 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@
type="number"
placeholder="Alert threshold"
class="input"
> months
> weeks
</label>
<label>
@ -77,7 +77,7 @@ import {
inject,
} from 'vue';
import { format, subMonths } from 'date-fns';
import { format, subMonths, subWeeks } from 'date-fns';
import navigate from '#/src/navigate.js';
@ -91,11 +91,11 @@ const {
const { entities } = pageProps;
const alertThreshold = ref(Number(urlParsed.search.alert) || 3);
const alertThreshold = ref(Number(urlParsed.search.alert) || 12);
const deadThreshold = ref(Number(urlParsed.search.dead) || 36);
const order = urlParsed.search.order || 'desc';
const alertDate = computed(() => subMonths(meta.now, alertThreshold.value));
const alertDate = computed(() => subWeeks(meta.now, alertThreshold.value));
const deadDate = computed(() => subMonths(meta.now, deadThreshold.value));
const alertEntities = computed(() => entities.filter((entity) => entity.latestReleaseDate > deadDate.value && entity.latestReleaseDate < alertDate.value));