mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Add base settings app
This commit is contained in:
1 parent
cd8deb49b0
commit
6d7819d277
4 files changed
+44
-28
No files matched your search
+6
-2
@@ -3,13 +3,16 @@ import "./Phone.css";
|
||||
import "./i18n";
|
||||
import MessageIcon from "@material-ui/icons/Email";
|
||||
import { Route } from "react-router-dom";
|
||||
import { HomeApp } from "./apps/home/components/Home";
|
||||
import { ContactsApp } from "./apps/contacts/components/Contacts";
|
||||
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 { HomeApp } from "./apps/home/components/Home";
|
||||
import { ContactsApp } from "./apps/contacts/components/Contacts";
|
||||
import { SettingsApp } from "./apps/settings/components/Settings";
|
||||
|
||||
function Phone() {
|
||||
const [settings] = useSettings();
|
||||
return (
|
||||
@@ -33,6 +36,7 @@ function Phone() {
|
||||
<div className="PhoneAppContainer">
|
||||
<Route exact path="/" component={HomeApp} />
|
||||
<Route exact path="/contacts" component={ContactsApp} />
|
||||
<Route exact path="/settings" component={SettingsApp} />
|
||||
</div>
|
||||
<NavigationBar />
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import React, { createContext, useEffect } from "react";
|
||||
import { useConfig } from "../../../config/hooks/useConfig";
|
||||
import ContactsIcon from "@material-ui/icons/Contacts";
|
||||
import { blue } from "@material-ui/core/colors";
|
||||
import { blue, grey } from "@material-ui/core/colors";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import ContactsIcon from "@material-ui/icons/Contacts";
|
||||
import SettingsIcon from '@material-ui/icons/Settings'
|
||||
|
||||
const AppsContext = createContext(null);
|
||||
|
||||
@@ -15,31 +16,15 @@ export const useApps = () => {
|
||||
name: t('APPS_CONTACTS'),
|
||||
icon: <ContactsIcon />,
|
||||
backgroundColor: blue[500],
|
||||
color: blue[50]
|
||||
color: blue[50],
|
||||
path: '/contacts'
|
||||
},
|
||||
{
|
||||
name: "Contacts1",
|
||||
},
|
||||
{
|
||||
name: "Contacts2",
|
||||
},
|
||||
{
|
||||
name: "Contacts3",
|
||||
},
|
||||
{
|
||||
name: "Contacts4",
|
||||
},
|
||||
{
|
||||
name: "Contacts4",
|
||||
},
|
||||
{
|
||||
name: "Contacts4",
|
||||
},
|
||||
{
|
||||
name: "Contacts4",
|
||||
},
|
||||
{
|
||||
name: "Contacts4",
|
||||
name: t('APPS_SETTINGS'),
|
||||
icon: <SettingsIcon />,
|
||||
backgroundColor: grey[700],
|
||||
color: grey[50],
|
||||
path: '/settings'
|
||||
}
|
||||
]);
|
||||
// eslint-disable-next-line
|
||||
|
||||
@@ -27,7 +27,7 @@ export const GridMenu = ({ apps }) => {
|
||||
key={app.name}
|
||||
tabindex="-1"
|
||||
component={Link}
|
||||
to="/contacts"
|
||||
to={app.path}
|
||||
>
|
||||
<AppIcon {...app} />
|
||||
</Grid>
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
import React from "react";
|
||||
import { AppWrapper } from "../../../ui/components";
|
||||
import { makeStyles } from "@material-ui/core";
|
||||
import { AppTitle } from "../../../ui/components/AppTitle";
|
||||
import { AppContent } from "../../../ui/components/AppContent";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { grey } from "@material-ui/core/colors";
|
||||
|
||||
const useStyles = makeStyles(() => ({
|
||||
root: {
|
||||
backgroundColor: grey[50],
|
||||
},
|
||||
title: {
|
||||
backgroundColor: grey[600],
|
||||
},
|
||||
}));
|
||||
|
||||
export const SettingsApp = () => {
|
||||
const classes = useStyles();
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<AppWrapper className={classes.root}>
|
||||
<AppTitle className={classes.title}>{t("APPS_SETTINGS")}</AppTitle>
|
||||
<AppContent>{t("COMING_SOON")}</AppContent>
|
||||
</AppWrapper>
|
||||
);
|
||||
};
|
||||
Reference in new issue
Block a user