basic loggedin check for reply filtering

This commit is contained in:
Shpuld Shpuldson 2021-02-25 11:01:11 +02:00
parent 51a78e8b8a
commit 93785634a7
2 changed files with 36 additions and 31 deletions

View file

@ -26,6 +26,9 @@ const TimelineQuickSettings = {
}, },
computed: { computed: {
...mapGetters(['mergedConfig']), ...mapGetters(['mergedConfig']),
loggedIn () {
return !!this.$store.state.users.currentUser
},
replyVisibilitySelf: { replyVisibilitySelf: {
get () { return this.mergedConfig.replyVisibility === 'self' }, get () { return this.mergedConfig.replyVisibility === 'self' },
set () { this.setReplyVisibility('self') } set () { this.setReplyVisibility('self') }

View file

@ -8,37 +8,39 @@
slot="content" slot="content"
class="timeline-settings-menu dropdown-menu" class="timeline-settings-menu dropdown-menu"
> >
<button <div v-if="loggedIn">
class="button-default dropdown-item" <button
@click="replyVisibilityAll = true" class="button-default dropdown-item"
> @click="replyVisibilityAll = true"
<span >
class="menu-checkbox" <span
:class="{ 'menu-checkbox-radio': replyVisibilityAll }" class="menu-checkbox"
/>{{ $t('settings.reply_visibility_all') }} :class="{ 'menu-checkbox-radio': replyVisibilityAll }"
</button> />{{ $t('settings.reply_visibility_all') }}
<button </button>
class="button-default dropdown-item" <button
@click="replyVisibilityFollowing = true" class="button-default dropdown-item"
> @click="replyVisibilityFollowing = true"
<span >
class="menu-checkbox" <span
:class="{ 'menu-checkbox-radio': replyVisibilityFollowing }" class="menu-checkbox"
/>{{ $t('settings.reply_visibility_following_short') }} :class="{ 'menu-checkbox-radio': replyVisibilityFollowing }"
</button> />{{ $t('settings.reply_visibility_following_short') }}
<button </button>
class="button-default dropdown-item" <button
@click="replyVisibilitySelf = true" class="button-default dropdown-item"
> @click="replyVisibilitySelf = true"
<span >
class="menu-checkbox" <span
:class="{ 'menu-checkbox-radio': replyVisibilitySelf }" class="menu-checkbox"
/>{{ $t('settings.reply_visibility_self_short') }} :class="{ 'menu-checkbox-radio': replyVisibilitySelf }"
</button> />{{ $t('settings.reply_visibility_self_short') }}
<div </button>
role="separator" <div
class="dropdown-divider" role="separator"
/> class="dropdown-divider"
/>
</div>
<button <button
class="button-default dropdown-item" class="button-default dropdown-item"
@click="hideMedia = !hideMedia" @click="hideMedia = !hideMedia"