Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

ui: complete setting ui

alihamuhdd8219d73ae7
diff --git a/apps/web/src/components/settings/index.js b/apps/web/src/components/settings/index.js
index 22501ff50..1ada9c8db 100644
--- a/apps/web/src/components/settings/index.js
+++ b/apps/web/src/components/settings/index.js
@@ -1,18 +1,20 @@
-import React from "react";
+import React ,{ useState, useEffect } from "react";
import TimeAgo from "timeago-react";
import { db, ev } from "../../common";
import { showSnack } from "../snackbar";
import ListItem from "../list-item";
import { Virtuoso as List } from "react-virtuoso";
-import {Box,Button} from 'rebass';
-import '../../App.css'
+import { Box, Button, Flex, Text } from "rebass";
+import "../../app.css";
+import * as Icon from "react-feather";
+import { Switch } from "@rebass/forms";
const dropdownRefs = [];
const menuItems = [
{ title: "Restore" },
{
title: "Delete",
- color: "red",
+ color: "red"
}
];
@@ -21,11 +23,80 @@ function sendOpenNoteEvent(note) {
}
const Setting = () => {
+ const [check, setCheck] = useState(false);
+
return (
<>
- <Button className='unselectable' variant='setting'>General</Button>
- </>
+ <Button className="unselectable" variant="setting">
+ General
+ </Button>
+ <Button className="unselectable" variant="setting">
+ Account
+ </Button>
+ <Box
+ sx={{
+ borderLeft: "0px Solid",
+ borderRight: "0px Solid",
+ borderTop: "0px Solid",
+ borderBottom: "1px Solid",
+ borderColor: "border"
+ }}
+ py='15px'
+ >
+ <Flex
+ className="unselectable"
+ fontSize="body"
+ alignItems="center"
+ >
+ <Text px='16px' sx={{ fontFamily: "body", fontSize: "title" }}>
+ Theme
+ </Text>
+ </Flex>
+
+ <Flex flexDirection='column' justifyContent='center' mx='7%'>
+ <Flex
+ flexWrap="wrap"
+ sx={{ marginBottom: 2 }}
+ justifyContent="left"
+ >
+ {[
+ { label: "red", code: "#ed2d37" },
+ { label: "orange", code: "#ec6e05" },
+ { label: "yellow", code: "yellow" },
+ { label: "green", code: "green" },
+ { label: "blue", code: "blue" },
+ { label: "purple", code: "purple" },
+ { label: "gray", code: "gray" },
+ { label: "lightblue", code: "#46F0F0" },
+ { label: "indigo", code: "#F032E6" },
+ { label: "lightpink", code: "#FABEBE" }
+ ].map(color => (
+ <Box sx={{ cursor: "pointer" }}>
+ <Icon.Circle size={50} fill={color.code} strokeWidth={0} />
+ </Box>
+ ))}
+ </Flex>
+ <Flex flexDirection="row" justifyContent="center">
+ <Text width={1 / 2} >
+ Dark Mode
+ </Text>{" "}
+ <Flex width={1 / 2} justifyContent="right" >
+ <Switch className="unselectable" onClick={()=>{ setCheck(!check);}} checked={check}/>
+ </Flex>
+ </Flex>
+ </Flex>
+ </Box>
+ <Button className="unselectable" variant="setting">
+ Terms of Service
+ </Button>
+ <Button className="unselectable" variant="setting">
+ Privacy Policy
+ </Button>
+ <Button className="unselectable" variant="setting">
+ About
+ </Button>
+ </>
);
};
-export default Setting;
\ No newline at end of file
+export default Setting;
diff --git a/apps/web/src/theme.js b/apps/web/src/theme.js
index ea6d507d0..3ab16cd6e 100644
--- a/apps/web/src/theme.js
+++ b/apps/web/src/theme.js
@@ -154,7 +154,9 @@ export default {
color:'text',
textAlign:'left',
fontSize:'title',
- fontFamily:'body'
+ fontFamily:'body',
+ py:'15px',
+ mx:'5px'
}
},
shadows: shadowsLight
diff --git a/apps/web/src/views/Settings.js b/apps/web/src/views/Settings.js
index e70a01eca..bda3aa6d2 100644
--- a/apps/web/src/views/Settings.js
+++ b/apps/web/src/views/Settings.js
@@ -6,6 +6,7 @@ import Setting from '../components/settings';
import Search from "../components/search";
import * as Icon from "react-feather";
import { Virtuoso as List } from "react-virtuoso";
+import {Switch} from '@rebass/forms';