Merge pull request #201 from dollars0427/new-toot-loading-screen
Show loading when user post new toot
This commit is contained in:
commit
845e43dcf6
|
@ -103,15 +103,25 @@ export default {
|
|||
media_ids: this.attachedMedias.map((m) => { return m.id })
|
||||
})
|
||||
}
|
||||
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
|
||||
this.$store.dispatch('TimelineSpace/Modals/NewToot/postToot', form)
|
||||
.then(() => {
|
||||
this.close()
|
||||
loading.close()
|
||||
this.$message({
|
||||
message: 'Toot',
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
loading.close()
|
||||
this.$message({
|
||||
message: 'Could not toot',
|
||||
type: 'error'
|
||||
|
|
Loading…
Reference in New Issue