feat: update create account screen

This commit is contained in:
2024-01-07 07:42:08 +07:00
parent 8e8e6fe244
commit 70707f69c8
23 changed files with 765 additions and 416 deletions

View File

@@ -14,17 +14,17 @@
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-hover-card": "^1.0.7",
"@tanstack/react-query": "^5.17.0",
"@tanstack/react-query": "^5.17.1",
"@tauri-apps/api": "2.0.0-alpha.13",
"@tauri-apps/plugin-http": "2.0.0-alpha.6",
"@tauri-apps/plugin-os": "2.0.0-alpha.6",
"framer-motion": "^10.17.0",
"framer-motion": "^10.17.6",
"jotai": "^2.6.1",
"minidenticons": "^4.2.0",
"nostr-tools": "~1.17.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hotkeys-hook": "^4.4.1",
"react-hotkeys-hook": "^4.4.3",
"react-router-dom": "^6.21.1",
"slate": "^0.101.5",
"slate-react": "^0.101.5",

View File

@@ -1,18 +1,34 @@
import { SettingsIcon } from "@lume/icons";
import { ArrowLeftIcon, SettingsIcon } from "@lume/icons";
import { type Platform } from "@tauri-apps/plugin-os";
import { Outlet } from "react-router-dom";
import { Outlet, useLocation, useNavigate } from "react-router-dom";
import { WindowTitleBar } from "../titlebar";
export function AuthLayout({ platform }: { platform: Platform }) {
const location = useLocation();
const navigate = useNavigate();
const canGoBack = location.key === "default";
return (
<div className="flex flex-col w-screen h-screen bg-black">
<div className="flex flex-col w-screen h-screen bg-black text-neutral-50">
{platform !== "macos" ? (
<WindowTitleBar platform={platform} />
) : (
<div data-tauri-drag-region className="h-9 shrink-0" />
)}
<div className="relative w-full h-full">
<div className="absolute top-0 right-9">
<div className="absolute top-0 z-10 flex items-center justify-between w-full px-9">
{canGoBack ? (
<button
type="button"
onClick={() => navigate(-1)}
className="inline-flex items-center justify-center rounded-lg size-10 group"
>
<ArrowLeftIcon className="size-6 text-neutral-700 group-hover:text-neutral-500" />
</button>
) : (
<div />
)}
<div className="inline-flex items-center justify-center rounded-lg size-10 bg-neutral-950 group hover:bg-neutral-900">
<SettingsIcon className="size-6 text-neutral-700 group-hover:text-neutral-500" />
</div>