Hide search filter button from unregistered users

This commit is contained in:
itepechi 2023-10-23 04:20:22 +09:00
parent 2677c6f846
commit e1dcfaa415
1 changed files with 5 additions and 1 deletions

View File

@ -65,11 +65,15 @@ const Search = {
allStatusesObject[status.id] && !allStatusesObject[status.id].deleted allStatusesObject[status.id] && !allStatusesObject[status.id].deleted
) )
}, },
isLoggedIn () {
return !!this.$store.state.users.currentUser
},
canSearchMediaPosts () { canSearchMediaPosts () {
return this.$store.state.instance.searchTypeMediaEnabled === true return this.$store.state.instance.searchTypeMediaEnabled === true
}, },
canSearchFollowing () { canSearchFollowing () {
return this.$store.state.instance.searchOptionFollowingEnabled === true return this.isLoggedIn &&
this.$store.state.instance.searchOptionFollowingEnabled === true
} }
}, },
mounted () { mounted () {