From d5b9f78fa84efd8f5e42b4fa4cb8eaaa9051621a Mon Sep 17 00:00:00 2001 From: Christopher Date: Tue, 16 Mar 2021 23:51:27 +0100 Subject: [PATCH] inital share modal for notes --- phone/src/apps/notes/list/NoteList.tsx | 2 +- phone/src/apps/notes/modal/NoteModal.tsx | 47 +++++++++++++++++++++- phone/src/apps/notes/modal/modal.styles.ts | 10 +++++ 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/phone/src/apps/notes/list/NoteList.tsx b/phone/src/apps/notes/list/NoteList.tsx index 09287f9..96db475 100644 --- a/phone/src/apps/notes/list/NoteList.tsx +++ b/phone/src/apps/notes/list/NoteList.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Fab, List, ListItem, ListItemText } from '@material-ui/core'; +import { Fab, List, ListItem, ListItemText, Box, Typography } from '@material-ui/core'; import { useNoteDetail } from '../hooks/useNoteDetail'; import { useNotes } from '../hooks/useNotes'; import { useHistory } from 'react-router-dom'; diff --git a/phone/src/apps/notes/modal/NoteModal.tsx b/phone/src/apps/notes/modal/NoteModal.tsx index f0abe42..4f22ad0 100644 --- a/phone/src/apps/notes/modal/NoteModal.tsx +++ b/phone/src/apps/notes/modal/NoteModal.tsx @@ -8,7 +8,7 @@ import { CircularProgress, Box, } from '@material-ui/core'; -import React from 'react'; +import React, { useState } from 'react'; import ArrowBackIcon from '@material-ui/icons/ArrowBack'; import { useNoteDetail } from '../hooks/useNoteDetail'; import useStyles from './modal.styles'; @@ -16,6 +16,9 @@ import Nui from '../../../os/nui-events/utils/Nui'; import { useTranslation } from 'react-i18next'; import { useHistory } from 'react-router-dom'; import { StatusButton } from '../../../ui/components/StatusButton'; +import ShareIcon from '@material-ui/icons/Share'; +import Modal from '../../../ui/components/Modal'; +import { Autocomplete } from '@material-ui/lab'; export const NoteModal = () => { const classes = useStyles(); @@ -23,6 +26,9 @@ export const NoteModal = () => { const { t } = useTranslation(); const { detail, setDetail } = useNoteDetail(); + const [open, setOpen] = useState(false); + const [number, setNumber] = useState(''); + const onClose = () => history.goBack(); const _handleClose = () => { @@ -51,9 +57,43 @@ export const NoteModal = () => { onClose(); }; + const handleShareNoteModal = () => setOpen(true); + + const NoteShareModal = () => { + const opts = [ + { + title: 'Nice', + }, + { + title: 'wtf', + }, + ]; + + const handleShareNote = () => { + Nui.send('phone:shareNote', {}); + }; + + return ( + setOpen(false)}> + op.title)} + onChange={(e: any) => setNumber(e.currentTarget.value)} + renderInput={(params) => ( + + )} + /> + + + ); + }; + return ( + +
{!detail ? ( ) : ( @@ -126,6 +166,11 @@ export const NoteModal = () => { {t('GENERIC_DELETE')} + + + )} diff --git a/phone/src/apps/notes/modal/modal.styles.ts b/phone/src/apps/notes/modal/modal.styles.ts index f706446..f12918e 100644 --- a/phone/src/apps/notes/modal/modal.styles.ts +++ b/phone/src/apps/notes/modal/modal.styles.ts @@ -18,6 +18,16 @@ const useStyles = makeStyles((theme) => ({ fontSize: 20, lineHeight: 1.2, }, + backgroundModal: { + background: 'black', + opacity: '0.6', + position: 'absolute', + top: 0, + left: 0, + right: 0, + bottom: 0, + zIndex: 5, + }, })); export default useStyles;