mirror of https://github.com/kern/filepizza
Show an error if there's no WebRTC support.
parent
5eb9f91003
commit
c5080872bb
@ -0,0 +1,9 @@
|
||||
import alt from '../alt'
|
||||
|
||||
export default alt.createActions(class SupportActions {
|
||||
constructor() {
|
||||
this.generateActions(
|
||||
'noSupport'
|
||||
)
|
||||
}
|
||||
})
|
||||
@ -1,11 +1,20 @@
|
||||
import SupportActions from '../actions/SupportActions'
|
||||
import alt from '../alt'
|
||||
|
||||
export default alt.createStore(class ErrorStore {
|
||||
|
||||
constructor() {
|
||||
this.bindActions(SupportActions)
|
||||
|
||||
this.status = 404
|
||||
this.message = 'Not Found'
|
||||
this.stack = null
|
||||
}
|
||||
|
||||
onNoSupport() {
|
||||
this.status = 400
|
||||
this.message = 'No WebRTC Support'
|
||||
this.stack = null
|
||||
}
|
||||
|
||||
}, 'ErrorStore')
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
import SupportActions from '../actions/SupportActions'
|
||||
import alt from '../alt'
|
||||
|
||||
export default alt.createStore(class SupportStore {
|
||||
|
||||
constructor() {
|
||||
this.bindActions(SupportActions)
|
||||
this.isSupported = true
|
||||
}
|
||||
|
||||
onNoSupport() {
|
||||
this.isSupported = false
|
||||
}
|
||||
|
||||
}, 'SupportStore')
|
||||
Loading…
Reference in New Issue