From 0c0dac598ebe03e9ab77a0b912a32259e5504a52 Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 1 Aug 2021 18:11:18 +0100 Subject: [PATCH] Move titlebar. --- src/pages/RevoltApp.tsx | 4 ++ src/pages/app.tsx | 5 -- src/pages/developer/Developer.tsx | 1 - src/pages/login/Login.tsx | 96 ++++++++++++++++--------------- 4 files changed, 55 insertions(+), 51 deletions(-) diff --git a/src/pages/RevoltApp.tsx b/src/pages/RevoltApp.tsx index 5e564f6d..bc309c30 100644 --- a/src/pages/RevoltApp.tsx +++ b/src/pages/RevoltApp.tsx @@ -10,6 +10,7 @@ import Notifications from "../context/revoltjs/Notifications"; import StateMonitor from "../context/revoltjs/StateMonitor"; import SyncManager from "../context/revoltjs/SyncManager"; +import { Titlebar } from "../components/native/Titlebar"; import BottomNavigation from "../components/navigation/BottomNavigation"; import LeftSidebar from "../components/navigation/LeftSidebar"; import RightSidebar from "../components/navigation/RightSidebar"; @@ -43,6 +44,9 @@ export default function App() { return ( <> + {window.isNative && !window.native.getConfig().frame && ( + + )} import("./login/Login")); const RevoltApp = lazy(() => import("./RevoltApp")); @@ -17,9 +15,6 @@ export function App() { return ( - {window.isNative && !window.native.getConfig().frame && ( - - )} {/* // @ts-expect-error */} }> diff --git a/src/pages/developer/Developer.tsx b/src/pages/developer/Developer.tsx index fb073026..7784d3aa 100644 --- a/src/pages/developer/Developer.tsx +++ b/src/pages/developer/Developer.tsx @@ -1,5 +1,4 @@ import { Wrench } from "@styled-icons/boxicons-solid"; -import { observer } from "mobx-react-lite"; import { useContext } from "preact/hooks"; diff --git a/src/pages/login/Login.tsx b/src/pages/login/Login.tsx index 9e3d6f44..dcd252f0 100644 --- a/src/pages/login/Login.tsx +++ b/src/pages/login/Login.tsx @@ -11,6 +11,7 @@ import { AppContext } from "../../context/revoltjs/RevoltClient"; import LocaleSelector from "../../components/common/LocaleSelector"; +import { Titlebar } from "../../components/native/Titlebar"; import { APP_VERSION } from "../../version"; import background from "./background.jpg"; import { FormCreate } from "./forms/FormCreate"; @@ -23,52 +24,57 @@ export default function Login() { const client = useContext(AppContext); return ( -
- - - -
-
- - API:{" "} - {client.configuration?.revolt ?? "???"}{" "} - · revolt.js: {LIBRARY_VERSION}{" "} - · App: {APP_VERSION} - - - - -
-
- - - - - - - - - - - - - - - - - -
-
- - ‎@lorenzoherrera - ‏· unsplash.com - + <> + {window.isNative && !window.native.getConfig().frame && ( + + )} +
+ + + +
+
+ + API:{" "} + {client.configuration?.revolt ?? "???"}{" "} + · revolt.js: {LIBRARY_VERSION}{" "} + · App: {APP_VERSION} + + + + +
+
+ + + + + + + + + + + + + + + + + +
+
+ + ‎@lorenzoherrera + ‏· unsplash.com + +
+
-
-
+ ); }