diff --git a/package.json b/package.json index 019f87b..a1bc5be 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "lodash": "^4.17.20", "react": "^16.13.1", "react-dom": "^16.13.1", + "react-hotkeys": "^2.0.0", "react-i18next": "^11.7.1", "react-router-dom": "^5.2.0", "react-scripts": "3.4.3", diff --git a/src/Phone.js b/src/Phone.js index ff4bc70..d9ce056 100644 --- a/src/Phone.js +++ b/src/Phone.js @@ -5,7 +5,7 @@ import { Route } from "react-router-dom"; import { useSettings } from "./apps/settings/hooks/useSettings"; import { NotificationBar } from "./os/components/NotificationBar"; import { NotificationIcon } from "./os/components/NotificationIcon"; -import { NavigationBar } from "./os/components/NavigationBar"; +import { Navigation } from "./os/components/Navigation"; import MessageIcon from "@material-ui/icons/Email"; import { HomeApp } from "./apps/home/components/Home"; @@ -34,14 +34,14 @@ function Phone() { }} > ]} + notifications={[{ icon: }, { icon: }]} />
- + diff --git a/src/apps/settings/components/Settings.js b/src/apps/settings/components/Settings.js index 15176d7..5adbd4b 100644 --- a/src/apps/settings/components/Settings.js +++ b/src/apps/settings/components/Settings.js @@ -1,6 +1,6 @@ import React from "react"; import { AppWrapper } from "../../../ui/components"; -import { List, ListItem, ListItemText } from "@material-ui/core"; +import { List, ListItem, ListItemText, Divider } from "@material-ui/core"; import { AppTitle } from "../../../ui/components/AppTitle"; import { AppContent } from "../../../ui/components/AppContent"; import { useTranslation } from "react-i18next"; @@ -14,9 +14,12 @@ import { useApps } from "../../appmarket/hooks/useApps"; export const SettingItem = ({ options, label, value, onClick }) => { return ( - onClick(options)} button> - - + <> + onClick(options)} button> + + + + ); }; diff --git a/src/os/components/NavigationBar.js b/src/os/components/Navigation.js similarity index 94% rename from src/os/components/NavigationBar.js rename to src/os/components/Navigation.js index 2972b0c..d51462f 100644 --- a/src/os/components/NavigationBar.js +++ b/src/os/components/Navigation.js @@ -15,7 +15,7 @@ const useStyles = makeStyles((theme) => ({ }, })); -export const NavigationBar = ({ notifications = [] }) => { +export const Navigation = () => { const classes = useStyles(); const history = useHistory(); diff --git a/src/os/components/NotificationBar.js b/src/os/components/NotificationBar.js index ba782b4..88bb2df 100644 --- a/src/os/components/NotificationBar.js +++ b/src/os/components/NotificationBar.js @@ -1,16 +1,15 @@ import React from "react"; -import { makeStyles, Typography, Grid } from "@material-ui/core"; -import { grey } from "@material-ui/core/colors"; +import { makeStyles, Typography, Grid, IconButton } from "@material-ui/core"; import { fade } from "@material-ui/core/styles/colorManipulator"; import SignalIcon from "@material-ui/icons/SignalCellular3Bar"; -const useStyles = makeStyles(() => ({ +const useStyles = makeStyles((theme) => ({ root: { - backgroundColor: fade(grey[800], 0.7), + backgroundColor: fade(theme.palette.background.paper, 0.7), height: "25px", width: "100%", - color: "white", - zIndex: 2 + color: theme.palette.text.primary, + zIndex: 2, }, item: { margin: "0 6px", @@ -18,6 +17,11 @@ const useStyles = makeStyles(() => ({ text: { position: "relative", bottom: "2px", + color: theme.palette.text.primary, + }, + icon: { + padding: '4px', + color: theme.palette.text.primary, }, })); @@ -31,9 +35,9 @@ export const NotificationBar = ({ notifications = [] }) => { wrap="nowrap" > - {notifications.map((n) => ( - - {n} + {notifications.map((notification) => ( + + {notification.icon} ))} @@ -45,7 +49,6 @@ export const NotificationBar = ({ notifications = [] }) => { {`AT&T`} diff --git a/src/ui/components/ContextMenu.js b/src/ui/components/ContextMenu.js index c5c925e..57f25a7 100644 --- a/src/ui/components/ContextMenu.js +++ b/src/ui/components/ContextMenu.js @@ -27,8 +27,8 @@ export const ContextMenu = ({ open, onClose, options }) => { {options.map((option) => ( { option.onClick(e, option); onClose(); diff --git a/yarn.lock b/yarn.lock index 99e2693..6e42c28 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8676,7 +8676,7 @@ prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.4" -prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -8887,6 +8887,13 @@ react-error-overlay@^6.0.7: resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.7.tgz#1dcfb459ab671d53f660a991513cb2f0a0553108" integrity sha512-TAv1KJFh3RhqxNvhzxj6LeT5NWklP6rDr2a0jaTfsZ5wSZWHOGeqQyejUp3xxLfPt2UpyJEcVQB/zyPcmonNFA== +react-hotkeys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/react-hotkeys/-/react-hotkeys-2.0.0.tgz#a7719c7340cbba888b0e9184f806a9ec0ac2c53f" + integrity sha512-3n3OU8vLX/pfcJrR3xJ1zlww6KS1kEJt0Whxc4FiGV+MJrQ1mYSYI3qS/11d2MJDFm8IhOXMTFQirfu6AVOF6Q== + dependencies: + prop-types "^15.6.1" + react-i18next@^11.7.1: version "11.7.1" resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.7.1.tgz#80c993bf7c4f07937ce0e5ff4e2d7d97bfe3f42f"