diff --git a/web/src/components/Account.jsx b/web/src/components/Account.jsx index a6a624b8..977bf161 100644 --- a/web/src/components/Account.jsx +++ b/web/src/components/Account.jsx @@ -785,7 +785,7 @@ const Tokens = () => { }} /> - {tokens?.length > 0 && } +
{tokens?.length > 0 && }
diff --git a/web/src/components/App.jsx b/web/src/components/App.jsx index 7fdc706e..9b939ea5 100644 --- a/web/src/components/App.jsx +++ b/web/src/components/App.jsx @@ -118,7 +118,7 @@ const Main = (props) => ( flexDirection: "column", padding: 3, width: { sm: `calc(100% - ${Navigation.width}px)` }, - height: "100vh", + height: "100dvh", overflow: "auto", backgroundColor: ({ palette }) => (palette.mode === "light" ? palette.grey[100] : palette.grey[900]), }} diff --git a/web/src/components/AvatarBox.jsx b/web/src/components/AvatarBox.jsx index 10378683..37c85d4e 100644 --- a/web/src/components/AvatarBox.jsx +++ b/web/src/components/AvatarBox.jsx @@ -1,22 +1,23 @@ import * as React from "react"; -import { Avatar, Box } from "@mui/material"; +import { Avatar, Box, styled } from "@mui/material"; import logo from "../img/ntfy-filled.svg"; +const AvatarBoxContainer = styled(Box)` + display: flex; + flex-grow: 1; + justify-content: center; + flex-direction: column; + align-content: center; + align-items: center; + height: 100dvh; + max-width: min(400px, 90dvw); + margin: auto; +`; const AvatarBox = (props) => ( - + {props.children} - + ); export default AvatarBox; diff --git a/web/src/components/Login.jsx b/web/src/components/Login.jsx index 4efec255..5c1af249 100644 --- a/web/src/components/Login.jsx +++ b/web/src/components/Login.jsx @@ -45,7 +45,7 @@ const Login = () => { return ( {t("login_title")} - +
{props.children}
; +export const PrefGroup = styled("div", { attrs: { role: "table" } })` + display: flex; + flex-direction: column; + gap: 20px; +`; -export const Pref = (props) => { - const justifyContent = props.alignTop ? "normal" : "center"; - return ( -
-
+const PrefRow = styled("div")` + display: flex; + flex-direction: row; + + > :first-child { + flex: 1 0 40%; + display: flex; + flex-direction: column; + justify-content: ${(props) => (props.alignTop ? "normal" : "center")}; + } + + > :last-child { + flex: 1 0 calc(60% - 50px); + display: flex; + flex-direction: column; + justify-content: ${(props) => (props.alignTop ? "normal" : "center")}; + } + + @media (max-width: 1000px) { + flex-direction: column; + gap: 10px; + + > :first-child, + > :last-child { + flex: unset; + } + + > :last-child { + .MuiFormControl-root { + margin: 0; + } + } + } +`; + +export const Pref = (props) => ( + +
+
+ {props.title} + {props.subtitle && ({props.subtitle})} +
+ {props.description && (
- {props.title} - {props.subtitle && ({props.subtitle})} + {props.description}
- {props.description && ( -
- {props.description} -
- )} -
-
- {props.children} -
+ )}
- ); -}; +
{props.children}
+ +); diff --git a/web/src/components/Signup.jsx b/web/src/components/Signup.jsx index 2e97956f..7da54c49 100644 --- a/web/src/components/Signup.jsx +++ b/web/src/components/Signup.jsx @@ -52,7 +52,7 @@ const Signup = () => { return ( {t("signup_title")} - +