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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-23 18:11:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-23 18:11:09 +0300
commit2cba761741967eb6baf797af2ee0a702c2ffbdfe (patch)
tree4fb91ea33991578c258b1c9f8fdce5dcd4a186ee /app/assets/javascripts/groups
parent1ccebc7b3f091ef585dc87a91847aa35f7ae2130 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/groups')
-rw-r--r--app/assets/javascripts/groups/components/new_top_level_group_alert.vue40
1 files changed, 40 insertions, 0 deletions
diff --git a/app/assets/javascripts/groups/components/new_top_level_group_alert.vue b/app/assets/javascripts/groups/components/new_top_level_group_alert.vue
new file mode 100644
index 00000000000..c6af6cdb59f
--- /dev/null
+++ b/app/assets/javascripts/groups/components/new_top_level_group_alert.vue
@@ -0,0 +1,40 @@
+<script>
+import { GlAlert } from '@gitlab/ui';
+import { s__ } from '~/locale';
+import UserCalloutDismisser from '~/vue_shared/components/user_callout_dismisser.vue';
+import { helpPagePath } from '~/helpers/help_page_helper';
+
+export default {
+ name: 'NewTopLevelGroupAlert',
+ components: {
+ GlAlert,
+ UserCalloutDismisser,
+ },
+ i18n: {
+ titleText: s__("Groups|You're creating a new top-level group"),
+ bodyText: s__(
+ 'Groups|Members, projects, trials, and paid subscriptions are tied to a specific top-level group. If you are already a member of a top-level group, you can create a subgroup so your new work is part of your existing top-level group. Do you want to create a subgroup instead?',
+ ),
+ primaryBtnText: s__('Groups|Learn more about subgroups'),
+ },
+ subgroupsDocsPath: helpPagePath('user/group/subgroups/index'),
+};
+</script>
+
+<template>
+ <user-callout-dismisser feature-name="new_top_level_group_alert">
+ <template #default="{ dismiss, shouldShowCallout }">
+ <gl-alert
+ v-if="shouldShowCallout"
+ ref="newTopLevelAlert"
+ data-testid="new-top-level-alert"
+ :title="$options.i18n.titleText"
+ :primary-button-text="$options.i18n.primaryBtnText"
+ :primary-button-link="$options.subgroupsDocsPath"
+ @dismiss="dismiss"
+ >
+ {{ $options.i18n.bodyText }}
+ </gl-alert>
+ </template>
+ </user-callout-dismisser>
+</template>