v2 #1

Open
kamil wants to merge 231 commits from v2 into main
2 changed files with 5 additions and 6 deletions
Showing only changes of commit 5a7d7ce3b9 - Show all commits

View File

@@ -13,7 +13,6 @@ export const GET: RequestHandler = async ({ locals }) => {
return json({
id: locals.user.id,
username: locals.user.username,
role: locals.user.role,
created: locals.user.created ?? ''
role: locals.user.role
});
};

View File

@@ -6,6 +6,10 @@
let { data }: { data: PageData } = $props();
let html = $state(data.html);
let fetchingContent = $state(!data.isPreview && !data.html);
let fetchError = $state('');
// ── Word count ────────────────────────────────────────────────────────────
function countWords(htmlStr: string | null): number {
if (!htmlStr) return 0;
@@ -15,10 +19,6 @@
const wordCount = $derived(countWords(html));
let html = $state(data.html);
let fetchingContent = $state(!data.isPreview && !data.html);
let fetchError = $state('');
onMount(async () => {
// Record reading progress (skip for preview chapters)
if (!data.isPreview) {