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

47 lines
1.1 KiB
JavaScript
Raw Normal View History

2017-08-17 22:00:37 +05:30
import Vue from 'vue';
2018-10-15 14:42:47 +05:30
import ModalStore from '../../stores/modal_store';
import modalMixin from '../../mixins/modal_mixins';
2017-08-17 22:00:37 +05:30
gl.issueBoards.ModalTabs = Vue.extend({
2018-10-15 14:42:47 +05:30
mixins: [modalMixin],
2017-08-17 22:00:37 +05:30
data() {
return ModalStore.store;
},
computed: {
selectedCount() {
return ModalStore.selectedCount();
},
},
destroyed() {
this.activeTab = 'all';
},
template: `
<div class="top-area prepend-top-10 append-bottom-10">
<ul class="nav-links issues-state-filters">
<li :class="{ 'active': activeTab == 'all' }">
<a
href="#"
role="button"
@click.prevent="changeTab('all')">
Open issues
<span class="badge">
{{ issuesCount }}
</span>
</a>
</li>
<li :class="{ 'active': activeTab == 'selected' }">
<a
href="#"
role="button"
@click.prevent="changeTab('selected')">
Selected issues
<span class="badge">
{{ selectedCount }}
</span>
</a>
</li>
</ul>
</div>
`,
});