debian-mirror-gitlab/app/assets/javascripts/boards/components/modal/tabs.vue

43 lines
1 KiB
Vue
Raw Normal View History

2018-11-08 19:23:39 +05:30
<script>
2020-04-22 19:07:51 +05:30
/* eslint-disable @gitlab/vue-require-i18n-strings */
2021-01-03 14:25:43 +05:30
import { GlTabs, GlTab, GlBadge } from '@gitlab/ui';
2018-12-13 13:39:08 +05:30
import modalMixin from '../../mixins/modal_mixins';
2021-03-11 19:13:27 +05:30
import ModalStore from '../../stores/modal_store';
2018-11-08 19:23:39 +05:30
2018-12-13 13:39:08 +05:30
export default {
2021-01-03 14:25:43 +05:30
components: {
GlTabs,
GlTab,
GlBadge,
},
2018-12-13 13:39:08 +05:30
mixins: [modalMixin],
data() {
return ModalStore.store;
},
computed: {
selectedCount() {
return ModalStore.selectedCount();
2018-11-08 19:23:39 +05:30
},
2018-12-13 13:39:08 +05:30
},
destroyed() {
this.activeTab = 'all';
},
};
2018-11-08 19:23:39 +05:30
</script>
<template>
2021-01-03 14:25:43 +05:30
<gl-tabs class="gl-mt-3">
<gl-tab @click.prevent="changeTab('all')">
<template slot="title">
<span>Open issues</span>
<gl-badge size="sm" class="gl-tab-counter-badge">{{ issuesCount }}</gl-badge>
</template>
</gl-tab>
<gl-tab @click.prevent="changeTab('selected')">
<template slot="title">
<span>Selected issues</span>
<gl-badge size="sm" class="gl-tab-counter-badge">{{ selectedCount }}</gl-badge>
</template>
</gl-tab>
</gl-tabs>
2018-11-08 19:23:39 +05:30
</template>