From 51b3a694c36a17baffaf0ea6a2c9c8cff9ff8c04 Mon Sep 17 00:00:00 2001 From: pommee Date: Sun, 28 Sep 2025 01:33:32 +0200 Subject: [PATCH] ui: generate quote for login page --- client/src/pages/app.tsx | 5 +++-- client/src/pages/login.tsx | 22 ++++++++++++---------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/client/src/pages/app.tsx b/client/src/pages/app.tsx index 2e355d3..b961545 100644 --- a/client/src/pages/app.tsx +++ b/client/src/pages/app.tsx @@ -8,13 +8,14 @@ import { Blacklist } from "./blacklist"; import Changelog from "./changelog"; import { Clients } from "./clients"; import { Home } from "./home"; -import { Login } from "./login"; import { Logs } from "./logs"; import { Prefetch } from "./prefetch"; import { Resolution } from "./resolution"; import { Settings } from "./settings"; import { Upstream } from "./upstream"; import { Whitelist } from "./whitelist"; +import { GenerateQuote } from "@/quotes"; +import Login from "./login"; function PageLoader() { return ( @@ -46,7 +47,7 @@ function App() { path="/login" element={ - + } /> diff --git a/client/src/pages/login.tsx b/client/src/pages/login.tsx index 606e282..1dd2e26 100644 --- a/client/src/pages/login.tsx +++ b/client/src/pages/login.tsx @@ -21,13 +21,14 @@ import { type ISourceOptions } from "@tsparticles/engine"; import { loadStarsPreset } from "@tsparticles/preset-stars"; import Particles, { initParticlesEngine } from "@tsparticles/react"; -const FloatingTitle = () => { +function FloatingTitle({ quote }: string) { return ( -

- GoAway -

+
+

GoAway

+

{quote}

+
); -}; +} const MemoizedParticles = () => { const [, setInit] = useState(false); @@ -51,10 +52,11 @@ const MemoizedParticles = () => { }; const MP = memo(MemoizedParticles); -export function Login({ - className, - ...props -}: React.ComponentPropsWithoutRef<"div">) { +interface LoginProps extends React.ComponentPropsWithoutRef<"div"> { + quote?: string; +} + +export default function Login({ className, quote, ...props }: LoginProps) { const [username, setUsername] = useState(""); const [password, setPassword] = useState(""); const [showPassword, setShowPassword] = useState(false); @@ -136,7 +138,7 @@ export function Login({
- +