Added password recovery and login attempt guards.

This commit is contained in:
2026-07-23 04:40:25 +02:00
parent ef9be8ef9a
commit 6f68a50eb7
17 changed files with 541 additions and 49 deletions

View File

@@ -5,11 +5,15 @@ import { dangerouslySkipEscape, escapeInject } from 'vike/server';
import { createApp } from './app.js';
function getTitle(location) {
function getTitle(location, pageContext) {
if (!location) {
return config.title;
}
if (typeof location === 'function') {
return getTitle(location(pageContext), pageContext);
}
return `${config.title} - ${location.slice(0, 1).toUpperCase()}${location.slice(1)}`;
}
@@ -44,8 +48,7 @@ async function onRenderHtml(pageContext) {
const appHtml = await renderToString(app);
// See https://vike.dev/head
const { documentProps } = pageContext.exports;
const title = getTitle(documentProps?.title || pageContext.title);
const title = getTitle(pageContext.title || pageContext.config.title, pageContext);
const documentHtml = escapeInject`<!DOCTYPE html>
<html lang="en">