Welcome to mirror list, hosted at ThFree Co, Russian Federation.

repo_tabs.vue « components « repo « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bbd60d9d79303edd69c303768cc0984ed701f6c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<script>
import Store from '../stores/repo_store';
import RepoTab from './repo_tab.vue';
import RepoMixin from '../mixins/repo_mixin';

const RepoTabs = {
  mixins: [RepoMixin],

  components: {
    'repo-tab': RepoTab,
  },

  data: () => Store,

  methods: {
    xClicked(file) {
      Store.removeFromOpenedFiles(file);
    },
  },
};

export default RepoTabs;
</script>

<template>
<ul
  v-if="isMini"
  id="tabs">
  <repo-tab v-for="tab in openedFiles" :key="tab.id" :tab="tab" :class="{'active' : tab.active}" @xclicked="xClicked"/>
  <li class="tabs-divider" />
</ul>
</template>