Added the LTR support for the dialpad

This commit is contained in:
Ayush PS 2021-04-28 02:46:43 +05:30
parent 3201ed2f0f
commit 7509481bb9
2 changed files with 24 additions and 3 deletions
res/css/views/voip
src/components/views/context_menus

View file

@ -30,8 +30,18 @@ limitations under the License.
height: 1.5em;
font-size: 18px;
font-weight: 600;
max-width: 155px;
overflow: auto;
max-width: 150px;
border: none;
margin: 0px;
}
.mx_DialPadContextMenu_dialled input{
font-size: 18px;
font-weight: 600;
overflow: hidden;
text-align: left;
direction: rtl;
background-color: rgb(0, 0, 0, 0);
}
.mx_DialPadContextMenu_dialPad {

View file

@ -18,6 +18,7 @@ import React from 'react';
import { _t } from '../../../languageHandler';
import { ContextMenu, IProps as IContextMenuProps } from '../../structures/ContextMenu';
import { MatrixCall } from 'matrix-js-sdk/src/webrtc/call';
import Field from "../elements/Field";
import Dialpad from '../voip/DialPad';
import {replaceableComponent} from "../../../utils/replaceableComponent";
@ -44,13 +45,23 @@ export default class DialpadContextMenu extends React.Component<IProps, IState>
this.setState({value: this.state.value + digit});
}
onChange = (ev) => {
this.setState({value: ev.target.value});
}
render() {
return <ContextMenu {...this.props}>
<div className="mx_DialPadContextMenu_header">
<div>
<span className="mx_DialPadContextMenu_title">{_t("Dial pad")}</span>
</div>
<div className="mx_DialPadContextMenu_dialled">{this.state.value}</div>
<form >
<Field className="mx_DialPadContextMenu_dialled"
value={this.state.value} autoFocus={true}
onChange={this.onChange}
/>
</form>
</div>
<div className="mx_DialPadContextMenu_horizSep" />
<div className="mx_DialPadContextMenu_dialPad">