1
0
Fork 0
mirror of https://github.com/Luzifer/browserphone.git synced 2024-11-09 14:20:04 +00:00

Use enter key to toggle call

This commit is contained in:
Knut Ahlers 2019-05-30 13:37:39 +02:00
parent d734ea9f3a
commit e12b0b146a
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -17,7 +17,15 @@
<b-col cols="12" md="6"> <b-col cols="12" md="6">
<b-card> <b-card>
<b-form-input size="lg" slot="header" type="tel" class="my-2 number border-info" autofocus v-model="number"></b-form-input> <b-form-input
autofocus
class="my-2 number border-info"
@keypress="evt => keypress(evt)"
size="lg"
slot="header"
type="tel"
v-model="number"
></b-form-input>
<b-row> <b-row>
<b-col v-for="key in keys" cols="4" class="text-center mb-3" :key="key"> <b-col v-for="key in keys" cols="4" class="text-center mb-3" :key="key">
@ -82,6 +90,12 @@ export default {
this.number = `${this.number}${key}` this.number = `${this.number}${key}`
}, },
keypress(evt) {
if (evt.keyCode === 13) {
this.toggleCall()
}
},
setupPhone() { setupPhone() {
if (!this.phone.device) { if (!this.phone.device) {
this.phone.device = new Twilio.Device() this.phone.device = new Twilio.Device()