Skip to content

Commit

Permalink
Merge pull request #201 from dollars0427/new-toot-loading-screen
Browse files Browse the repository at this point in the history
Show loading when user post new toot
  • Loading branch information
h3poteto authored Apr 9, 2018
2 parents e923d31 + 9528450 commit 845e43d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/renderer/components/TimelineSpace/Modals/NewToot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 845e43d

Please sign in to comment.