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:
parent
d734ea9f3a
commit
e12b0b146a
1 changed files with 15 additions and 1 deletions
16
src/app.vue
16
src/app.vue
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue