From 93db9fe54aa75bea5be468c6595f2c6437b8d664 Mon Sep 17 00:00:00 2001 From: Alois Date: Fri, 10 Apr 2026 20:48:26 +0200 Subject: [PATCH] Made the settings a little nicer --- apps/web/src/features/settings/layout.tsx | 12 +++- apps/web/src/routes/settings/security.tsx | 73 ++++++++++++----------- 2 files changed, 48 insertions(+), 37 deletions(-) diff --git a/apps/web/src/features/settings/layout.tsx b/apps/web/src/features/settings/layout.tsx index fb84f4d..53b1a74 100644 --- a/apps/web/src/features/settings/layout.tsx +++ b/apps/web/src/features/settings/layout.tsx @@ -2,17 +2,25 @@ import { Button } from "@tensamin/ui/cmp/button"; import options from "@tensamin/shared/settings"; import { cn, useIsMobile } from "@tensamin/ui/utils"; -import { Outlet, useNavigate } from "@tanstack/react-router"; +import { Outlet, useLocation, useNavigate } from "@tanstack/react-router"; export default function Screen() { const isMobile = useIsMobile(); + const location = useLocation(); return (
{!isMobile && } {/* Page */} -
+
+

+ {location.pathname + .split("/") + .pop() + ?.replace(/-/g, " ") + .replace(/\b\w/g, (l) => l.toUpperCase())} +

diff --git a/apps/web/src/routes/settings/security.tsx b/apps/web/src/routes/settings/security.tsx index f52636f..520177c 100644 --- a/apps/web/src/routes/settings/security.tsx +++ b/apps/web/src/routes/settings/security.tsx @@ -71,41 +71,44 @@ function QrCodeLogin() { const [qrCodeVisible, setQrCodeVisible] = useState(false); return ( -
- {qrCodeBase64 && ( - QR Code - )} - {!qrCodeVisible && ( - <> -
-
- - Show QR Code} /> - - - Are you sure? - - This will expose your private key! This is the same as - sharing the .tu file! It's very tedious to change the - private key, so only do this if you are sure no one can - steal it! - - - - Cancel - setQrCodeVisible(true)}> - Show QR Code - - } - /> - - - -
- - )} +
+

Login QR Code

+
+ {qrCodeBase64 && ( + QR Code + )} + {!qrCodeVisible && ( + <> +
+
+ + Show QR Code} /> + + + Are you sure? + + Exposing this QR code is the same as sharing your .tu + file. Since changing your private key is quite tedious, + only do this when you're confident the key won't be + compromised. + + + + Cancel + setQrCodeVisible(true)}> + Show QR Code + + } + /> + + + +
+ + )} +
); }