fix: remove non-existent created field from auth/me and fix html declaration order in chapter page
Some checks failed
Deploy / Deploy Production (push) Has been skipped
Deploy / Cleanup Preview (push) Has been skipped
Deploy / Deploy Preview (push) Failing after 1s
CI / Scraper / Lint (pull_request) Failing after 17s
CI / UI / Build (pull_request) Successful in 25s
CI / Scraper / Test (pull_request) Successful in 27s
CI / Scraper / Build (pull_request) Has been skipped
iOS CI / Build (pull_request) Failing after 1s
iOS CI / Test (pull_request) Has been skipped
Some checks failed
Deploy / Deploy Production (push) Has been skipped
Deploy / Cleanup Preview (push) Has been skipped
Deploy / Deploy Preview (push) Failing after 1s
CI / Scraper / Lint (pull_request) Failing after 17s
CI / UI / Build (pull_request) Successful in 25s
CI / Scraper / Test (pull_request) Successful in 27s
CI / Scraper / Build (pull_request) Has been skipped
iOS CI / Build (pull_request) Failing after 1s
iOS CI / Test (pull_request) Has been skipped
This commit is contained in:
@@ -13,7 +13,6 @@ export const GET: RequestHandler = async ({ locals }) => {
|
|||||||
return json({
|
return json({
|
||||||
id: locals.user.id,
|
id: locals.user.id,
|
||||||
username: locals.user.username,
|
username: locals.user.username,
|
||||||
role: locals.user.role,
|
role: locals.user.role
|
||||||
created: locals.user.created ?? ''
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,6 +6,10 @@
|
|||||||
|
|
||||||
let { data }: { data: PageData } = $props();
|
let { data }: { data: PageData } = $props();
|
||||||
|
|
||||||
|
let html = $state(data.html);
|
||||||
|
let fetchingContent = $state(!data.isPreview && !data.html);
|
||||||
|
let fetchError = $state('');
|
||||||
|
|
||||||
// ── Word count ────────────────────────────────────────────────────────────
|
// ── Word count ────────────────────────────────────────────────────────────
|
||||||
function countWords(htmlStr: string | null): number {
|
function countWords(htmlStr: string | null): number {
|
||||||
if (!htmlStr) return 0;
|
if (!htmlStr) return 0;
|
||||||
@@ -15,10 +19,6 @@
|
|||||||
|
|
||||||
const wordCount = $derived(countWords(html));
|
const wordCount = $derived(countWords(html));
|
||||||
|
|
||||||
let html = $state(data.html);
|
|
||||||
let fetchingContent = $state(!data.isPreview && !data.html);
|
|
||||||
let fetchError = $state('');
|
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
// Record reading progress (skip for preview chapters)
|
// Record reading progress (skip for preview chapters)
|
||||||
if (!data.isPreview) {
|
if (!data.isPreview) {
|
||||||
|
|||||||
Reference in New Issue
Block a user