[MM-51098] Hide "copy invite link" when selecting guest - migrated from webapp (#22745)
Этот коммит содержится в:
@@ -223,4 +223,15 @@ describe('Guest Account - Guest User Invitation Flow', () => {
|
||||
// * Verify invite more button is present
|
||||
cy.findByTestId('invite-more').should('be.visible');
|
||||
});
|
||||
|
||||
it('hides the copy link button when inviting guests', () => {
|
||||
// # Open team menu and click 'Invite People'
|
||||
cy.uiOpenTeamMenu('Invite People');
|
||||
|
||||
// # Select Guest
|
||||
cy.findByTestId('inviteGuestLink').should('be.visible').click();
|
||||
|
||||
// * The button "Copy invite link" should not exist
|
||||
cy.findByTestId('InviteView__copyInviteLink').should('not.exist');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -51,6 +51,10 @@ button.InviteView__copyLink.tertiary-button:focus {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&-guest {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.btn {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import React, {useEffect, useMemo} from 'react';
|
||||
import {Modal} from 'react-bootstrap';
|
||||
import {FormattedMessage, useIntl} from 'react-intl';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import deepFreeze from 'mattermost-redux/utils/deep_freeze';
|
||||
import {Channel} from '@mattermost/types/channels';
|
||||
@@ -259,8 +260,8 @@ export default function InviteView(props: Props) {
|
||||
)}
|
||||
<OverageUsersBannerNotice/>
|
||||
</Modal.Body>
|
||||
<Modal.Footer className={'InviteView__footer ' + props.footerClass}>
|
||||
{copyButton}
|
||||
<Modal.Footer className={classNames('InviteView__footer', props.footerClass, {'InviteView__footer-guest': props.inviteType === InviteType.GUEST})}>
|
||||
{props.inviteType === InviteType.MEMBER && copyButton}
|
||||
<button
|
||||
disabled={!isInviteValid}
|
||||
onClick={props.invite}
|
||||
|
||||
Ссылка в новой задаче
Block a user