settings: format for mobile

Fixes urbit/landscape#496
This commit is contained in:
Matilde Park 2021-02-26 17:32:54 -05:00
parent 409d07d1f4
commit e3f195870f
8 changed files with 12 additions and 3 deletions

View File

@ -5,7 +5,7 @@ import { Text } from '@tlon/indigo-react';
export function BackButton(props: {}) {
return (
<Link to="/~settings">
<Text fontSize="2" fontWeight="medium">{"<- Back to System Preferences"}</Text>
<Text display={["block", "none"]} fontSize="2" fontWeight="medium">{"<- Back to System Preferences"}</Text>
</Link>
);
}

View File

@ -75,6 +75,7 @@ export function CalmPrefs(props: {
<Formik initialValues={initialValues} onSubmit={onSubmit}>
<Form>
<Col borderBottom="1" borderBottomColor="washedGray" p="5" pt="4" gapY="5">
<BackButton/>
<Col gapY="1">
<Text color="black" fontSize={2} fontWeight="medium">
CalmEngine

View File

@ -13,6 +13,7 @@ import { S3State, BackgroundConfig } from "~/types";
import { BackgroundPicker, BgType } from "./BackgroundPicker";
import useSettingsState, { SettingsState, selectSettingsState } from "~/logic/state/settings";
import {AsyncButton} from "~/views/components/AsyncButton";
import { BackButton } from "./BackButton";
const formSchema = Yup.object().shape({
bgType: Yup.string()
@ -87,6 +88,7 @@ export default function DisplayForm(props: DisplayFormProps) {
{(props) => (
<Form>
<Col p="5" pt="4" gapY="5">
<BackButton/>
<Col gapY="2">
<Text color="black" fontSize={2} fontWeight="medium">
Display Preferences

View File

@ -75,6 +75,7 @@ export function LeapSettings(props: { api: GlobalApi; }) {
return (
<Col p="5" pt="4" gapY="5">
<BackButton/>
<Col gapY="1">
<Text fontSize="2" fontWeight="medium">
Leap

View File

@ -52,6 +52,7 @@ export function NotificationPreferences(props: {
return (
<Col p="5" pt="4" gapY="5">
<BackButton/>
<Col gapY="1">
<Text fontSize="2" fontWeight="medium">
Notification Preferences

View File

@ -64,6 +64,7 @@ export default function S3Form(props: S3FormProps): ReactElement {
>
<Form>
<Col maxWidth="600px" gapY="5">
<BackButton/>
<Col gapY="1">
<Text color="black" fontSize={2} fontWeight="medium">
S3 Storage Setup

View File

@ -8,6 +8,7 @@ import {
} from "@tlon/indigo-react";
import GlobalApi from "~/logic/api/global";
import { BackButton } from "./BackButton";
interface SecuritySettingsProps {
api: GlobalApi;
@ -17,6 +18,7 @@ export default function SecuritySettings({ api }: SecuritySettingsProps) {
const [allSessions, setAllSessions] = useState(false);
return (
<Col gapY="5" p="5" pt="4">
<BackButton/>
<Col gapY="1">
<Text fontSize={2} fontWeight="medium">
Security Preferences

View File

@ -76,9 +76,10 @@ export default function SettingsScreen(props: any) {
height="100%"
borderRight="1"
borderRightColor="washedGray"
display={["none", "flex"]}
display={hash === "" ? "flex" : ["none", "flex"]}
minWidth="250px"
maxWidth="350px"
width="100%"
maxWidth={["100vw", "350px"]}
>
<Text
display="block"