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,47 @@
<script setup>
import { inject, onMounted, ref } from 'vue';
import { post } from '#/src/api.js';
import navigate from '#/src/navigate.js';
const pageContext = inject('pageContext');
const user = pageContext.user;
const allowSignup = pageContext.env.allowSignup;
const username = ref('');
const password = ref('');
const submitted = ref(false);
const errorMsg = ref(null);
const userInput = ref(null);
const showPassword = ref(false);
async function login() {
submitted.value = true;
errorMsg.value = null;
try {
const loginUser = await post('/session', {
username: username.value,
password: password.value,
redirect: pageContext.urlParsed.search.r,
});
navigate(pageContext.urlParsed.search.r ? decodeURIComponent(pageContext.urlParsed.search.r) : `/user/${loginUser.username}`, null, { redirect: true });
}
catch (error) {
errorMsg.value = error.message;
}
finally {
submitted.value = false;
}
}
onMounted(() => {
userInput.value?.focus();
});
</script>
<template>
<div class="login-container">
<div v-if="user">
@@ -13,14 +57,14 @@
<li>
<a
:href="`/updates`"
href="/updates"
class="link"
>Check out latest porn updates</a>
</li>
<li>
<a
:href="`/actors`"
href="/actors"
class="link"
>Browse the hottest porn stars</a>
</li>
@@ -84,48 +128,6 @@
</div>
</template>
<script setup>
import { ref, onMounted, inject } from 'vue';
import { post } from '#/src/api.js';
import navigate from '#/src/navigate.js';
const pageContext = inject('pageContext');
const user = pageContext.user;
const allowSignup = pageContext.env.allowSignup;
const username = ref('');
const password = ref('');
const submitted = ref(false);
const errorMsg = ref(null);
const userInput = ref(null);
const showPassword = ref(false);
async function login() {
submitted.value = true;
errorMsg.value = null;
try {
const loginUser = await post('/session', {
username: username.value,
password: password.value,
redirect: pageContext.urlParsed.search.r,
});
navigate(pageContext.urlParsed.search.r ? decodeURIComponent(pageContext.urlParsed.search.r) : `/user/${loginUser.username}`, null, { redirect: true });
} catch (error) {
errorMsg.value = error.message;
} finally {
submitted.value = false;
}
}
onMounted(() => {
userInput.value?.focus();
});
</script>
<style scoped>
.login-container {
display: flex;

View File

@@ -1,3 +1,62 @@
<script setup>
import VueHCaptcha from '@hcaptcha/vue3-hcaptcha';
import { inject, onMounted, ref } from 'vue';
import { post } from '#/src/api.js';
import navigate from '#/src/navigate.js';
const pageContext = inject('pageContext');
const { user, env } = pageContext;
const username = ref('');
const email = ref('');
const password = ref('');
const passwordConfirm = ref('');
const errorMsg = ref(null);
const submitted = ref(false);
const userInput = ref(null);
const showPassword = ref(false);
const captcha = ref(null);
async function signup() {
errorMsg.value = null;
submitted.value = true;
if (password.value !== passwordConfirm.value) {
errorMsg.value = 'Passwords do not match';
return;
}
if (env.captcha.enabled && !captcha.value) {
errorMsg.value = 'Please complete the CAPTCHA';
return;
}
try {
const newUser = await post('/users', {
username: username.value,
email: email.value,
password: password.value,
redirect: pageContext.urlParsed.search.r,
captcha: captcha.value,
});
navigate(`/user/${newUser.username}`, null, { redirect: true });
}
catch (error) {
errorMsg.value = error.message;
}
finally {
submitted.value = false;
}
}
onMounted(() => {
userInput.value.focus();
});
</script>
<template>
<div class="login-container">
<div v-if="user">
@@ -13,14 +72,14 @@
<li>
<a
:href="`/updates`"
href="/updates"
class="link"
>Check out latest porn updates</a>
</li>
<li>
<a
:href="`/actors`"
href="/actors"
class="link"
>Browse the hottest porn stars</a>
</li>
@@ -133,63 +192,6 @@
</div>
</template>
<script setup>
import { ref, onMounted, inject } from 'vue';
import VueHCaptcha from '@hcaptcha/vue3-hcaptcha';
import { post } from '#/src/api.js';
import navigate from '#/src/navigate.js';
const pageContext = inject('pageContext');
const { user, env } = pageContext;
const username = ref('');
const email = ref('');
const password = ref('');
const passwordConfirm = ref('');
const errorMsg = ref(null);
const submitted = ref(false);
const userInput = ref(null);
const showPassword = ref(false);
const captcha = ref(null);
async function signup() {
errorMsg.value = null;
submitted.value = true;
if (password.value !== passwordConfirm.value) {
errorMsg.value = 'Passwords do not match';
return;
}
if (env.captcha.enabled && !captcha.value) {
errorMsg.value = 'Please complete the CAPTCHA';
return;
}
try {
const newUser = await post('/users', {
username: username.value,
email: email.value,
password: password.value,
redirect: pageContext.urlParsed.search.r,
captcha: captcha.value,
});
navigate(`/user/${newUser.username}`, null, { redirect: true });
} catch (error) {
errorMsg.value = error.message;
} finally {
submitted.value = false;
}
}
onMounted(() => {
userInput.value.focus();
});
</script>
<style scoped>
.login-container {
display: flex;