mirror of
https://git.pleroma.social/sjw/pleroma-fe.git
synced 2024-12-23 17:25:39 +01:00
separate reply button to its own component, add changelog entry
This commit is contained in:
parent
40ca0b394e
commit
f9ac23b9a9
@ -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.
|
||||
|
||||
|
12
src/components/reply_button/reply_button.js
Normal file
12
src/components/reply_button/reply_button.js
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
const ReplyButton = {
|
||||
name: 'ReplyButton',
|
||||
props: ['status', 'replying'],
|
||||
computed: {
|
||||
loggedIn () {
|
||||
return !!this.$store.state.users.currentUser
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default ReplyButton
|
21
src/components/reply_button/reply_button.vue
Normal file
21
src/components/reply_button/reply_button.vue
Normal file
@ -0,0 +1,21 @@
|
||||
<template>
|
||||
<div>
|
||||
<i
|
||||
v-if="loggedIn"
|
||||
class="button-icon button-reply icon-reply"
|
||||
:title="$t('tool_tip.reply')"
|
||||
:class="{'-active': replying}"
|
||||
@click.prevent="$emit('toggle')"
|
||||
/>
|
||||
<i
|
||||
v-else
|
||||
class="button-icon button-reply -disabled icon-reply"
|
||||
:title="$t('tool_tip.reply')"
|
||||
/>
|
||||
<span v-if="status.replies_count > 0">
|
||||
{{ status.replies_count }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script src="./reply_button.js"></script>
|
@ -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,
|
||||
|
@ -321,21 +321,11 @@
|
||||
v-if="!noHeading && !isPreview"
|
||||
class="status-actions"
|
||||
>
|
||||
<div>
|
||||
<i
|
||||
v-if="loggedIn"
|
||||
class="button-icon button-reply icon-reply"
|
||||
:title="$t('tool_tip.reply')"
|
||||
:class="{'-active': replying}"
|
||||
@click.prevent="toggleReplying"
|
||||
/>
|
||||
<i
|
||||
v-else
|
||||
class="button-icon button-reply -disabled icon-reply"
|
||||
:title="$t('tool_tip.reply')"
|
||||
/>
|
||||
<span v-if="status.replies_count > 0">{{ status.replies_count }}</span>
|
||||
</div>
|
||||
<reply-button
|
||||
:replying="replying"
|
||||
:status="status"
|
||||
@toggle="toggleReplying"
|
||||
/>
|
||||
<retweet-button
|
||||
:visibility="status.visibility"
|
||||
:logged-in="loggedIn"
|
||||
@ -368,18 +358,11 @@
|
||||
<div class="deleted-text">
|
||||
{{ $t('status.status_deleted') }}
|
||||
</div>
|
||||
<div
|
||||
v-if="replying"
|
||||
class="status-actions"
|
||||
>
|
||||
<i
|
||||
v-if="loggedIn"
|
||||
class="button-icon button-reply icon-reply"
|
||||
:title="$t('tool_tip.reply')"
|
||||
:class="{'-active': replying}"
|
||||
@click.prevent="toggleReplying"
|
||||
/>
|
||||
</div>
|
||||
<reply-button
|
||||
:replying="replying"
|
||||
:status="status"
|
||||
@toggle="toggleReplying"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
|
Loading…
Reference in New Issue
Block a user