diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index 6b7411eb2c..4ff969693f 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -133,6 +133,7 @@ "can_link_institution_email_acct_to_institution_acct": "", "can_link_your_institution_acct_2": "", "can_now_relink_dropbox": "", + "can_view": "", "cancel": "", "cancel_anytime": "", "cancel_my_account": "", diff --git a/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/add-collaborators.jsx b/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/add-collaborators.jsx index fe0a8f7cbd..5a9ab77859 100644 --- a/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/add-collaborators.jsx +++ b/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/add-collaborators.jsx @@ -1,6 +1,6 @@ import { useState, useMemo, useCallback } from 'react' import { useTranslation } from 'react-i18next' -import { Col, Form, Button } from 'react-bootstrap' +import { Form, FormGroup, FormControl, Button } from 'react-bootstrap' import { useMultipleSelection } from 'downshift' import { useShareProjectContext } from './share-project-modal' import SelectCollaborators from './select-collaborators' @@ -141,7 +141,7 @@ export default function AddCollaborators({ readOnly }) { return (
- + - + - -
-      + +
+ setPrivileges(event.target.value)} + > + + + +   
- +
) } diff --git a/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/collaborators-limit-upgrade.tsx b/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/collaborators-limit-upgrade.tsx index be09ac8669..6cf9c37f3c 100644 --- a/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/collaborators-limit-upgrade.tsx +++ b/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/collaborators-limit-upgrade.tsx @@ -9,7 +9,7 @@ export default function CollaboratorsLimitUpgrade() { const { features } = useProjectContext() return ( -
+
} diff --git a/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/link-sharing.jsx b/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/link-sharing.jsx index 866c244497..5425d19b5a 100644 --- a/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/link-sharing.jsx +++ b/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/link-sharing.jsx @@ -53,6 +53,7 @@ export default function LinkSharing() { setAccessLevel={setAccessLevel} inflight={inflight} projectId={projectId} + setShowLinks={setShowLinks} /> ) @@ -83,7 +84,7 @@ export default function LinkSharing() { } } -function PrivateSharing({ setAccessLevel, inflight, projectId }) { +function PrivateSharing({ setAccessLevel, inflight, projectId, setShowLinks }) { const { t } = useTranslation() return ( @@ -97,6 +98,7 @@ function PrivateSharing({ setAccessLevel, inflight, projectId }) { onClick={() => { setAccessLevel('tokenBased') eventTracking.sendMB('link-sharing-click', { projectId }) + setShowLinks(true) }} disabled={inflight} > @@ -113,6 +115,7 @@ PrivateSharing.propTypes = { setAccessLevel: PropTypes.func.isRequired, inflight: PropTypes.bool, projectId: PropTypes.string, + setShowLinks: PropTypes.func.isRequired, } function TokenBasedSharing({ diff --git a/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/select-collaborators.jsx b/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/select-collaborators.jsx index ebae37d69d..d1be30fcb0 100644 --- a/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/select-collaborators.jsx +++ b/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/select-collaborators.jsx @@ -4,7 +4,6 @@ import { useTranslation } from 'react-i18next' import { matchSorter } from 'match-sorter' import { useCombobox } from 'downshift' import classnames from 'classnames' -import { FormControl } from 'react-bootstrap' import Icon from '@/shared/components/icon' @@ -158,8 +157,7 @@ export default function SelectCollaborators({
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */} - -
+
{selectedItems.map((selectedItem, index) => (
- setPrivileges(event.target.value)} - > - {!readOnly && } - -
diff --git a/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/view-member.jsx b/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/view-member.jsx index 5d5c17956a..ce12d2bc9d 100644 --- a/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/view-member.jsx +++ b/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/view-member.jsx @@ -1,12 +1,18 @@ import PropTypes from 'prop-types' import { Col, Row } from 'react-bootstrap' import MemberPrivileges from './member-privileges' +import Icon from '@/shared/components/icon' export default function ViewMember({ member }) { return ( - {member.email} - + +
+ +
{member.email}
+
+ +
diff --git a/services/web/frontend/stylesheets/app/editor/share.less b/services/web/frontend/stylesheets/app/editor/share.less index ca598c47d8..82f93537a1 100644 --- a/services/web/frontend/stylesheets/app/editor/share.less +++ b/services/web/frontend/stylesheets/app/editor/share.less @@ -120,9 +120,6 @@ padding: @line-height-computed / 2; background-color: @gray-lightest; margin-top: @line-height-computed / 2; - .add-collabs { - margin-top: @line-height-computed / 2; - } form { .form-group { margin-bottom: @line-height-computed / 2; @@ -187,7 +184,10 @@ margin-top: 0; } .public-access-level { - padding: 0; border: none; } + + .invite-warning { + margin-bottom: @line-height-computed / 2; + } } diff --git a/services/web/frontend/stylesheets/components/tags-input.less b/services/web/frontend/stylesheets/components/tags-input.less index 3daeed6c4a..7118116b79 100644 --- a/services/web/frontend/stylesheets/components/tags-input.less +++ b/services/web/frontend/stylesheets/components/tags-input.less @@ -30,8 +30,7 @@ background-color: #fff; height: 100%; display: flex; - justify-content: space-between; - flex-direction: row; + flex-wrap: wrap; } .tags-input .tags:focus-within { &:extend(.input-focus-style); @@ -160,9 +159,3 @@ font-weight: bold; font-style: normal; } - -.modal-link-share-new { - .tags-input .tags { - padding: 0 0 0 5px; - } -} diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 6e51592850..ba7f9e0e1b 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -196,12 +196,13 @@ "by_joining_labs": "By joining Labs, you agree to receive occasional emails and updates from Overleaf—for example, to request your feedback. You also agree to our <0>terms of service and <1>privacy notice.", "by_registering_you_agree_to_our_terms_of_service": "By registering, you agree to our <0>terms of service and <1>privacy notice.", "by_subscribing_you_agree_to_our_terms_of_service": "By subscribing, you agree to our <0>terms of service.", - "can_edit": "Can Edit", + "can_edit": "Can edit", "can_link_institution_email_acct_to_institution_acct": "You can now link your __email__ __appName__ account to your __institutionName__ institutional account.", "can_link_institution_email_by_clicking": "You can link your __email__ __appName__ account to your __institutionName__ account by clicking __clickText__.", "can_link_institution_email_to_login": "You can link your __email__ __appName__ account to your __institutionName__ account, which will allow you to log in to __appName__ through your institution and will reconfirm your institutional email address.", "can_link_your_institution_acct_2": "You can now <0>link your <0>__appName__ account to your <0>__institutionName__ institutional account.", "can_now_relink_dropbox": "You can now <0>relink your Dropbox account.", + "can_view": "Can view", "cancel": "Cancel", "cancel_anytime": "We’re confident that you’ll love __appName__, but if not you can cancel anytime. We’ll give you your money back, no questions asked, if you let us know within 30 days.", "cancel_my_account": "Cancel my subscription", diff --git a/services/web/test/frontend/features/share-project-modal/components/share-project-modal.test.jsx b/services/web/test/frontend/features/share-project-modal/components/share-project-modal.test.jsx index a804d3d1dc..747a21f1f7 100644 --- a/services/web/test/frontend/features/share-project-modal/components/share-project-modal.test.jsx +++ b/services/web/test/frontend/features/share-project-modal/components/share-project-modal.test.jsx @@ -615,7 +615,7 @@ describe('', function () { }, }) - const privilegesElement = screen.getByDisplayValue('Can Edit') + const privilegesElement = screen.getByDisplayValue('Can edit') fireEvent.change(privilegesElement, { target: { value: 'readOnly' } }) const submitButton = screen.getByRole('button', { name: 'Share' })