mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
feat(calling/client|server): partical functions for calling
Should probably reuse data
This commit is contained in:
commit
db3bd999f2
2 files changed
+32
-1
No files matched your search
@@ -5,6 +5,7 @@ import { AppTitle } from '../../ui/components/AppTitle';
|
|||||||
import { AppContent } from '../../ui/components/AppContent';
|
import { AppContent } from '../../ui/components/AppContent';
|
||||||
import { useCall } from '../hooks/useCall';
|
import { useCall } from '../hooks/useCall';
|
||||||
import CallIcon from '@material-ui/icons/Call';
|
import CallIcon from '@material-ui/icons/Call';
|
||||||
|
<<<<<<< HEAD
|
||||||
import CallEndIcon from '@material-ui/icons/CallEnd';
|
import CallEndIcon from '@material-ui/icons/CallEnd';
|
||||||
import useStyles from './modal.styles';
|
import useStyles from './modal.styles';
|
||||||
import { useModal } from '../hooks/useModal';
|
import { useModal } from '../hooks/useModal';
|
||||||
@@ -13,30 +14,60 @@ import Nui from '../../os/nui-events/utils/Nui';
|
|||||||
export const CallModal = () => {
|
export const CallModal = () => {
|
||||||
const { call } = useCall();
|
const { call } = useCall();
|
||||||
const { setModal } = useModal()
|
const { setModal } = useModal()
|
||||||
|
=======
|
||||||
|
import PhoneDisabledIcon from '@material-ui/icons/PhoneDisabled';
|
||||||
|
import CallEndIcon from '@material-ui/icons/CallEnd';
|
||||||
|
import useStyles from './modal.styles';
|
||||||
|
import { useModal } from '../hooks/useModal';
|
||||||
|
|
||||||
|
export const CallModal = () => {
|
||||||
|
const { call, setCall } = useCall();
|
||||||
|
const { setModal } = useModal()
|
||||||
|
const [accepted, setAccepted] = useState(false)
|
||||||
|
>>>>>>> 28774d24d89468bd6804b82c6beb0e40a3cd4abf
|
||||||
|
|
||||||
const classes = useStyles()
|
const classes = useStyles()
|
||||||
|
|
||||||
const handleAcceptCall = () => {
|
const handleAcceptCall = () => {
|
||||||
|
<<<<<<< HEAD
|
||||||
Nui.send('phone:acceptCall', {
|
Nui.send('phone:acceptCall', {
|
||||||
phoneNumber: call.phone_number
|
phoneNumber: call.phone_number
|
||||||
})
|
})
|
||||||
|
=======
|
||||||
|
setAccepted(true)
|
||||||
|
>>>>>>> 28774d24d89468bd6804b82c6beb0e40a3cd4abf
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleRejectCall = () => {
|
const handleRejectCall = () => {
|
||||||
setModal(false)
|
setModal(false)
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
setCall(null)
|
||||||
|
>>>>>>> 28774d24d89468bd6804b82c6beb0e40a3cd4abf
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleEndCall = () => {
|
const handleEndCall = () => {
|
||||||
setModal(false)
|
setModal(false)
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
setCall(null)
|
||||||
|
>>>>>>> 28774d24d89468bd6804b82c6beb0e40a3cd4abf
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppWrapper>
|
<AppWrapper>
|
||||||
<AppContent>
|
<AppContent>
|
||||||
|
<<<<<<< HEAD
|
||||||
<h1 style={{ textAlign: 'center' }}>{call.transmitter ? call.target : call.caller}</h1>
|
<h1 style={{ textAlign: 'center' }}>{call.transmitter ? call.target : call.caller}</h1>
|
||||||
|
|
||||||
<div className={classes.actions}>
|
<div className={classes.actions}>
|
||||||
{!call.accepted ? (
|
{!call.accepted ? (
|
||||||
|
=======
|
||||||
|
<h1 style={{ textAlign: 'center' }}>{call.target}</h1>
|
||||||
|
|
||||||
|
<div className={classes.actions}>
|
||||||
|
{!accepted ? (
|
||||||
|
>>>>>>> 28774d24d89468bd6804b82c6beb0e40a3cd4abf
|
||||||
<>
|
<>
|
||||||
<Fab
|
<Fab
|
||||||
onClick={handleRejectCall}
|
onClick={handleRejectCall}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import './sv_bank';
|
|||||||
import './sv_notes';
|
import './sv_notes';
|
||||||
import './sv_photo';
|
import './sv_photo';
|
||||||
import './sv_messages';
|
import './sv_messages';
|
||||||
import './sv_call'
|
import './sv_call';
|
||||||
|
|
||||||
export let ESX: Server = null;
|
export let ESX: Server = null;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user