mirror of
https://github.com/Luzifer/browserphone.git
synced 2024-11-09 14:20:04 +00:00
Don't auto-clear incoming call notification
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
aea4a28afc
commit
3ff2a392b6
1 changed files with 8 additions and 5 deletions
13
src/app.vue
13
src/app.vue
|
@ -80,11 +80,14 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
announceStatus(state) {
|
announceStatus(state, autoClear = true) {
|
||||||
this.state = state
|
this.state = state
|
||||||
window.setTimeout(() => {
|
|
||||||
this.state = ''
|
if (autoClear) {
|
||||||
}, 2000)
|
window.setTimeout(() => {
|
||||||
|
this.state = ''
|
||||||
|
}, 2000)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
keyDown(key) {
|
keyDown(key) {
|
||||||
|
@ -114,7 +117,7 @@ export default {
|
||||||
this.announceStatus('Call disconnected')
|
this.announceStatus('Call disconnected')
|
||||||
})
|
})
|
||||||
this.phone.device.on('incoming', conn => {
|
this.phone.device.on('incoming', conn => {
|
||||||
this.announceStatus(`Incoming call from ${conn.parameters.From}`)
|
this.announceStatus(`Incoming call from ${conn.parameters.From}...`, false)
|
||||||
this.phone.conn = conn
|
this.phone.conn = conn
|
||||||
this.ringing = true
|
this.ringing = true
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue