debian-mirror-gitlab/app/assets/javascripts/search/sidebar/components/app.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
899 B
Vue
Raw Normal View History

2021-01-29 00:20:46 +05:30
<script>
2023-01-13 00:05:48 +05:30
import { mapState } from 'vuex';
import ScopeNavigation from '~/search/sidebar/components/scope_navigation.vue';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { SCOPE_ISSUES, SCOPE_MERGE_REQUESTS } from '../constants';
import ResultsFilters from './results_filters.vue';
2021-01-29 00:20:46 +05:30
export default {
name: 'GlobalSearchSidebar',
components: {
2023-01-13 00:05:48 +05:30
ResultsFilters,
ScopeNavigation,
2021-01-29 00:20:46 +05:30
},
2023-01-13 00:05:48 +05:30
mixins: [glFeatureFlagsMixin()],
2021-01-29 00:20:46 +05:30
computed: {
2023-01-13 00:05:48 +05:30
...mapState(['urlQuery']),
showFilters() {
return this.urlQuery.scope === SCOPE_ISSUES || this.urlQuery.scope === SCOPE_MERGE_REQUESTS;
2021-01-29 00:20:46 +05:30
},
},
};
</script>
<template>
2023-01-13 00:05:48 +05:30
<section class="search-sidebar gl-display-flex gl-flex-direction-column gl-mr-4 gl-mb-6 gl-mt-5">
<scope-navigation v-if="glFeatures.searchPageVerticalNav" />
<results-filters v-if="showFilters" />
</section>
2021-01-29 00:20:46 +05:30
</template>