debian-mirror-gitlab/app/assets/javascripts/invite_members/constants.js

165 lines
6.6 KiB
JavaScript
Raw Normal View History

2022-06-21 17:19:12 +05:30
import { s__ } from '~/locale';
2021-09-30 23:02:18 +05:30
2021-04-17 20:07:23 +05:30
export const SEARCH_DELAY = 200;
2022-08-27 11:52:29 +05:30
export const VALID_TOKEN_BACKGROUND = 'gl-bg-green-100';
export const INVALID_TOKEN_BACKGROUND = 'gl-bg-red-100';
2021-12-11 22:18:48 +05:30
export const INVITE_MEMBERS_FOR_TASK = {
minimum_access_level: 30,
name: 'invite_members_for_task',
view: 'modal_opened_from_email',
submit: 'submit',
};
2023-03-04 22:38:38 +05:30
export const TOAST_MESSAGE_LOCALSTORAGE_KEY = 'members_invited_successfully';
2021-09-04 01:27:46 +05:30
export const GROUP_FILTERS = {
ALL: 'all',
DESCENDANT_GROUPS: 'descendant_groups',
};
2021-09-30 23:02:18 +05:30
2021-10-27 15:23:28 +05:30
export const USERS_FILTER_ALL = 'all';
export const USERS_FILTER_SAML_PROVIDER_ID = 'saml_provider_id';
2021-12-11 22:18:48 +05:30
export const TRIGGER_ELEMENT_BUTTON = 'button';
export const TRIGGER_ELEMENT_SIDE_NAV = 'side-nav';
2022-07-23 23:45:48 +05:30
export const TRIGGER_DEFAULT_QA_SELECTOR = 'invite_members_button';
2021-12-11 22:18:48 +05:30
export const MEMBERS_MODAL_DEFAULT_TITLE = s__('InviteMembersModal|Invite members');
export const MEMBERS_MODAL_CELEBRATE_TITLE = s__(
'InviteMembersModal|GitLab is better with colleagues!',
);
export const MEMBERS_MODAL_CELEBRATE_INTRO = s__(
'InviteMembersModal|How about inviting a colleague or two to join you?',
);
export const MEMBERS_TO_GROUP_DEFAULT_INTRO_TEXT = s__(
"InviteMembersModal|You're inviting members to the %{strongStart}%{name}%{strongEnd} group.",
);
export const MEMBERS_TO_PROJECT_DEFAULT_INTRO_TEXT = s__(
"InviteMembersModal|You're inviting members to the %{strongStart}%{name}%{strongEnd} project.",
);
export const MEMBERS_TO_PROJECT_CELEBRATE_INTRO_TEXT = s__(
"InviteMembersModal|Congratulations on creating your project, you're almost there!",
);
2022-07-16 23:28:13 +05:30
export const MEMBERS_SEARCH_FIELD = s__('InviteMembersModal|Username or email address');
2021-12-11 22:18:48 +05:30
export const MEMBERS_PLACEHOLDER = s__('InviteMembersModal|Select members or type email addresses');
export const MEMBERS_TASKS_TO_BE_DONE_TITLE = s__(
'InviteMembersModal|Create issues for your new team member to work on (optional)',
);
export const MEMBERS_TASKS_TO_BE_DONE_NO_PROJECTS = s__(
'InviteMembersModal|To assign issues to a new team member, you need a project for the issues. %{linkStart}Create a project to get started.%{linkEnd}',
);
export const MEMBERS_TASKS_PROJECTS_TITLE = s__(
'InviteMembersModal|Choose a project for the issues',
);
export const GROUP_MODAL_DEFAULT_TITLE = s__('InviteMembersModal|Invite a group');
export const GROUP_MODAL_TO_GROUP_DEFAULT_INTRO_TEXT = s__(
"InviteMembersModal|You're inviting a group to the %{strongStart}%{name}%{strongEnd} group.",
);
export const GROUP_MODAL_TO_PROJECT_DEFAULT_INTRO_TEXT = s__(
"InviteMembersModal|You're inviting a group to the %{strongStart}%{name}%{strongEnd} project.",
);
2023-03-04 22:38:38 +05:30
export const GROUP_MODAL_ALERT_BODY = s__(
'InviteMembersModal| Inviting a group %{linkStart}adds its members to your group%{linkEnd}, including members who join after the invite. This might put your group over the free %{count} user limit.',
);
2021-12-11 22:18:48 +05:30
export const GROUP_SEARCH_FIELD = s__('InviteMembersModal|Select a group to invite');
export const GROUP_PLACEHOLDER = s__('InviteMembersModal|Search for a group to invite');
export const ACCESS_LEVEL = s__('InviteMembersModal|Select a role');
export const ACCESS_EXPIRE_DATE = s__('InviteMembersModal|Access expiration date (optional)');
export const TOAST_MESSAGE_SUCCESSFUL = s__('InviteMembersModal|Members were successfully added');
export const INVALID_FEEDBACK_MESSAGE_DEFAULT = s__('InviteMembersModal|Something went wrong');
export const READ_MORE_TEXT = s__(
`InviteMembersModal|%{linkStart}Read more%{linkEnd} about role permissions`,
);
export const INVITE_BUTTON_TEXT = s__('InviteMembersModal|Invite');
2022-07-16 23:28:13 +05:30
export const INVITE_BUTTON_TEXT_DISABLED = s__('InviteMembersModal|Manage members');
2021-12-11 22:18:48 +05:30
export const CANCEL_BUTTON_TEXT = s__('InviteMembersModal|Cancel');
2022-07-16 23:28:13 +05:30
export const CANCEL_BUTTON_TEXT_DISABLED = s__('InviteMembersModal|Explore paid plans');
2021-12-11 22:18:48 +05:30
export const HEADER_CLOSE_LABEL = s__('InviteMembersModal|Close invite team members');
2022-08-13 15:12:31 +05:30
export const MEMBER_ERROR_LIST_TEXT = s__(
'InviteMembersModal|Review the invite errors and try again:',
);
2022-08-27 11:52:29 +05:30
export const COLLAPSED_ERRORS = s__('InviteMembersModal|Show more (%{count})');
export const EXPANDED_ERRORS = s__('InviteMembersModal|Show less');
2023-03-04 22:38:38 +05:30
export const EMPTY_INVITES_ALERT_TEXT = s__('InviteMembersModal|Please add members to invite');
2021-12-11 22:18:48 +05:30
2022-04-04 11:22:00 +05:30
export const MEMBER_MODAL_LABELS = {
modal: {
default: {
title: MEMBERS_MODAL_DEFAULT_TITLE,
2021-12-11 22:18:48 +05:30
},
2022-04-04 11:22:00 +05:30
celebrate: {
title: MEMBERS_MODAL_CELEBRATE_TITLE,
intro: MEMBERS_MODAL_CELEBRATE_INTRO,
2021-12-11 22:18:48 +05:30
},
},
2022-04-04 11:22:00 +05:30
toGroup: {
default: {
introText: MEMBERS_TO_GROUP_DEFAULT_INTRO_TEXT,
2021-12-11 22:18:48 +05:30
},
2022-04-04 11:22:00 +05:30
},
toProject: {
default: {
introText: MEMBERS_TO_PROJECT_DEFAULT_INTRO_TEXT,
2021-12-11 22:18:48 +05:30
},
2022-04-04 11:22:00 +05:30
celebrate: {
introText: MEMBERS_TO_PROJECT_CELEBRATE_INTRO_TEXT,
2021-12-11 22:18:48 +05:30
},
},
2022-04-04 11:22:00 +05:30
searchField: MEMBERS_SEARCH_FIELD,
placeHolder: MEMBERS_PLACEHOLDER,
tasksToBeDone: {
title: MEMBERS_TASKS_TO_BE_DONE_TITLE,
noProjects: MEMBERS_TASKS_TO_BE_DONE_NO_PROJECTS,
},
tasksProject: {
title: MEMBERS_TASKS_PROJECTS_TITLE,
},
toastMessageSuccessful: TOAST_MESSAGE_SUCCESSFUL,
2022-08-13 15:12:31 +05:30
memberErrorListText: MEMBER_ERROR_LIST_TEXT,
2022-08-27 11:52:29 +05:30
collapsedErrors: COLLAPSED_ERRORS,
expandedErrors: EXPANDED_ERRORS,
2023-03-04 22:38:38 +05:30
emptyInvitesAlertText: EMPTY_INVITES_ALERT_TEXT,
2022-04-04 11:22:00 +05:30
};
export const GROUP_MODAL_LABELS = {
title: GROUP_MODAL_DEFAULT_TITLE,
toGroup: {
introText: GROUP_MODAL_TO_GROUP_DEFAULT_INTRO_TEXT,
},
toProject: {
introText: GROUP_MODAL_TO_PROJECT_DEFAULT_INTRO_TEXT,
},
searchField: GROUP_SEARCH_FIELD,
placeHolder: GROUP_PLACEHOLDER,
2021-12-11 22:18:48 +05:30
toastMessageSuccessful: TOAST_MESSAGE_SUCCESSFUL,
};
2022-01-26 12:08:38 +05:30
export const LEARN_GITLAB = 'learn_gitlab';
2023-01-13 00:05:48 +05:30
export const ON_SHOW_TRACK_LABEL = 'over_limit_modal_viewed';
2022-07-16 23:28:13 +05:30
export const WARNING_ALERT_TITLE = s__(
'InviteMembersModal|You only have space for %{count} more %{members} in %{name}',
);
export const DANGER_ALERT_TITLE = s__(
"InviteMembersModal|You've reached your %{count} %{members} limit for %{name}",
);
2023-01-13 00:05:48 +05:30
export const REACHED_LIMIT_VARIANT = 'reached';
export const CLOSE_TO_LIMIT_VARIANT = 'close';
2022-07-16 23:28:13 +05:30
export const REACHED_LIMIT_MESSAGE = s__(
2023-01-13 00:05:48 +05:30
'InviteMembersModal|To invite new users to this namespace, you must remove existing users. You can still add existing namespace users.',
2022-07-16 23:28:13 +05:30
);
export const REACHED_LIMIT_UPGRADE_SUGGESTION_MESSAGE = REACHED_LIMIT_MESSAGE.concat(
s__(
2023-01-13 00:05:48 +05:30
'InviteMembersModal| To get more members, the owner of this namespace can %{trialLinkStart}start a trial%{trialLinkEnd} or %{upgradeLinkStart}upgrade%{upgradeLinkEnd} to a paid tier.',
2022-07-16 23:28:13 +05:30
),
);
export const CLOSE_TO_LIMIT_MESSAGE = s__(
2022-08-27 11:52:29 +05:30
'InviteMembersModal|To get more members an owner of the group can %{trialLinkStart}start a trial%{trialLinkEnd} or %{upgradeLinkStart}upgrade%{upgradeLinkEnd} to a paid tier.',
2022-07-16 23:28:13 +05:30
);