mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-01-27 07:46:15 +01:00
refs #16 Error message when authorize
This commit is contained in:
parent
c559275cca
commit
4c227b2dfa
@ -27,6 +27,12 @@ export default {
|
||||
.then((id) => {
|
||||
this.$router.push({ path: `/${id}/home` })
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
message: 'Could not authorize the code',
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,11 +9,10 @@ const Authorize = {
|
||||
return new Promise((resolve, reject) => {
|
||||
ipcRenderer.send('get-access-token', code)
|
||||
ipcRenderer.once('response-get-access-token', (event, id) => {
|
||||
console.log(id)
|
||||
resolve(id)
|
||||
})
|
||||
ipcRenderer.once('error-get-access-token', (event, err) => {
|
||||
console.log(err)
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
@ -46,8 +46,6 @@ const TimelineSpace = {
|
||||
return new Promise((resolve, reject) => {
|
||||
ipcRenderer.send('get-local-account', id)
|
||||
ipcRenderer.once('error-get-local-account', (event, err) => {
|
||||
// TODO: handle error
|
||||
console.log(err)
|
||||
reject(err)
|
||||
})
|
||||
ipcRenderer.once('response-get-local-account', (event, account) => {
|
||||
@ -73,6 +71,7 @@ const TimelineSpace = {
|
||||
startUserStreaming ({ commit }, account) {
|
||||
ipcRenderer.send('start-user-streaming', account)
|
||||
ipcRenderer.once('error-start-userstreaming', (event, err) => {
|
||||
// handle error
|
||||
console.log(err)
|
||||
})
|
||||
ipcRenderer.on('update-start-user-streaming', (event, update) => {
|
||||
@ -94,6 +93,7 @@ const TimelineSpace = {
|
||||
commit('changeNewTootModal', true)
|
||||
})
|
||||
ipcRenderer.on('CmdOrCtrl+R', () => {
|
||||
// TODO: reply window
|
||||
console.log('reply')
|
||||
})
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user