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

app.vue « components « new « groups « pages « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f01e5e595a30370db3e33a2e34292d9e1e4846d1 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<script>
import importGroupIllustration from '@gitlab/svgs/dist/illustrations/group-import.svg';
import newGroupIllustration from '@gitlab/svgs/dist/illustrations/group-new.svg';

import { __, s__ } from '~/locale';
import NewNamespacePage from '~/vue_shared/new_namespace/new_namespace_page.vue';
import createGroupDescriptionDetails from './create_group_description_details.vue';

export default {
  components: {
    NewNamespacePage,
  },
  props: {
    parentGroupName: {
      type: String,
      required: false,
      default: '',
    },
    importExistingGroupPath: {
      type: String,
      required: false,
      default: '',
    },
    hasErrors: {
      type: Boolean,
      required: false,
      default: false,
    },
  },
  computed: {
    initialBreadcrumb() {
      return this.parentGroupName || __('New group');
    },
    panels() {
      return [
        {
          name: 'create-group-pane',
          selector: '#create-group-pane',
          title: this.parentGroupName
            ? s__('GroupsNew|Create subgroup')
            : s__('GroupsNew|Create group'),
          description: s__(
            'GroupsNew|Assemble related projects together and grant members access to several projects at once.',
          ),
          illustration: newGroupIllustration,
          details: createGroupDescriptionDetails,
          detailProps: {
            parentGroupName: this.parentGroupName,
            importExistingGroupPath: this.importExistingGroupPath,
          },
        },
        {
          name: 'import-group-pane',
          selector: '#import-group-pane',
          title: s__('GroupsNew|Import group'),
          description: s__(
            'GroupsNew|Import a group and related data from another GitLab instance.',
          ),
          illustration: importGroupIllustration,
          details: 'Migrate your existing groups from another instance of GitLab.',
        },
      ];
    },
  },
};
</script>

<template>
  <new-namespace-page
    :jump-to-last-persisted-panel="hasErrors"
    :initial-breadcrumb="initialBreadcrumb"
    :panels="panels"
    :title="s__('GroupsNew|Create new group')"
    persistence-key="new_group_last_active_tab"
  />
</template>