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

getters.js « file_templates « modules « stores « ide « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bf0d3ed337ca5273306c0a07f38f04abb65d1d73 (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
import { __ } from '~/locale';
import { leftSidebarViews } from '../../../constants';

export const templateTypes = () => [
  {
    name: '.gitlab-ci.yml',
    key: 'gitlab_ci_ymls',
  },
  {
    name: '.gitignore',
    key: 'gitignores',
  },
  {
    name: __('LICENSE'),
    key: 'licenses',
  },
  {
    name: __('Dockerfile'),
    key: 'dockerfiles',
  },
];

export const showFileTemplatesBar = (_, getters, rootState) => (name) =>
  getters.templateTypes.find((t) => t.name === name) &&
  rootState.currentActivityView === leftSidebarViews.edit.name;