Notification bar

This commit is contained in:
J Francisco Rader committed 2020-08-22 05:19:35 -03:00
1 parent 205dcabf12
commit 68fd91d4d0
17 files changed
+191 -27

No files matched your search

+15 -2
View File
@@ -2,16 +2,17 @@ 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 { useTranslation } from "react-i18next";
const AppsContext = createContext(null);
export const useApps = () => {
const [apps, setApps] = useConfig(AppsContext);
const { t } = useTranslation();
useEffect(() => {
setApps("preinstalled", [
{
name: "Contacts",
name: t('APPS_CONTACTS'),
icon: <ContactsIcon />,
backgroundColor: blue[500],
color: blue[50]
@@ -28,6 +29,18 @@ export const useApps = () => {
{
name: "Contacts4",
},
{
name: "Contacts4",
},
{
name: "Contacts4",
},
{
name: "Contacts4",
},
{
name: "Contacts4",
}
]);
// eslint-disable-next-line
}, []);
+4 -4
View File
@@ -4,6 +4,7 @@ import { makeStyles } from "@material-ui/core";
import lightBlue from "@material-ui/core/colors/lightBlue";
import { AppTitle } from "../../../ui/components/AppTitle";
import { AppContent } from "../../../ui/components/AppContent";
import { useTranslation } from "react-i18next";
const useStyles = makeStyles(() => ({
root: {
@@ -16,12 +17,11 @@ const useStyles = makeStyles(() => ({
export const ContactsApp = () => {
const classes = useStyles();
const { t } = useTranslation();
return (
<AppWrapper className={classes.root}>
<AppTitle className={classes.title}>Contacts</AppTitle>
<AppContent>
Coming soon...
</AppContent>
<AppTitle className={classes.title}>{t("APPS_CONTACTS")}</AppTitle>
<AppContent>{t("COMING_SOON")}</AppContent>
</AppWrapper>
);
};
+29 -7
View File
@@ -1,16 +1,38 @@
import React from "react";
import { AppIcon } from "../../../ui/components/AppIcon";
import { Grid } from "@material-ui/core";
import { Grid, makeStyles } from "@material-ui/core";
import { Link } from "react-router-dom";
const useStyles = makeStyles(theme => ({
root: {
marginTop: theme.spacing(3)
},
item: {
marginTop: theme.spacing(3),
width: '20%'
}
}));
export const GridMenu = ({ apps }) => {
const classes = useStyles();
return (
<Grid container>
{apps && apps.length && apps.map((app) => (
<Grid item xs={3} key={app.name} component={Link} to="/contacts">
<AppIcon {...app} />
</Grid>
))}
<Grid container justify="center">
<Grid container item>
{apps &&
apps.length &&
apps.map((app) => (
<Grid
item
className={classes.item}
key={app.name}
tabindex="-1"
component={Link}
to="/contacts"
>
<AppIcon {...app} />
</Grid>
))}
</Grid>
</Grid>
);
};
+2 -8
View File
@@ -1,21 +1,15 @@
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";
import { useApps } from "../../appmarket/hooks/useApps";
export const HomeApp = () => {
const [settings] = useSettings();
const [apps] = useApps();
console.log(apps)
return (
<AppWrapper
style={{
backgroundImage: `${process.env.PUBLIC_URL}url(/media/backgrounds/${settings.wallpaper})`,
}}
>
<Box mt={6} px={4}>{apps && <GridMenu apps={apps.preinstalled} />}</Box>
<AppWrapper>
<Box width="100%" mt={6} px={1}>{apps && <GridMenu apps={apps.preinstalled} />}</Box>
</AppWrapper>
);
};
Whitespace-only changes.
+2 -1
View File
@@ -1,3 +1,4 @@
{
"wallpaper": "default.png"
"wallpaper": "default.png",
"frame": "default.png"
}