From f9ac23b9a94dd35ba623814a59f4df83895acb42 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Mon, 7 Sep 2020 10:35:49 +0300 Subject: [PATCH] separate reply button to its own component, add changelog entry --- CHANGELOG.md | 3 ++ src/components/reply_button/reply_button.js | 12 +++++++ src/components/reply_button/reply_button.vue | 21 +++++++++++ src/components/status/status.js | 2 ++ src/components/status/status.vue | 37 ++++++-------------- 5 files changed, 48 insertions(+), 27 deletions(-) create mode 100644 src/components/reply_button/reply_button.js create mode 100644 src/components/reply_button/reply_button.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index 18dafa8e..f07856df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] ## [Unreleased patch] +### Added +- Proper handling of deletes when using websocket streaming + ### Changed - Polls will be hidden with status content if "Collapse posts with subjects" is enabled and the post is collapsed. diff --git a/src/components/reply_button/reply_button.js b/src/components/reply_button/reply_button.js new file mode 100644 index 00000000..22957650 --- /dev/null +++ b/src/components/reply_button/reply_button.js @@ -0,0 +1,12 @@ + +const ReplyButton = { + name: 'ReplyButton', + props: ['status', 'replying'], + computed: { + loggedIn () { + return !!this.$store.state.users.currentUser + } + } +} + +export default ReplyButton diff --git a/src/components/reply_button/reply_button.vue b/src/components/reply_button/reply_button.vue new file mode 100644 index 00000000..b2904b5c --- /dev/null +++ b/src/components/reply_button/reply_button.vue @@ -0,0 +1,21 @@ + + + diff --git a/src/components/status/status.js b/src/components/status/status.js index 5a6110c1..cb39fd6e 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -1,3 +1,4 @@ +import ReplyButton from '../reply_button/reply_button.vue' import FavoriteButton from '../favorite_button/favorite_button.vue' import ReactButton from '../react_button/react_button.vue' import RetweetButton from '../retweet_button/retweet_button.vue' @@ -20,6 +21,7 @@ import { mapGetters, mapState } from 'vuex' const Status = { name: 'Status', components: { + ReplyButton, FavoriteButton, ReactButton, RetweetButton, diff --git a/src/components/status/status.vue b/src/components/status/status.vue index d7dfc0ab..cb81b14e 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -321,21 +321,11 @@ v-if="!noHeading && !isPreview" class="status-actions" > -
- - - {{ status.replies_count }} -
+ {{ $t('status.status_deleted') }} -
- -
+