components/quote_button: show for local and own private posts #478

Merged
Oneric merged 1 commit from Oneric/akkoma-fe:more-quoting into develop 2026-02-07 22:40:23 +00:00
2 changed files with 11 additions and 3 deletions
Showing only changes of commit 8227c84aa2 - Show all commits

components/quote_button: show for local and own private posts
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful

Aligning to AkkomaGang/akkoma#1059
Oneric 2026-02-07 00:00:00 +00:00

View file

@ -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)
}
}
}

View file

@ -1,6 +1,6 @@
<template>
<div
v-if="(visibility === 'public' || visibility === 'unlisted') && loggedIn"
v-if="showButton"
class="QuoteButton"
>
<button