diff --git a/src/components/blog/TextEditor.tsx b/src/components/blog/TextEditor.tsx index 726c975..745ee26 100644 --- a/src/components/blog/TextEditor.tsx +++ b/src/components/blog/TextEditor.tsx @@ -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); } } }); diff --git a/src/routes/about.tsx b/src/routes/about.tsx deleted file mode 100644 index 3aaf89f..0000000 --- a/src/routes/about.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { Title, Meta } from "@solidjs/meta"; - -export default function About() { - return ( - <> - About | Michael Freno - - -
-

About

-
- - ); -} diff --git a/src/routes/blog/[title]/index.tsx b/src/routes/blog/[title]/index.tsx index 0772821..1c56da9 100644 --- a/src/routes/blog/[title]/index.tsx +++ b/src/routes/blog/[title]/index.tsx @@ -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 ( <> - }> + + + + } + > {(loadedData) => { // Handle redirect for by-id route if ("redirect" in loadedData()) { diff --git a/src/routes/login/index.tsx b/src/routes/login/index.tsx index 2e08e96..1e8ddc9 100644 --- a/src/routes/login/index.tsx +++ b/src/routes/login/index.tsx @@ -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);