debian-mirror-gitlab/app/assets/javascripts/pages/groups/new/components/app.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

94 lines
2.6 KiB
Vue
Raw Normal View History

2021-09-04 01:27:46 +05:30
<script>
import importGroupIllustration from '@gitlab/svgs/dist/illustrations/group-import.svg';
import newGroupIllustration from '@gitlab/svgs/dist/illustrations/group-new.svg';
2023-05-27 22:25:52 +05:30
import { s__ } from '~/locale';
2021-09-04 01:27:46 +05:30
import NewNamespacePage from '~/vue_shared/new_namespace/new_namespace_page.vue';
import createGroupDescriptionDetails from './create_group_description_details.vue';
export default {
components: {
NewNamespacePage,
},
props: {
2023-05-27 22:25:52 +05:30
groupsUrl: {
type: String,
required: true,
},
parentGroupUrl: {
type: String,
required: false,
default: null,
},
2022-08-27 11:52:29 +05:30
parentGroupName: {
type: String,
required: false,
default: '',
},
importExistingGroupPath: {
type: String,
required: false,
default: '',
},
2021-09-04 01:27:46 +05:30
hasErrors: {
type: Boolean,
required: false,
default: false,
},
},
2022-08-27 11:52:29 +05:30
computed: {
2023-05-27 22:25:52 +05:30
initialBreadcrumbs() {
return this.parentGroupUrl
? [
{ text: this.parentGroupName, href: this.parentGroupUrl },
{ text: s__('GroupsNew|New subgroup'), href: '#' },
]
: [
{ text: s__('GroupsNew|Groups'), href: this.groupsUrl },
{ text: s__('GroupsNew|New group'), href: '#' },
];
2022-08-27 11:52:29 +05:30
},
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.',
},
];
},
},
2021-09-04 01:27:46 +05:30
};
</script>
<template>
<new-namespace-page
:jump-to-last-persisted-panel="hasErrors"
2023-05-27 22:25:52 +05:30
:initial-breadcrumbs="initialBreadcrumbs"
2022-08-27 11:52:29 +05:30
:panels="panels"
2021-09-04 01:27:46 +05:30
:title="s__('GroupsNew|Create new group')"
persistence-key="new_group_last_active_tab"
/>
</template>