From 89d8733494bb4e415dd8e689ffbcd8529726ba61 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Tue, 3 May 2022 20:03:05 -0700 Subject: [PATCH] Split layouts --- src/renderer/layouts/auth/AuthLayout.module.scss | 15 +++++++++++++++ src/renderer/layouts/auth/AuthLayout.tsx | 16 ++++++++++++++++ src/renderer/layouts/index.ts | 2 ++ .../layouts/window/WindowLayout.module.scss | 10 ---------- src/renderer/layouts/window/WindowLayout.tsx | 1 - 5 files changed, 33 insertions(+), 11 deletions(-) create mode 100644 src/renderer/layouts/auth/AuthLayout.module.scss create mode 100644 src/renderer/layouts/auth/AuthLayout.tsx diff --git a/src/renderer/layouts/auth/AuthLayout.module.scss b/src/renderer/layouts/auth/AuthLayout.module.scss new file mode 100644 index 0000000..faca23b --- /dev/null +++ b/src/renderer/layouts/auth/AuthLayout.module.scss @@ -0,0 +1,15 @@ +.container { + display: flex; + height: 100%; +} + +.window { + display: flex; + position: absolute; + width: 100%; + height: 50px; + z-index: 1000; + user-select: none; + -webkit-user-select: none; + -webkit-app-region: drag; +} diff --git a/src/renderer/layouts/auth/AuthLayout.tsx b/src/renderer/layouts/auth/AuthLayout.tsx new file mode 100644 index 0000000..ae242c8 --- /dev/null +++ b/src/renderer/layouts/auth/AuthLayout.tsx @@ -0,0 +1,16 @@ +import { Outlet } from 'react-router-dom'; + +import styles from './AuthLayout.module.scss'; + +const AuthLayout = () => { + return ( + <> +
+
+ +
+ + ); +}; + +export default AuthLayout; diff --git a/src/renderer/layouts/index.ts b/src/renderer/layouts/index.ts index 4d3a9a1..b85fd17 100644 --- a/src/renderer/layouts/index.ts +++ b/src/renderer/layouts/index.ts @@ -1 +1,3 @@ +export { default as AuthLayout } from './auth/AuthLayout'; export { default as DefaultLayout } from './default/DefaultLayout'; +export { default as WindowLayout } from './window/WindowLayout'; diff --git a/src/renderer/layouts/window/WindowLayout.module.scss b/src/renderer/layouts/window/WindowLayout.module.scss index 1fb0400..f5dd926 100644 --- a/src/renderer/layouts/window/WindowLayout.module.scss +++ b/src/renderer/layouts/window/WindowLayout.module.scss @@ -1,13 +1,3 @@ -.window { - display: flex; - position: absolute; - height: 50px; - z-index: 100; - user-select: none; - -webkit-user-select: none; - -webkit-app-region: drag; -} - .group { position: absolute; top: 0; diff --git a/src/renderer/layouts/window/WindowLayout.tsx b/src/renderer/layouts/window/WindowLayout.tsx index 238b47f..97cd47f 100644 --- a/src/renderer/layouts/window/WindowLayout.tsx +++ b/src/renderer/layouts/window/WindowLayout.tsx @@ -20,7 +20,6 @@ const WindowLayout = ({ style }: WindowControlsProps) => { <> {isElectron() && ( <> -
{style === 'windows' && ( <>