components/quote_button: show for local and own private posts #478
2 changed files with 11 additions and 3 deletions
components/quote_button: show for local and own private posts
Aligning to AkkomaGang/akkoma#1059
commit
8227c84aa2
|
|
@ -7,8 +7,16 @@ const QuoteButton = {
|
|||
name: 'QuoteButton',
|
||||
props: ['status', 'quoting', 'visibility'],
|
||||
computed: {
|
||||
loggedIn () {
|
||||
return !!this.$store.state.users.currentUser
|
||||
showButton () {
|
||||
const currentUserId = this.$store.state.users.currentUser?.id
|
||||
|
||||
if (!currentUserId)
|
||||
return false
|
||||
|
||||
if (['public', 'unlisted', 'local'].includes(this.visibility))
|
||||
return true
|
||||
|
||||
return (this.visibility === 'private' && currentUserId == this.status.user.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div
|
||||
v-if="(visibility === 'public' || visibility === 'unlisted') && loggedIn"
|
||||
v-if="showButton"
|
||||
class="QuoteButton"
|
||||
>
|
||||
<button
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue