Upgraded dependencies, bumped to Node 24.

This commit is contained in:
2026-07-12 05:27:14 +02:00
parent 2d4786a4fd
commit d745b10d24
181 changed files with 18720 additions and 23134 deletions

View File

@@ -1,3 +1,7 @@
<script setup>
import Admin from '#/components/admin/admin.vue';
</script>
<template>
<Admin>
<h2 class="heading">Admin Panel</h2>
@@ -34,10 +38,6 @@
</Admin>
</template>
<script setup>
import Admin from '#/components/admin/admin.vue';
</script>
<style scoped>
.menu {
margin: 0;

View File

@@ -1,4 +1,4 @@
import { render } from 'vike/abort'; /* eslint-disable-line import/extensions */
import { render } from 'vike/abort';
export function onBeforeRender(pageContext) {
if (pageContext.user.role === 'user') {

View File

@@ -1,3 +1,75 @@
<script setup>
import { inject, onMounted, ref } from 'vue';
import AddActor from '#/components/actors/add.vue';
import MergeActors from '#/components/actors/merge.vue';
import Admin from '#/components/admin/admin.vue';
import Checkbox from '#/components/form/checkbox.vue';
import getPath from '#/src/get-path.js';
import navigate from '#/src/navigate.js';
// import { get } from '#/src/api.js';
const { pageProps, urlParsed } = inject('pageContext');
const actors = ref(pageProps.actors);
const selectedActors = ref(new Set([]));
const activeActor = ref(null);
const actorQuery = ref(urlParsed.search.q || null);
const showAliased = ref(Object.hasOwn(urlParsed.search, 'alias'));
const lastSelectedIndex = ref(null);
const holdingShift = ref(false);
const showMergeDialog = ref(false);
const showAddDialog = ref(false);
function selectActors(selectedActor, isChecked, index) {
const [start, end] = holdingShift.value
? [index, lastSelectedIndex.value].toSorted((indexA, indexB) => indexA - indexB)
: [index, index];
const actorIds = actors.value
.slice(start, end + 1)
.map((actor) => actor.id);
actorIds.forEach((actorId) => {
if (isChecked) {
selectedActors.value.add(actorId);
}
else {
selectedActors.value.delete(actorId);
}
});
lastSelectedIndex.value = index;
}
async function searchActors() {
navigate('/admin/actors', {
q: actorQuery.value || undefined,
alias: showAliased.value || undefined,
}, { redirect: true });
}
onMounted(() => {
window.addEventListener('keydown', (event) => {
if (event.key === 'Shift') {
holdingShift.value = true;
}
});
window.addEventListener('keyup', (event) => {
if (event.key === 'Shift') {
holdingShift.value = false;
}
});
window.addEventListener('blur', () => {
holdingShift.value = false;
});
});
</script>
<template>
<Admin class="page">
<div class="header">
@@ -73,7 +145,7 @@
</td>
<td
v-tooltip="actor.alias ? `#${actor.alias.id} ${actor.alias.name}` : (actor.entity?.name || 'Global')"
v-tooltip="{ content: actor.alias ? `#${actor.alias.id} ${actor.alias.name}` : (actor.entity?.name || 'Global'), ariaId: `actor-entity-${actor.id}` }"
class="actor-entity ellipsis"
>
<Icon
@@ -125,14 +197,14 @@
target="_blank"
>
<Icon
v-tooltip="'Edit bio'"
v-tooltip="{ content: 'Edit bio', ariaId: `actor-edit-${actor.id}` }"
icon="pencil5"
class="actor-action action-merge"
/>
</a>
<Icon
v-tooltip="'Merge'"
v-tooltip="{ content: 'Merge', ariaId: `actor-merge-${actor.id}` }"
icon="make-group"
class="actor-action action-merge"
@click="activeActor = actor; showMergeDialog = true;"
@@ -164,77 +236,6 @@
</Admin>
</template>
<script setup>
import { ref, inject, onMounted } from 'vue';
import Admin from '#/components/admin/admin.vue';
import Checkbox from '#/components/form/checkbox.vue';
import MergeActors from '#/components/actors/merge.vue';
import AddActor from '#/components/actors/add.vue';
import getPath from '#/src/get-path.js';
import navigate from '#/src/navigate.js';
// import { get } from '#/src/api.js';
const { pageProps, urlParsed } = inject('pageContext');
const actors = ref(pageProps.actors);
const selectedActors = ref(new Set([]));
const activeActor = ref(null);
const actorQuery = ref(urlParsed.search.q || null);
const showAliased = ref(Object.hasOwn(urlParsed.search, 'alias'));
const lastSelectedIndex = ref(null);
const holdingShift = ref(false);
const showMergeDialog = ref(false);
const showAddDialog = ref(false);
function selectActors(selectedActor, isChecked, index) {
const [start, end] = holdingShift.value
? [index, lastSelectedIndex.value].toSorted((indexA, indexB) => indexA - indexB)
: [index, index];
const actorIds = actors.value
.slice(start, end + 1)
.map((actor) => actor.id);
actorIds.forEach((actorId) => {
if (isChecked) {
selectedActors.value.add(actorId);
} else {
selectedActors.value.delete(actorId);
}
});
lastSelectedIndex.value = index;
}
async function searchActors() {
navigate('/admin/actors', {
q: actorQuery.value || undefined,
alias: showAliased.value || undefined,
}, { redirect: true });
}
onMounted(() => {
window.addEventListener('keydown', (event) => {
if (event.key === 'Shift') {
holdingShift.value = true;
}
});
window.addEventListener('keyup', (event) => {
if (event.key === 'Shift') {
holdingShift.value = false;
}
});
window.addEventListener('blur', () => {
holdingShift.value = false;
});
});
</script>
<style scoped>
.search {
display: flex;

View File

@@ -1,4 +1,4 @@
import { render } from 'vike/abort'; /* eslint-disable-line import/extensions */
import { render } from 'vike/abort';
import { fetchActors } from '#/src/actors.js';
import { curateActorsQuery } from '#/src/web/actors.js';

View File

@@ -1,3 +1,56 @@
<script setup>
import { format, subMonths, subWeeks } from 'date-fns';
import {
computed,
inject,
ref,
watch,
} from 'vue';
import Admin from '#/components/admin/admin.vue';
import navigate from '#/src/navigate.js';
const {
pageProps,
urlParsed,
meta,
} = inject('pageContext');
const { entities } = pageProps;
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(() => 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));
function sort(sorting) {
navigate('/admin/entities', {
sort: sorting,
order: order === 'desc' ? 'asc' : 'desc',
alert: alertThreshold.value,
dead: deadThreshold.value,
}, {
redirect: true,
});
}
watch([alertThreshold, deadThreshold], () => {
navigate('/admin/entities', {
...urlParsed.search,
alert: alertThreshold.value,
dead: deadThreshold.value,
}, {
redirect: false,
});
});
</script>
<template>
<Admin class="page">
<div class="header">
@@ -84,59 +137,6 @@
</Admin>
</template>
<script setup>
import {
ref,
computed,
watch,
inject,
} from 'vue';
import { format, subMonths, subWeeks } from 'date-fns';
import navigate from '#/src/navigate.js';
import Admin from '#/components/admin/admin.vue';
const {
pageProps,
urlParsed,
meta,
} = inject('pageContext');
const { entities } = pageProps;
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(() => 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));
function sort(sorting) {
navigate('/admin/entities', {
sort: sorting,
order: order === 'desc' ? 'asc' : 'desc',
alert: alertThreshold.value,
dead: deadThreshold.value,
}, {
redirect: true,
});
}
watch([alertThreshold, deadThreshold], () => {
navigate('/admin/entities', {
...urlParsed.search,
alert: alertThreshold.value,
dead: deadThreshold.value,
}, {
redirect: false,
});
});
</script>
<style scoped>
.page {
flex-grow: 1;

View File

@@ -1,4 +1,4 @@
import { render } from 'vike/abort'; /* eslint-disable-line import/extensions */
import { render } from 'vike/abort';
import { fetchEntityHealths } from '#/src/entities.js';
export async function onBeforeRender(pageContext) {

View File

@@ -1,3 +1,8 @@
<script setup>
import Admin from '#/components/admin/admin.vue';
import Revisions from '#/components/edit/revisions.vue';
</script>
<template>
<Admin class="page">
<Revisions
@@ -6,11 +11,6 @@
</Admin>
</template>
<script setup>
import Admin from '#/components/admin/admin.vue';
import Revisions from '#/components/edit/revisions.vue';
</script>
<style scoped>
.page {
flex-grow: 1;

View File

@@ -1,4 +1,4 @@
import { render } from 'vike/abort'; /* eslint-disable-line import/extensions */
import { render } from 'vike/abort';
import { fetchActorRevisions } from '#/src/actors.js';
import verifyAbility from '#/utils/verify-ability.js';

View File

@@ -1,4 +1,4 @@
import { render } from 'vike/abort'; /* eslint-disable-line import/extensions */
import { render } from 'vike/abort';
import { fetchSceneRevisions } from '#/src/scenes.js';
import verifyAbility from '#/utils/verify-ability.js';