remove old page, new style for loader, increase debounce time
This commit is contained in:
@@ -401,12 +401,37 @@ const SuggestionDecoration = Extension.create({
|
|||||||
span.className = "inline-flex items-center ml-1";
|
span.className = "inline-flex items-center ml-1";
|
||||||
span.style.pointerEvents = "none";
|
span.style.pointerEvents = "none";
|
||||||
|
|
||||||
// Create a simple spinner using CSS animation
|
// Use Spinner component
|
||||||
const spinner = document.createElement("span");
|
const spinner = document.createElement("span");
|
||||||
spinner.className =
|
spinner.className = "text-red inline-block";
|
||||||
"inline-block w-3 h-3 border-2 border-current border-t-transparent rounded-full animate-spin";
|
|
||||||
spinner.style.color = "rgb(239, 68, 68)"; // Tailwind red-500
|
spinner.style.color = "rgb(239, 68, 68)"; // Tailwind red-500
|
||||||
spinner.style.opacity = "0.5";
|
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);
|
span.appendChild(spinner);
|
||||||
return span;
|
return span;
|
||||||
@@ -1574,7 +1599,6 @@ export default function TextEditor(props: TextEditorProps) {
|
|||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debounced infill trigger (250ms) - only if enabled and (desktop OR fullscreen mode)
|
|
||||||
if (infillConfig() && !isInitialLoad && infillEnabled()) {
|
if (infillConfig() && !isInitialLoad && infillEnabled()) {
|
||||||
const isMobileNotFullscreen =
|
const isMobileNotFullscreen =
|
||||||
typeof window !== "undefined" &&
|
typeof window !== "undefined" &&
|
||||||
@@ -1588,7 +1612,7 @@ export default function TextEditor(props: TextEditorProps) {
|
|||||||
}
|
}
|
||||||
infillDebounceTimer = setTimeout(() => {
|
infillDebounceTimer = setTimeout(() => {
|
||||||
requestInfill();
|
requestInfill();
|
||||||
}, 250);
|
}, 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -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>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -15,7 +15,7 @@ import { Fire } from "~/components/icons/Fire";
|
|||||||
import CommentSectionWrapper from "~/components/blog/CommentSectionWrapper";
|
import CommentSectionWrapper from "~/components/blog/CommentSectionWrapper";
|
||||||
import PostBodyClient from "~/components/blog/PostBodyClient";
|
import PostBodyClient from "~/components/blog/PostBodyClient";
|
||||||
import type { Comment, CommentReaction, UserPublicData } from "~/types/comment";
|
import type { Comment, CommentReaction, UserPublicData } from "~/types/comment";
|
||||||
import { TerminalSplash } from "~/components/TerminalSplash";
|
import { Spinner } from "~/components/Spinner";
|
||||||
import { api } from "~/lib/api";
|
import { api } from "~/lib/api";
|
||||||
import "../post.css";
|
import "../post.css";
|
||||||
|
|
||||||
@@ -299,7 +299,14 @@ export default function PostPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Show when={data()} fallback={<TerminalSplash />}>
|
<Show
|
||||||
|
when={data()}
|
||||||
|
fallback={
|
||||||
|
<div class="flex h-screen items-center justify-center">
|
||||||
|
<Spinner size="xl" />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
>
|
||||||
{(loadedData) => {
|
{(loadedData) => {
|
||||||
// Handle redirect for by-id route
|
// Handle redirect for by-id route
|
||||||
if ("redirect" in loadedData()) {
|
if ("redirect" in loadedData()) {
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ export default function LoginPage() {
|
|||||||
const result = await response.json();
|
const result = await response.json();
|
||||||
|
|
||||||
if (response.ok && result.result?.data) {
|
if (response.ok && result.result?.data) {
|
||||||
navigate("/account");
|
navigate("/account", { replace: true });
|
||||||
} else {
|
} else {
|
||||||
const errorMsg =
|
const errorMsg =
|
||||||
result.error?.message ||
|
result.error?.message ||
|
||||||
@@ -207,8 +207,7 @@ export default function LoginPage() {
|
|||||||
if (response.ok && result.result?.data?.success) {
|
if (response.ok && result.result?.data?.success) {
|
||||||
setShowPasswordSuccess(true);
|
setShowPasswordSuccess(true);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
navigate(-1); // Go back
|
navigate("/account", { replace: true });
|
||||||
window.location.reload(); // Refresh to update session
|
|
||||||
}, 500);
|
}, 500);
|
||||||
} else {
|
} else {
|
||||||
setShowPasswordError(true);
|
setShowPasswordError(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user