mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
tweak(dialer): Several fixes and improvements
Time has been changed to a relative format. Locale specifics are pending merge of #168. Several typos have been fixed where "DAILER" was referenced instead of "DIALER" A translation key was added for when a user has no call history. The input box has been unlocked so users can use their keyboard directly rather than using the dial pad.
This commit is contained in:
1 parent
a6e8c769c0
commit
f1f6a05981
10 files changed
+76
-39
No files matched your search
@@ -3,7 +3,7 @@ import { Box, IconButton, InputBase, Paper } from '@material-ui/core';
|
||||
import { makeStyles, Theme } from '@material-ui/core/styles';
|
||||
import PhoneIcon from '@material-ui/icons/Phone';
|
||||
import PersonAddIcon from '@material-ui/icons/PersonAdd';
|
||||
import { DialInputCtx } from '../context/InputContext';
|
||||
import { DialInputCtx, IDialInputCtx } from '../context/InputContext';
|
||||
import Nui from '../../../os/nui-events/utils/Nui';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
|
||||
@@ -30,7 +30,7 @@ export const DialerInput = () => {
|
||||
const classes = useStyles();
|
||||
const history = useHistory();
|
||||
|
||||
const { inputVal } = useContext(DialInputCtx);
|
||||
const { inputVal, set } = useContext<IDialInputCtx>(DialInputCtx);
|
||||
|
||||
const handleCall = (number: string) => {
|
||||
Nui.send('phone:beginCall', {
|
||||
@@ -44,7 +44,12 @@ export const DialerInput = () => {
|
||||
|
||||
return (
|
||||
<Box component={Paper} className={classes.root}>
|
||||
<InputBase placeholder="Enter a number" className={classes.input} value={inputVal} />
|
||||
<InputBase
|
||||
placeholder="Enter a number"
|
||||
className={classes.input}
|
||||
value={inputVal}
|
||||
onChange={(e) => set(e.target.value)}
|
||||
/>
|
||||
<IconButton color="primary" className={classes.iconBtn}>
|
||||
<PhoneIcon fontSize="large" onClick={() => handleCall(inputVal)} />
|
||||
</IconButton>
|
||||
|
||||
Reference in new issue
Block a user