remove old page, new style for loader, increase debounce time

This commit is contained in:
Michael Freno
2025-12-28 23:21:47 -05:00
parent 4743f1deaf
commit 692f568fd4
4 changed files with 40 additions and 27 deletions

View File

@@ -401,12 +401,37 @@ const SuggestionDecoration = Extension.create({
span.className = "inline-flex items-center ml-1";
span.style.pointerEvents = "none";
// Create a simple spinner using CSS animation
// Use Spinner component
const spinner = document.createElement("span");
spinner.className =
"inline-block w-3 h-3 border-2 border-current border-t-transparent rounded-full animate-spin";
spinner.className = "text-red inline-block";
spinner.style.color = "rgb(239, 68, 68)"; // Tailwind red-500
spinner.style.opacity = "0.5";
spinner.style.fontSize = "18px";
spinner.style.lineHeight = "1.5";
// Render spinner chars manually since we're in ProseMirror
const spinnerChars = [
"⠋",
"⠙",
"⠹",
"⠸",
"⠼",
"⠴",
"⠦",
"⠧",
"⠇",
"⠏"
];
let charIndex = 0;
spinner.textContent = spinnerChars[0];
const interval = setInterval(() => {
charIndex = (charIndex + 1) % spinnerChars.length;
spinner.textContent = spinnerChars[charIndex];
}, 50);
// Store interval on element for cleanup
(spinner as any)._spinnerInterval = interval;
span.appendChild(spinner);
return span;
@@ -1574,7 +1599,6 @@ export default function TextEditor(props: TextEditorProps) {
}, 2000);
}
// Debounced infill trigger (250ms) - only if enabled and (desktop OR fullscreen mode)
if (infillConfig() && !isInitialLoad && infillEnabled()) {
const isMobileNotFullscreen =
typeof window !== "undefined" &&
@@ -1588,7 +1612,7 @@ export default function TextEditor(props: TextEditorProps) {
}
infillDebounceTimer = setTimeout(() => {
requestInfill();
}, 250);
}, 500);
}
}
});

View File

@@ -1,17 +0,0 @@
import { Title, Meta } from "@solidjs/meta";
export default function About() {
return (
<>
<Title>About | Michael Freno</Title>
<Meta
name="description"
content="Learn more about Michael Freno - Software Engineer, game developer, and open source contributor."
/>
<main>
<h1>About</h1>
</main>
</>
);
}

View File

@@ -15,7 +15,7 @@ import { Fire } from "~/components/icons/Fire";
import CommentSectionWrapper from "~/components/blog/CommentSectionWrapper";
import PostBodyClient from "~/components/blog/PostBodyClient";
import type { Comment, CommentReaction, UserPublicData } from "~/types/comment";
import { TerminalSplash } from "~/components/TerminalSplash";
import { Spinner } from "~/components/Spinner";
import { api } from "~/lib/api";
import "../post.css";
@@ -299,7 +299,14 @@ export default function PostPage() {
return (
<>
<Show when={data()} fallback={<TerminalSplash />}>
<Show
when={data()}
fallback={
<div class="flex h-screen items-center justify-center">
<Spinner size="xl" />
</div>
}
>
{(loadedData) => {
// Handle redirect for by-id route
if ("redirect" in loadedData()) {

View File

@@ -169,7 +169,7 @@ export default function LoginPage() {
const result = await response.json();
if (response.ok && result.result?.data) {
navigate("/account");
navigate("/account", { replace: true });
} else {
const errorMsg =
result.error?.message ||
@@ -207,8 +207,7 @@ export default function LoginPage() {
if (response.ok && result.result?.data?.success) {
setShowPasswordSuccess(true);
setTimeout(() => {
navigate(-1); // Go back
window.location.reload(); // Refresh to update session
navigate("/account", { replace: true });
}, 500);
} else {
setShowPasswordError(true);