1
0
mirror of https://github.com/Luzifer/browserphone.git synced 2024-09-19 15:13:00 +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-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-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}`
},
keypress(evt) {
if (evt.keyCode === 13) {
this.toggleCall()
}
},
setupPhone() {
if (!this.phone.device) {
this.phone.device = new Twilio.Device()