mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 14:38:45 +00:00
feat(callModal/nui): styles and functions for calling modal
Needs to be discussed
This commit is contained in:
1 parent
5ae49f4c7a
commit
a7f3f50f3d
2 files changed
+34
-4
No files matched your search
@@ -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 (
|
||||
<AppWrapper>
|
||||
<AppContent>
|
||||
<h1 style={{ textAlign: 'center' }}>
|
||||
{call.target}
|
||||
</h1>
|
||||
<div className={classes.actions}>
|
||||
<Fab
|
||||
onClick={handleEndCall}
|
||||
style={{ backgroundColor: '#e74c3c', color: '#fff' }}
|
||||
className={classes.actionButton}
|
||||
>
|
||||
<CallEndIcon />
|
||||
</Fab>
|
||||
</div>
|
||||
|
||||
</AppContent>
|
||||
</AppWrapper>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<AppWrapper>
|
||||
<AppContent>
|
||||
<h1 style={{ textAlign: 'center' }}>
|
||||
{call.transmitter ? call.target : call.caller}
|
||||
{call.caller}
|
||||
</h1>
|
||||
|
||||
<div className={classes.actions}>
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}))
|
||||
|
||||
|
||||
Reference in new issue
Block a user