From 4c12de262ff1ca9cde925195de20158c33f7bad0 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 14 Feb 2017 00:01:50 +0100 Subject: Add muting to statuses. --- src/components/status/status.js | 9 ++- src/components/status/status.vue | 115 +++++++++++++++++++++------------------ 2 files changed, 70 insertions(+), 54 deletions(-) (limited to 'src/components/status') diff --git a/src/components/status/status.js b/src/components/status/status.js index 40589ea5..3d1d50fb 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -11,7 +11,8 @@ const Status = { ], data: () => ({ replying: false, - expanded: false + expanded: false, + unmuted: false }), computed: { retweet () { return !!this.statusoid.retweeted_status }, @@ -25,7 +26,8 @@ const Status = { }, loggedIn () { return !!this.$store.state.users.currentUser - } + }, + muted () { return !this.unmuted && this.status.user.muted } }, components: { Attachment, @@ -40,6 +42,9 @@ const Status = { }, toggleExpanded () { this.$emit('toggleExpanded') + }, + toggleMute () { + this.unmuted = !this.unmuted } } } diff --git a/src/components/status/status.vue b/src/components/status/status.vue index f113fb7e..95abdd5b 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -1,70 +1,78 @@ @@ -128,4 +136,7 @@ padding-right: 1em; border-bottom: 1px solid; } + .muted button { + margin-left: auto; + } -- cgit v1.2.3-70-g09d2 From 340b21475d94542e1ddb7c34f192749c229b58eb Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 14 Feb 2017 21:47:37 +0100 Subject: Make temporarily unmuted posts hideable again. --- src/components/status/status.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/components/status') diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 95abdd5b..c215a00b 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -3,7 +3,7 @@