diff --git a/src/boot/after_store.js b/src/boot/after_store.js index 86c9d940..6833307a 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -283,6 +283,7 @@ const getNodeInfo = async ({ store }) => { store.dispatch('setInstanceOption', { name: 'translationEnabled', value: features.includes('akkoma:machine_translation') }) store.dispatch('setInstanceOption', { name: 'searchTypeMediaEnabled', value: features.includes('bnakkoma:search_type_media') }) store.dispatch('setInstanceOption', { name: 'searchOptionFollowingEnabled', value: features.includes('bnakkoma:search_option_following') }) + store.dispatch('setInstanceOption', { name: 'searchOptionLocalEnabled', value: features.includes('bnakkoma:search_option_local') }) store.dispatch('setInstanceOption', { name: 'opensearchProtocolSupported', value: features.includes('bnakkoma:opensearch_protocol') }) const uploadLimits = metadata.uploadLimits diff --git a/src/components/search/search.js b/src/components/search/search.js index db07f5e7..a5ee1daf 100644 --- a/src/components/search/search.js +++ b/src/components/search/search.js @@ -68,16 +68,9 @@ const Search = { allStatusesObject[status.id] && !allStatusesObject[status.id].deleted ) }, - isLoggedIn () { - return !!this.$store.state.users.currentUser - }, canSearchMediaPosts () { return this.$store.state.instance.searchTypeMediaEnabled === true }, - canSearchFollowing () { - return this.isLoggedIn && - this.$store.state.instance.searchOptionFollowingEnabled === true - }, hasAtLeastOneResult () { return allSearchTypes .some((searchType) => this.getVisibleLength(searchType) > 0) @@ -165,7 +158,8 @@ const Search = { offset: searchOffset, 'type': searchType, following: - 'followingOnly' in this.filter && this.filter.followingOnly + 'followingOnly' in this.filter && this.filter.followingOnly, + local: 'localOnly' in this.filter && this.filter.localOnly }) // Always append to old results. If new results are empty, this doesn't change anything diff --git a/src/components/search/search.vue b/src/components/search/search.vue index d74224bc..76e76370 100644 --- a/src/components/search/search.vue +++ b/src/components/search/search.vue @@ -5,7 +5,6 @@ {{ $t('nav.search') }} diff --git a/src/components/search/search_filters.vue b/src/components/search/search_filters.vue index 98967fc1..3cbeacc9 100644 --- a/src/components/search/search_filters.vue +++ b/src/components/search/search_filters.vue @@ -1,5 +1,6 @@