From a7f3f50f3d92ecd9ad26b9e560399ae6d49ff3e2 Mon Sep 17 00:00:00 2001 From: Christopher Date: Tue, 26 Jan 2021 21:42:11 +0100 Subject: [PATCH] feat(callModal/nui): styles and functions for calling modal Needs to be discussed --- phone/src/modal/components/CallModal.tsx | 33 ++++++++++++++++++++-- phone/src/modal/components/modal.styles.ts | 5 ++-- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/phone/src/modal/components/CallModal.tsx b/phone/src/modal/components/CallModal.tsx index 009c944..0eb31dd 100644 --- a/phone/src/modal/components/CallModal.tsx +++ b/phone/src/modal/components/CallModal.tsx @@ -17,24 +17,53 @@ export const CallModal = () => { const classes = useStyles(); const handleAcceptCall = () => { + console.log("NUI CALL: ", call.phone_number) Nui.send('phone:acceptCall', { - phoneNumber: call.phone_number, + phoneNumber: call.target, }); }; const handleRejectCall = () => { setModal(false); + Nui.send('phone:rejectCall', { + phoneNumber: call.target + }) }; const handleEndCall = () => { setModal(false); + Nui.send('phone:endCall', { + phoneNumber: call.target + }) }; + if (call.transmitter) { + return ( + + +

+ {call.target} +

+
+ + + +
+ +
+
+ ) + } + return (

- {call.transmitter ? call.target : call.caller} + {call.caller}

diff --git a/phone/src/modal/components/modal.styles.ts b/phone/src/modal/components/modal.styles.ts index 17c88c4..82abd5c 100644 --- a/phone/src/modal/components/modal.styles.ts +++ b/phone/src/modal/components/modal.styles.ts @@ -4,13 +4,14 @@ const useStyles = makeStyles((theme: Theme) => ({ actions: { width: '100%', margin: 'auto', + position: 'absolute', display: 'flex', alignContent: 'center', justifyContent: 'center', - marginTop: '5em' + bottom: '10%' }, actionButton: { - margin: 20 + margin: 20, } }))