b2e4827741
Now, the following badges will be added: 0: (+) sign to reply, favourite, repeat, react and extra buttons 1: (-) sign to unfavourite and unrepeat 2: (x) sign to close reply form, close react popover, and close extra buttons popover 3: Check mark to favourited and repeated statuses https://git.pleroma.social/pleroma/pleroma-fe/-/issues/1092
44 lines
795 B
JavaScript
44 lines
795 B
JavaScript
import { library } from '@fortawesome/fontawesome-svg-core'
|
|
import {
|
|
faRetweet,
|
|
faPlus,
|
|
faMinus,
|
|
faCheck
|
|
} from '@fortawesome/free-solid-svg-icons'
|
|
|
|
library.add(
|
|
faRetweet,
|
|
faPlus,
|
|
faMinus,
|
|
faCheck
|
|
)
|
|
|
|
const RetweetButton = {
|
|
props: ['status', 'loggedIn', 'visibility'],
|
|
data () {
|
|
return {
|
|
animated: false
|
|
}
|
|
},
|
|
methods: {
|
|
retweet () {
|
|
if (!this.status.repeated) {
|
|
this.$store.dispatch('retweet', { id: this.status.id })
|
|
} else {
|
|
this.$store.dispatch('unretweet', { id: this.status.id })
|
|
}
|
|
this.animated = true
|
|
setTimeout(() => {
|
|
this.animated = false
|
|
}, 500)
|
|
}
|
|
},
|
|
computed: {
|
|
mergedConfig () {
|
|
return this.$store.getters.mergedConfig
|
|
}
|
|
}
|
|
}
|
|
|
|
export default RetweetButton
|