v2 #1
@@ -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
|
||||
});
|
||||
};
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user