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

default_branch_selector.vue « components « settings « projects « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fee2f5912167ac347f45774b9ab563cad2276e7e (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
38
<script>
import RefSelector from '~/ref/components/ref_selector.vue';
import { REF_TYPE_BRANCHES } from '~/ref/constants';
import { __ } from '~/locale';

export default {
  components: {
    RefSelector,
  },
  props: {
    persistedDefaultBranch: {
      type: String,
      required: true,
    },
    projectId: {
      type: String,
      required: true,
    },
  },
  refTypes: [REF_TYPE_BRANCHES],
  i18n: {
    dropdownHeader: __('Select default branch'),
    searchPlaceholder: __('Search branch'),
  },
};
</script>
<template>
  <ref-selector
    :value="persistedDefaultBranch"
    class="gl-w-full"
    :project-id="projectId"
    :enabled-ref-types="$options.refTypes"
    :translations="$options.i18n"
    name="project[default_branch]"
    data-testid="default-branch-dropdown"
    data-qa-selector="default_branch_dropdown"
  />
</template>