mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Contacts app!
This commit is contained in:
1 parent
3900b9fa83
commit
23e69d1193
10 files changed
+271
-11
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import React from "react";
|
||||
import { AppWrapper } from "../../../ui/components";
|
||||
import { useSettings } from "../../settings/hooks/useSettings";
|
||||
import { Box } from "@material-ui/core";
|
||||
|
||||
export const ContactsApp = () => {
|
||||
const [settings] = useSettings();
|
||||
return (
|
||||
<AppWrapper>
|
||||
<Box padding={2}>
|
||||
Contacts !!!
|
||||
</Box>
|
||||
</AppWrapper>
|
||||
);
|
||||
};
|
||||
@@ -1,7 +1,25 @@
|
||||
import React from "react";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import Avatar from "@material-ui/core/Avatar";
|
||||
import { useSettings } from "../../settings/hooks/useSettings";
|
||||
import { Button } from "@material-ui/core";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
root: {
|
||||
display: 'flex',
|
||||
'& > *': {
|
||||
margin: theme.spacing(1),
|
||||
},
|
||||
},
|
||||
avatar: {
|
||||
width: theme.spacing(8),
|
||||
height: theme.spacing(8),
|
||||
fontSize: theme.typography.h4.fontSize
|
||||
},
|
||||
}));
|
||||
|
||||
export const AppIcon = ({ label, icon }) => {
|
||||
const [settings] = useSettings();
|
||||
return <span>{label}</span>;
|
||||
const classes = useStyles();
|
||||
return <Button className={classes.root}><Avatar className={classes.avatar}>{label[0].toUpperCase()}</Avatar></Button>;
|
||||
};
|
||||
@@ -1,14 +1,16 @@
|
||||
import React from "react";
|
||||
import { AppIcon } from "./AppIcon";
|
||||
import { Grid } from "@material-ui/core";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
export const GridMenu = ({ apps }) => {
|
||||
return (
|
||||
<div style={{ display: "flex" }}>
|
||||
<Grid container spacing={6}>
|
||||
{apps.map((app) => (
|
||||
<div style={{ flex: '1 1 20%', }}>
|
||||
<AppIcon icon={app.icon} label={app.name} />
|
||||
</div>
|
||||
<Grid item component={Link} to="/contacts">
|
||||
<AppIcon icon={app.icon} label={app.name} />
|
||||
</Grid>
|
||||
))}
|
||||
</div>
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
@@ -2,6 +2,7 @@ import React from "react";
|
||||
import { AppWrapper } from "../../../ui/components";
|
||||
import { useSettings } from "../../settings/hooks/useSettings";
|
||||
import { GridMenu } from "./GridMenu";
|
||||
import { Box } from "@material-ui/core";
|
||||
|
||||
export const HomeApp = () => {
|
||||
const [settings] = useSettings();
|
||||
@@ -11,7 +12,9 @@ export const HomeApp = () => {
|
||||
backgroundImage: `${process.env.PUBLIC_URL}url(/media/backgrounds/${settings.wallpaper})`,
|
||||
}}
|
||||
>
|
||||
<GridMenu apps={settings.apps} />
|
||||
<Box padding={2}>
|
||||
<GridMenu apps={settings.apps} />
|
||||
</Box>
|
||||
</AppWrapper>
|
||||
);
|
||||
};
|
||||
@@ -1,6 +1,22 @@
|
||||
{
|
||||
"wallpaper": "default.png",
|
||||
"apps": [
|
||||
{
|
||||
"name": "Contacts",
|
||||
"icon": "contacts.png"
|
||||
},
|
||||
{
|
||||
"name": "Contacts",
|
||||
"icon": "contacts.png"
|
||||
},
|
||||
{
|
||||
"name": "Contacts",
|
||||
"icon": "contacts.png"
|
||||
},
|
||||
{
|
||||
"name": "Contacts",
|
||||
"icon": "contacts.png"
|
||||
},
|
||||
{
|
||||
"name": "Contacts",
|
||||
"icon": "contacts.png"
|
||||
|
||||
Reference in new issue
Block a user