aboutsummaryrefslogtreecommitdiff
path: root/src/components/status/status.js
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2016-12-05 20:49:58 +0100
committerRoger Braun <roger@rogerbraun.net>2016-12-05 20:49:58 +0100
commit026ab7c1dffa858d9dbdfada44b50097db1e0bd2 (patch)
tree418d7cd37587fd41fb808bbcb28657043508ce84 /src/components/status/status.js
parent917917596fe7c9185590bf3c6cc267a0d6a89e5a (diff)
parentbe5fe03972879add14ce2ca6b37524b32adbf1b8 (diff)
Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma-fe into develop
Diffstat (limited to 'src/components/status/status.js')
-rw-r--r--src/components/status/status.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 0bf2ecde..8b2561cf 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -20,7 +20,9 @@ const Status = {
},
loggedIn () {
return !!this.$store.state.users.currentUser
- }
+ },
+ deleted () { return this.statusoid.deleted },
+ canDelete () { return this.statusoid.user.rights.delete_others_notice || this.statusoid.user.id == this.$store.state.users.currentUser.id }
},
components: {
Attachment,
@@ -31,6 +33,12 @@ const Status = {
methods: {
toggleReplying () {
this.replying = !this.replying
+ },
+ deleteStatus () {
+ const confirmed = confirm('Do you really want to delete this status?')
+ if (confirmed) {
+ this.$store.dispatch('deleteStatus', { id: this.status.id })
+ }
}
}
}