11import { DraggableTitleBar } from "@components/DraggableTitleBar" ;
2+ import { TorchGlow } from "@components/TorchGlow" ;
23import { useAuthStore } from "@features/auth/stores/authStore" ;
34import { Box , Button , Flex , Text } from "@radix-ui/themes" ;
45import caveHero from "@renderer/assets/images/cave-hero.jpg" ;
56import twigLogo from "@renderer/assets/images/twig-logo.svg" ;
67import { trpcVanilla } from "@renderer/trpc/client" ;
78import type { CloudRegion } from "@shared/types/oauth" ;
89import { useMutation } from "@tanstack/react-query" ;
9- import { useState } from "react" ;
10+ import { useRef , useState } from "react" ;
1011import { LoginForm } from "./LoginForm" ;
1112import { SignupForm } from "./SignupForm" ;
1213
@@ -41,6 +42,7 @@ export const getErrorMessage = (error: unknown) => {
4142type AuthMode = "login" | "signup" ;
4243
4344export function AuthScreen ( ) {
45+ const caveBackgroundRef = useRef < HTMLDivElement > ( null ) ;
4446 const [ region , setRegion ] = useState < CloudRegion > ( "us" ) ;
4547 const [ authMode , setAuthMode ] = useState < AuthMode > ( "login" ) ;
4648 const { loginWithOAuth, signupWithOAuth } = useAuthStore ( ) ;
@@ -89,8 +91,13 @@ export function AuthScreen() {
8991 const errorMessage = getErrorMessage ( error ) ;
9092
9193 return (
92- < Flex height = "100vh" style = { { position : "relative" } } >
94+ < Flex
95+ ref = { caveBackgroundRef }
96+ height = "100vh"
97+ style = { { position : "relative" } }
98+ >
9399 < DraggableTitleBar />
100+ < TorchGlow containerRef = { caveBackgroundRef } alwaysShow />
94101 { /* Full-screen cave painting background */ }
95102 < div
96103 style = { {
@@ -112,7 +119,7 @@ export function AuthScreen() {
112119 zIndex : 1 ,
113120 } }
114121 >
115- < Flex direction = "column" gap = "6" style = { { maxWidth : "320px" } } >
122+ < Flex direction = "column" gap = "6" style = { { width : "320px" } } >
116123 < Flex direction = "column" gap = "4" >
117124 < img
118125 src = { twigLogo }
0 commit comments