diff --git a/phone/public/media/backgrounds/beach.jpg b/phone/public/media/backgrounds/beach.jpg new file mode 100644 index 0000000..ec32c72 Binary files /dev/null and b/phone/public/media/backgrounds/beach.jpg differ diff --git a/phone/public/media/backgrounds/minimal.jpg b/phone/public/media/backgrounds/minimal.jpg new file mode 100644 index 0000000..fc29c58 Binary files /dev/null and b/phone/public/media/backgrounds/minimal.jpg differ diff --git a/phone/public/media/backgrounds/surf.jpg b/phone/public/media/backgrounds/surf.jpg new file mode 100644 index 0000000..ad389ce Binary files /dev/null and b/phone/public/media/backgrounds/surf.jpg differ diff --git a/phone/public/media/backgrounds/waves.jpg b/phone/public/media/backgrounds/waves.jpg new file mode 100644 index 0000000..92f8567 Binary files /dev/null and b/phone/public/media/backgrounds/waves.jpg differ diff --git a/phone/src/Phone.css b/phone/src/Phone.css index f4daefb..616c518 100644 --- a/phone/src/Phone.css +++ b/phone/src/Phone.css @@ -24,7 +24,6 @@ overflow: hidden; position: absolute; background-color: black; - border-top: 2px solid black; border-left: 4px solid black; border-right: 4px solid black; bottom: 100px; diff --git a/phone/src/Phone.tsx b/phone/src/Phone.tsx index b6bc26c..6d1c88a 100644 --- a/phone/src/Phone.tsx +++ b/phone/src/Phone.tsx @@ -1,55 +1,55 @@ -import React from "react"; -import "./Phone.css"; -import "./i18n"; -import { Route } from "react-router-dom"; -import { useSettings } from "./apps/settings/hooks/useSettings"; -import MessageIcon from "@material-ui/icons/Email"; -import { CallModal } from "./modal/components/CallModal"; -import { HomeApp } from "./apps/home/components/Home"; -import { ThemeProvider } from "@material-ui/core"; -import { useInitKeyboard } from "./os/keyboard/hooks/useKeyboard"; -import { NotificationIcon } from "./os/notifications/components/NotificationIcon"; -import { NotificationBar } from "./os/notifications/components/NotificationBar"; -import { Navigation } from "./os/navigation-bar/components/Navigation"; -import { useNuiService } from "./os/nui-events/hooks/useNuiService"; -import { useSimcardService } from "./os/simcard/hooks/useSimcardService"; -import { usePhoneService } from "./os/phone/hooks/usePhoneService"; -import { useApps } from "./os/apps/hooks/useApps"; +import React from 'react'; +import './Phone.css'; +import './i18n'; +import { Route } from 'react-router-dom'; +import { useSettings } from './apps/settings/hooks/useSettings'; +import MessageIcon from '@material-ui/icons/Email'; +import { CallModal } from './modal/components/CallModal'; +import { HomeApp } from './apps/home/components/Home'; +import { ThemeProvider } from '@material-ui/core'; +import { useInitKeyboard } from './os/keyboard/hooks/useKeyboard'; +import { NotificationIcon } from './os/notifications/components/NotificationIcon'; +import { NotificationBar } from './os/notifications/components/NotificationBar'; +import { Navigation } from './os/navigation-bar/components/Navigation'; +import { useNuiService } from './os/nui-events/hooks/useNuiService'; +import { useSimcardService } from './os/simcard/hooks/useSimcardService'; +import { usePhoneService } from './os/phone/hooks/usePhoneService'; +import { useApps } from './os/apps/hooks/useApps'; -import { useContactsService } from "./apps/contacts/hooks/useContactsService"; -import { useTwitterService } from "./apps/twitter/hooks/useTwitterService"; -import { useSelloutService } from "./apps/sellout/hooks/useSelloutService"; +import { useContactsService } from './apps/contacts/hooks/useContactsService'; +import { useTwitterService } from './apps/twitter/hooks/useTwitterService'; +import { useSelloutService } from './apps/sellout/hooks/useSelloutService'; import { useBankService } from './apps/bank/hooks/useBankService'; -import { useNotesService } from "./apps/notes/hooks/useNotesService"; +import { useNotesService } from './apps/notes/hooks/useNotesService'; //These events are just for testing. Comment it out before building. setTimeout(() => { window.dispatchEvent( - new MessageEvent("message", { + new MessageEvent('message', { data: { - app: "SIMCARD", - method: "setNumber", - data: "111-1134", + app: 'SIMCARD', + method: 'setNumber', + data: '111-1134', }, }) ); }, 1000); -setTimeout(() => { - window.dispatchEvent( - new MessageEvent("message", { - data: { - app: "PHONE", - method: "setVisibility", - data: true, - }, - }) - ); +setTimeout(() => { + window.dispatchEvent( + new MessageEvent('message', { + data: { + app: 'PHONE', + method: 'setVisibility', + data: true, + }, + }) + ); }, 1000); setTimeout(() => { window.dispatchEvent( - new MessageEvent("message", { + new MessageEvent('message', { data: { app: 'NOTES', method: 'setNotes', @@ -57,56 +57,55 @@ setTimeout(() => { { id: 1, title: 'First note', - content: 'Hello, this is my shitty note' + content: 'Hello, this is my shitty note', }, { id: 2, title: 'Second note', - content: 'Hello, this is another shitty note' + content: 'Hello, this is another shitty note', }, - ] - } + ], + }, }) - ) -}, 1000) + ); +}, 1000); setTimeout(() => { - new MessageEvent("messsage", { + new MessageEvent('messsage', { data: { - app: "BANK", - method: "setNotification", + app: 'BANK', + method: 'setNotification', data: { id: 1, - message: "ahhaha" - } - } - }) -}, 1000) + message: 'ahhaha', + }, + }, + }); +}, 1000); setTimeout(() => { - new MessageEvent("messsage", { + new MessageEvent('messsage', { data: { - app: "TWITTER", - method: "setNotification", + app: 'TWITTER', + method: 'setNotification', data: { id: 1, - message: "ahhaha" - } - } - }) -}, 1000) + message: 'ahhaha', + }, + }, + }); +}, 1000); setTimeout(() => { window.dispatchEvent( - new MessageEvent("message", { + new MessageEvent('message', { data: { - app: "BANK", - method: "setCredentials", - data: - { - name: "Firstname Lastname", - balance: 2000 - } + app: 'BANK', + method: 'setCredentials', + data: { + name: 'Firstname Lastname', + balance: 2000, + }, }, }) ); @@ -114,76 +113,46 @@ setTimeout(() => { setTimeout(() => { window.dispatchEvent( - new MessageEvent("message", { + new MessageEvent('message', { data: { app: 'BANK', method: 'setTransaction', - data: [ - { - id: 1, - amount: 200, - type: 'Deposit', - source: "chip" - },{ - id: 2, - amount: 200, - type: 'Withdraw', - source: "chip" - }, - { - id: 3, - amount: 200, - type: 'Withdraw', - source: "chip" - }, - { - id: 4, - amount: 50, - type: 'Deposit', - source: "chip" - }, - { - id: 4, - amount: 50, - type: 'Deposit', - source: "chip" - }, - { - id: 4, - amount: 50, - type: 'Deposit', - source: "chip" - } - ] - } - }) - ) -}, 1000) - -setTimeout(() => { - window.dispatchEvent( - new MessageEvent("message", { - data: { - app: "CONTACTS", - method: "setContacts", data: [ { id: 1, - number: "345-4366", - display: "chip", - avatar: 'https://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Rotating_earth_%28large%29.gif/200px-Rotating_earth_%28large%29.gif' + amount: 200, + type: 'Deposit', + source: 'chip', }, { id: 2, - number: "456-4366", - display: "shit", - avatar: '' + amount: 200, + type: 'Withdraw', + source: 'chip', }, { id: 3, - number: "123-4366", - display: "rocky", - avatar: 'https://i.imgur.com/B8ta5Aa.jpeg' + amount: 200, + type: 'Withdraw', + source: 'chip', + }, + { + id: 4, + amount: 50, + type: 'Deposit', + source: 'chip', + }, + { + id: 4, + amount: 50, + type: 'Deposit', + source: 'chip', + }, + { + id: 4, + amount: 50, + type: 'Deposit', + source: 'chip', }, ], }, @@ -193,27 +162,58 @@ setTimeout(() => { setTimeout(() => { window.dispatchEvent( - new MessageEvent("message", { + new MessageEvent('message', { data: { - app: "SELLOUT", - method: "setListings", + app: 'CONTACTS', + method: 'setContacts', data: [ { id: 1, - name: "Some guy", - number: "123-4567", - title: "Car", - description: - "Selling this cool car", - url: "https://i.imgur.com/ROmGTwi.jpeg", + number: '345-4366', + display: 'chip', + avatar: + 'https://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Rotating_earth_%28large%29.gif/200px-Rotating_earth_%28large%29.gif', }, { id: 2, - name: "Some other dude", - number: "666-6666", - title: "Material", - description: "Selling my wife", - url: "", + number: '456-4366', + display: 'shit', + avatar: '', + }, + { + id: 3, + number: '123-4366', + display: 'rocky', + avatar: 'https://i.imgur.com/B8ta5Aa.jpeg', + }, + ], + }, + }) + ); +}, 1000); + +setTimeout(() => { + window.dispatchEvent( + new MessageEvent('message', { + data: { + app: 'SELLOUT', + method: 'setListings', + data: [ + { + id: 1, + name: 'Some guy', + number: '123-4567', + title: 'Car', + description: 'Selling this cool car', + url: 'https://i.imgur.com/ROmGTwi.jpeg', + }, + { + id: 2, + name: 'Some other dude', + number: '666-6666', + title: 'Material', + description: 'Selling my wife', + url: '', }, ], }, @@ -242,18 +242,18 @@ function Phone() { return ( -
-
-
+
+
+
, }, ]} /> -
+
{calling ? ( ) : ( <> - + {allApps.map((App) => ( diff --git a/phone/src/apps/contacts/components/ContactsApp.tsx b/phone/src/apps/contacts/components/ContactsApp.tsx index 7ef050c..43953ae 100644 --- a/phone/src/apps/contacts/components/ContactsApp.tsx +++ b/phone/src/apps/contacts/components/ContactsApp.tsx @@ -1,25 +1,25 @@ -import React from "react"; -import { AppWrapper } from "../../../ui/components"; -import { makeStyles, createStyles, Theme } from "@material-ui/core/styles"; -import { AppTitle } from "../../../ui/components/AppTitle"; -import { AppContent } from "../../../ui/components/AppContent"; -import { ContactList } from "./List/ContactList"; -import { useApp } from "../../../os/apps/hooks/useApps"; -import { AddContactModal } from "./ContactModal"; -import { useModal } from "../hooks/useModal"; -import { SearchContacts } from "./List/SearchContacts"; -import PersonAddIcon from "@material-ui/icons/PersonAdd"; -import Fab from "@material-ui/core/Fab"; -import { useContactModal } from "../hooks/useContactModal"; -import { InfoModal } from "./modal/InfoModal"; -import { useContactDetail } from "../hooks/useContactDetail"; +import React from 'react'; +import { AppWrapper } from '../../../ui/components'; +import { makeStyles, createStyles, Theme } from '@material-ui/core/styles'; +import { AppTitle } from '../../../ui/components/AppTitle'; +import { AppContent } from '../../../ui/components/AppContent'; +import { ContactList } from './List/ContactList'; +import { useApp } from '../../../os/apps/hooks/useApps'; +import { AddContactModal } from './ContactModal'; +import { useModal } from '../hooks/useModal'; +import { SearchContacts } from './List/SearchContacts'; +import PersonAddIcon from '@material-ui/icons/PersonAdd'; +import Fab from '@material-ui/core/Fab'; +import { useContactModal } from '../hooks/useContactModal'; +import { InfoModal } from './modal/InfoModal'; +import { useContactDetail } from '../hooks/useContactDetail'; const useStyles = makeStyles((theme: Theme) => createStyles({ backgroundModal: { - background: "black", - opacity: "0.6", - position: "absolute", + background: 'black', + opacity: '0.6', + position: 'absolute', top: 0, left: 0, right: 0, @@ -27,9 +27,9 @@ const useStyles = makeStyles((theme: Theme) => zIndex: 5, }, absolute: { - position: "sticky", + position: 'absolute', bottom: theme.spacing(2), - left: theme.spacing(3), + right: theme.spacing(3), }, }) ); @@ -37,7 +37,7 @@ const useStyles = makeStyles((theme: Theme) => export const ContactsApp = () => { const classes = useStyles(); const { showModal, setShowModal } = useModal(); - const contacts = useApp("CONTACTS"); + const contacts = useApp('CONTACTS'); const { contactDetail } = useContactDetail(); const openModal = () => { @@ -45,7 +45,7 @@ export const ContactsApp = () => { }; return ( - + @@ -55,7 +55,7 @@ export const ContactsApp = () => { diff --git a/phone/src/apps/contacts/components/modal/InfoModal.tsx b/phone/src/apps/contacts/components/modal/InfoModal.tsx index 07456b3..10d6b5d 100644 --- a/phone/src/apps/contacts/components/modal/InfoModal.tsx +++ b/phone/src/apps/contacts/components/modal/InfoModal.tsx @@ -1,18 +1,18 @@ -import React, { useState } from "react"; +import React, { useState } from 'react'; import { Paper, Slide, Button, TextField, Avatar as MuiAvatar, -} from "@material-ui/core"; -import useStyles from "./modal.styles"; -import { useContactModal } from "../../hooks/useContactModal"; -import ArrowBackIcon from "@material-ui/icons/ArrowBack"; +} from '@material-ui/core'; +import useStyles from './modal.styles'; +import { useContactModal } from '../../hooks/useContactModal'; +import ArrowBackIcon from '@material-ui/icons/ArrowBack'; -import { useTranslation } from "react-i18next"; -import { useContactDetail } from "../../hooks/useContactDetail"; -import Nui from "../../../../os/nui-events/utils/Nui"; +import { useTranslation } from 'react-i18next'; +import { useContactDetail } from '../../hooks/useContactDetail'; +import Nui from '../../../../os/nui-events/utils/Nui'; export const InfoModal = () => { const classes = useStyles(); @@ -21,14 +21,14 @@ export const InfoModal = () => { const { contactDetail, setContactDetail } = useContactDetail(); const [display, setDisplay] = useState( - contactDetail ? contactDetail.display : "" + contactDetail ? contactDetail.display : '' ); console.log(contactDetail); const [number, setNumber] = useState( - contactDetail ? contactDetail.number : "" + contactDetail ? contactDetail.number : '' ); const [avatar, setAvatar] = useState( - contactDetail ? contactDetail.avatar : "" + contactDetail ? contactDetail.avatar : '' ); const closeModal = () => { @@ -37,7 +37,7 @@ export const InfoModal = () => { }; const updateContact = () => { - Nui.send("phone:updateContact", { + Nui.send('phone:updateContact', { id: contactDetail.id, display, number, @@ -48,7 +48,7 @@ export const InfoModal = () => { }; const deleteContact = () => { - Nui.send("phone:deleteContact", { + Nui.send('phone:deleteContact', { id: contactDetail.id, }); setContactDetail(null); @@ -56,9 +56,10 @@ export const InfoModal = () => { }; return ( - + diff --git a/phone/src/apps/notes/NotesApp.tsx b/phone/src/apps/notes/NotesApp.tsx index d7d51bd..82c82cf 100644 --- a/phone/src/apps/notes/NotesApp.tsx +++ b/phone/src/apps/notes/NotesApp.tsx @@ -1,23 +1,25 @@ -import React from "react"; -import { AppWrapper } from "../../ui/components/AppWrapper"; -import { AppContent } from "../../ui/components/AppContent"; -import NotesTitle from "./NotesTitle"; -import NoteList from "./list/NoteList"; +import React from 'react'; +import { AppWrapper } from '../../ui/components/AppWrapper'; +import { AppContent } from '../../ui/components/AppContent'; +import { AppTitle } from '../../ui/components/AppTitle'; +import { useApp } from '../../os/apps/hooks/useApps'; +import NoteList from './list/NoteList'; -import { useNotes } from "./hooks/useNotes"; -import { NoteModal } from "./modal/NoteModal"; -import { Fab } from "@material-ui/core"; -import AddIcon from "@material-ui/icons/Add"; +import { useNotes } from './hooks/useNotes'; +import { NoteModal } from './modal/NoteModal'; +import { Fab } from '@material-ui/core'; +import AddIcon from '@material-ui/icons/Add'; -import { useNoteModal } from "./hooks/useNoteModal"; -import { useNoteDetail } from "./hooks/useNoteDetail"; +import { useNoteModal } from './hooks/useNoteModal'; +import { useNoteDetail } from './hooks/useNoteDetail'; -import useStyles from "./notes.styles"; +import useStyles from './notes.styles'; export const NotesApp = () => { const { setNoteModal } = useNoteModal(); const { detail, setDetail } = useNoteDetail(); const notes = useNotes(); + const notesApp = useApp('NOTES'); const classes = useStyles(); @@ -27,8 +29,8 @@ export const NotesApp = () => { }; return ( - - + + @@ -36,8 +38,8 @@ export const NotesApp = () => { className={classes.absolute} onClick={handleModal} style={{ - background: "#f9a825", - color: "#fff", + background: '#f9a825', + color: '#fff', }} > diff --git a/phone/src/apps/notes/list/NoteList.tsx b/phone/src/apps/notes/list/NoteList.tsx index 113c3d7..d4cd04f 100644 --- a/phone/src/apps/notes/list/NoteList.tsx +++ b/phone/src/apps/notes/list/NoteList.tsx @@ -1,28 +1,34 @@ import { List, ListItem, ListItemText } from '@material-ui/core'; -import React, { useState } from 'react' +import React, { useState } from 'react'; import { useNoteModal } from '../hooks/useNoteModal'; import { useNoteDetail } from '../hooks/useNoteDetail'; // add search bar later -const NoteList = ({notes}) => { +// TODO: Add interface for note +const NoteList = ({ notes }) => { const { setNoteModal } = useNoteModal(); const { setDetail } = useNoteDetail(); const handleNoteModal = (note) => { - setNoteModal(true) - setDetail(note) - } + setNoteModal(true); + setDetail(note); + }; return ( - + {notes.map((note) => ( - handleNoteModal(note)}> - {note.title} + handleNoteModal(note)} + > + {note.title} ))} - ) -} + ); +}; export default NoteList; diff --git a/phone/src/apps/notes/modal/NoteModal.tsx b/phone/src/apps/notes/modal/NoteModal.tsx index 141d752..4aa20ab 100644 --- a/phone/src/apps/notes/modal/NoteModal.tsx +++ b/phone/src/apps/notes/modal/NoteModal.tsx @@ -1,25 +1,22 @@ -import { - Button, - TextField, - Slide, -} from "@material-ui/core"; -import React, { useState } from "react"; -import ArrowBackIcon from "@material-ui/icons/ArrowBack"; +import { Button, TextField, Slide } from '@material-ui/core'; +import React, { useState } from 'react'; +import ArrowBackIcon from '@material-ui/icons/ArrowBack'; -import { useNoteModal } from "../hooks/useNoteModal"; -import { useNoteDetail } from "../hooks/useNoteDetail"; +import { useNoteModal } from '../hooks/useNoteModal'; +import { useNoteDetail } from '../hooks/useNoteDetail'; -import useStyles from "./modal.styles"; +import useStyles from './modal.styles'; -import "../NotesApp.css"; -import Nui from "../../../os/nui-events/utils/Nui"; +import '../NotesApp.css'; +import Nui from '../../../os/nui-events/utils/Nui'; +// TODO: Fix input focus color export const NoteModal = () => { const { noteModal, setNoteModal } = useNoteModal(); const { detail, setDetail } = useNoteDetail(); console.log(detail); - const [title, setTitle] = useState(detail ? detail.title : ""); - const [content, setContent] = useState(detail ? detail.content : ""); + const [title, setTitle] = useState(detail ? detail.title : ''); + const [content, setContent] = useState(detail ? detail.content : ''); const classes = useStyles(); @@ -31,7 +28,7 @@ export const NoteModal = () => { const handleNoteSave = () => { setNoteModal(false); setDetail(null); - Nui.send("phone:addNote", { + Nui.send('phone:addNote', { title, content, }); @@ -40,14 +37,14 @@ export const NoteModal = () => { const handleDeleteNote = () => { const id = detail.id; setNoteModal(false); - Nui.send("phone:deleteNote", { + Nui.send('phone:deleteNote', { id, }); setDetail(null); }; const handleUpdateNote = () => { - Nui.send("phone:updateNote", { + Nui.send('phone:updateNote', { id: detail.id, title, content, @@ -58,15 +55,15 @@ export const NoteModal = () => { return (
- +
-
+
{ inputProps={{ className: classes.inputPropsContent, }} - placeholder="Content" + placeholder='Content' multiline fullWidth rows={19} - variant="outlined" + variant='outlined' value={content} onChange={(e) => setContent(e.target.value)} /> diff --git a/phone/src/apps/sellout/components/SelloutTitle.tsx b/phone/src/apps/sellout/components/SelloutTitle.tsx index 0464a08..25e7a02 100644 --- a/phone/src/apps/sellout/components/SelloutTitle.tsx +++ b/phone/src/apps/sellout/components/SelloutTitle.tsx @@ -1,21 +1,21 @@ -import React from "react"; -import Paper from "@material-ui/core/Paper"; -import { makeStyles } from "@material-ui/core"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faAd } from "@fortawesome/free-solid-svg-icons"; +import React from 'react'; +import Paper from '@material-ui/core/Paper'; +import { makeStyles } from '@material-ui/core'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { faAd } from '@fortawesome/free-solid-svg-icons'; const useStyles = makeStyles((theme) => ({ root: { - height: "60px", - width: "100%", - display: "flex", - flexFlow: "row nowrap", - justifyContent: "center", - alignItems: "center", - background: "#424242", + height: '60px', + width: '100%', + display: 'flex', + flexFlow: 'row nowrap', + justifyContent: 'center', + alignItems: 'center', + background: '#262525', }, icon: { - color: "#f44336", + color: '#f44336', fontSize: 40, }, })); @@ -23,7 +23,7 @@ const useStyles = makeStyles((theme) => ({ export const SelloutTitle = () => { const classes = useStyles(); return ( - + ); diff --git a/phone/src/apps/sellout/components/navigation/NavigationBar.tsx b/phone/src/apps/sellout/components/navigation/NavigationBar.tsx index 85d38da..75b4c30 100644 --- a/phone/src/apps/sellout/components/navigation/NavigationBar.tsx +++ b/phone/src/apps/sellout/components/navigation/NavigationBar.tsx @@ -1,17 +1,18 @@ -import React, { useState } from "react"; -import { makeStyles } from "@material-ui/core/styles"; -import { Link } from "react-router-dom"; -import { BottomNavigation, BottomNavigationAction } from "@material-ui/core"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faHome } from "@fortawesome/free-solid-svg-icons"; -import AddCircleIcon from "@material-ui/icons/AddCircle"; +import React, { useState } from 'react'; +import { makeStyles } from '@material-ui/core/styles'; +import { Link } from 'react-router-dom'; +import { BottomNavigation, BottomNavigationAction } from '@material-ui/core'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { faHome } from '@fortawesome/free-solid-svg-icons'; +import AddCircleIcon from '@material-ui/icons/AddCircle'; const useStyles = makeStyles((theme) => ({ root: { - width: "100%", + width: '100%', + backgroundColor: '#262525', }, icon: { - color: "#f44336", + color: '#f44336', }, })); @@ -30,12 +31,12 @@ export const NavigationBar = () => { } - to="/sellout" + to='/sellout' /> } - to="/sellout/new" + to='/sellout/new' /> ); diff --git a/phone/src/config/default.json b/phone/src/config/default.json index e0b818f..b0385b7 100644 --- a/phone/src/config/default.json +++ b/phone/src/config/default.json @@ -1,8 +1,16 @@ { "cellProvider": "AT&T", "language": "en_US", - "wallpapers": ["default.png", "dragon.jpg", "legacy.jpg"], - "frames": ["default.png", "s10.png"], + "wallpapers": [ + "default.png", + "dragon.jpg", + "legacy.jpg", + "minimal.jpg", + "waves.jpg", + "surf.jpg", + "beach.jpg" + ], + "frames": ["default.png", "s10.png", "tw.png", "samsung.png"], "themes": { "default-dark": { "palette": { diff --git a/phone/src/locale/en.json b/phone/src/locale/en.json index 644289d..9fc6b00 100644 --- a/phone/src/locale/en.json +++ b/phone/src/locale/en.json @@ -7,6 +7,7 @@ "APPS_CALCULATOR": "Calculator", "APPS_SETTINGS": "Settings", "APPS_BANK": "WhoDis Banking", + "APPS_NOTES": "Notes", "APPS_EXAMPLE": "Example app", "APPS_BANK_TRANSFER": "Transfer", "APPS_SETTINGS_OPTIONS_WALLPAPER": "Wallpaper", @@ -52,6 +53,5 @@ "APPS_CONTACT_FORM_NAME": "Name", "APPS_CONTACT_FORM_NUMBER": "Number", "APPS_CONTACT_FORM_AVATAR": "Avatar URL" - } } diff --git a/phone/src/os/apps/hooks/useApps.tsx b/phone/src/os/apps/hooks/useApps.tsx index 5ce674f..8135403 100644 --- a/phone/src/os/apps/hooks/useApps.tsx +++ b/phone/src/os/apps/hooks/useApps.tsx @@ -115,7 +115,7 @@ const appsState = atom({ }, { id: 'NOTES', - name: 'APPS_NOTES', + nameLocale: 'APPS_NOTES', icon: , backgroundColor: yellow[800], color: common.white, diff --git a/phone/src/ui/components/ContextMenu.tsx b/phone/src/ui/components/ContextMenu.tsx index 5b08fdc..a148c72 100644 --- a/phone/src/ui/components/ContextMenu.tsx +++ b/phone/src/ui/components/ContextMenu.tsx @@ -1,18 +1,18 @@ -import React from "react"; +import React from 'react'; import { ListItemIcon, ListItemText, Slide, makeStyles, Paper, -} from "@material-ui/core"; -import { List } from "./List"; -import { ListItem } from "./ListItem"; +} from '@material-ui/core'; +import { List } from './List'; +import { ListItem } from './ListItem'; const useStyles = makeStyles((theme) => ({ root: { - width: "100%", - position: "absolute", + width: '100%', + position: 'absolute', bottom: 0, zIndex: 2, }, @@ -21,9 +21,9 @@ const useStyles = makeStyles((theme) => ({ export const ContextMenu = ({ open, onClose, options }) => { const classes = useStyles(); return ( - + - + {options.map((option) => ( ({ root: { @@ -10,7 +10,11 @@ const useStyles = makeStyles((theme) => ({ }, item: { marginTop: theme.spacing(3), - width: "20%", + width: '20%', + }, + tooltip: { + bottom: -8, + fontSize: 12, }, })); @@ -19,27 +23,34 @@ export const GridMenu = ({ items, Component = AppIcon }) => { const classes = useStyles(); useEffect(function registerKeyHandlers() { - setKey("ArrowLeft", () => { - console.log(":v"); + setKey('ArrowLeft', () => { + console.log(':v'); }); // eslint-disable-next-line }, []); return ( - + {items && items.length && items.map((item) => ( - - - + + + + ))}