Add an Electron app drag handle to sign-in page (#3795)

* Add Electron app drag handle to sign-in page

* Don't assign drag regions in web from JSX, results in dev-only console errors about unsupported style values
This commit is contained in:
Frank Noirot
2024-09-05 15:18:32 -04:00
committed by GitHub
parent e15c38fa23
commit e63597458a
4 changed files with 23 additions and 7 deletions

View File

@ -58,7 +58,16 @@ const SignIn = () => {
}
return (
<main className="bg-primary h-screen grid place-items-stretch m-0 p-2">
<main
className="bg-primary h-screen grid place-items-stretch m-0 p-2"
style={
isDesktop()
? ({
'-webkit-app-region': 'drag',
} as CSSProperties)
: {}
}
>
<div
style={
{
@ -68,6 +77,7 @@ const SignIn = () => {
'--circle-size-mid': '15%',
'--circle-size-end': '200%',
'--circle-timing': 'cubic-bezier(0.25, 1, 0.4, 0.9)',
...(isDesktop() ? { '-webkit-app-region': 'no-drag' } : {}),
} as CSSProperties
}
className="in-circle-hesitate body-bg py-5 px-12 rounded-lg grid place-items-center overflow-y-auto"