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: 841aa6895943df8502ade4a86da1ecac29e3e4d7 (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
33
34
35
36
37
<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: {
    tabClosed(file) {
      Store.removeFromOpenedFiles(file);
    },
  },
};

export default RepoTabs;
</script>

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