mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +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 "./i18n";
|
||||||
import MessageIcon from "@material-ui/icons/Email";
|
import MessageIcon from "@material-ui/icons/Email";
|
||||||
import { Route } from "react-router-dom";
|
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 { useSettings } from "./apps/settings/hooks/useSettings";
|
||||||
import { NotificationBar } from "./os/components/NotificationBar";
|
import { NotificationBar } from "./os/components/NotificationBar";
|
||||||
import { NotificationIcon } from "./os/components/NotificationIcon";
|
import { NotificationIcon } from "./os/components/NotificationIcon";
|
||||||
import { NavigationBar } from "./os/components/NavigationBar";
|
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() {
|
function Phone() {
|
||||||
const [settings] = useSettings();
|
const [settings] = useSettings();
|
||||||
return (
|
return (
|
||||||
@@ -33,6 +36,7 @@ function Phone() {
|
|||||||
<div className="PhoneAppContainer">
|
<div className="PhoneAppContainer">
|
||||||
<Route exact path="/" component={HomeApp} />
|
<Route exact path="/" component={HomeApp} />
|
||||||
<Route exact path="/contacts" component={ContactsApp} />
|
<Route exact path="/contacts" component={ContactsApp} />
|
||||||
|
<Route exact path="/settings" component={SettingsApp} />
|
||||||
</div>
|
</div>
|
||||||
<NavigationBar />
|
<NavigationBar />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import React, { createContext, useEffect } from "react";
|
import React, { createContext, useEffect } from "react";
|
||||||
import { useConfig } from "../../../config/hooks/useConfig";
|
import { useConfig } from "../../../config/hooks/useConfig";
|
||||||
import ContactsIcon from "@material-ui/icons/Contacts";
|
import { blue, grey } from "@material-ui/core/colors";
|
||||||
import { blue } from "@material-ui/core/colors";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import ContactsIcon from "@material-ui/icons/Contacts";
|
||||||
|
import SettingsIcon from '@material-ui/icons/Settings'
|
||||||
|
|
||||||
const AppsContext = createContext(null);
|
const AppsContext = createContext(null);
|
||||||
|
|
||||||
@@ -15,31 +16,15 @@ export const useApps = () => {
|
|||||||
name: t('APPS_CONTACTS'),
|
name: t('APPS_CONTACTS'),
|
||||||
icon: <ContactsIcon />,
|
icon: <ContactsIcon />,
|
||||||
backgroundColor: blue[500],
|
backgroundColor: blue[500],
|
||||||
color: blue[50]
|
color: blue[50],
|
||||||
|
path: '/contacts'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Contacts1",
|
name: t('APPS_SETTINGS'),
|
||||||
},
|
icon: <SettingsIcon />,
|
||||||
{
|
backgroundColor: grey[700],
|
||||||
name: "Contacts2",
|
color: grey[50],
|
||||||
},
|
path: '/settings'
|
||||||
{
|
|
||||||
name: "Contacts3",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Contacts4",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Contacts4",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Contacts4",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Contacts4",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Contacts4",
|
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export const GridMenu = ({ apps }) => {
|
|||||||
key={app.name}
|
key={app.name}
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
component={Link}
|
component={Link}
|
||||||
to="/contacts"
|
to={app.path}
|
||||||
>
|
>
|
||||||
<AppIcon {...app} />
|
<AppIcon {...app} />
|
||||||
</Grid>
|
</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