diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index 17c1f35251..bc8a2a7599 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -223,6 +223,7 @@ "link_to_zotero": "", "linked_accounts": "", "linked_accounts_explained": "", + "linked_collabratec_description": "", "linked_file": "", "loading": "", "loading_recent_github_commits": "", @@ -233,6 +234,7 @@ "log_entry_maximum_entries_title": "", "log_hint_extra_info": "", "log_viewer_error": "", + "login_with_service": "", "logs_and_output_files": "", "logs_pane_info_message": "", "main_file_not_found": "", @@ -279,6 +281,7 @@ "no_search_results": "", "no_symbols_found": "", "normal": "", + "oauth_orcid_description": "", "of": "", "off": "", "official": "", @@ -345,6 +348,7 @@ "reconnect": "", "redirect_to_editor": "", "reference_error_relink_hint": "", + "reference_sync": "", "references_search_hint": "", "refresh": "", "refresh_page_after_linking_dropbox": "", @@ -411,6 +415,7 @@ "submit_title": "", "subscription_admins_cannot_be_deleted": "", "sure_you_want_to_delete": "", + "sync_dropbox_github": "", "sync_project_to_github_explanation": "", "sync_to_dropbox": "", "sync_to_github": "", diff --git a/services/web/frontend/js/features/settings/components/linking-section.tsx b/services/web/frontend/js/features/settings/components/linking-section.tsx index 607b2c6538..3c69351da6 100644 --- a/services/web/frontend/js/features/settings/components/linking-section.tsx +++ b/services/web/frontend/js/features/settings/components/linking-section.tsx @@ -27,10 +27,12 @@ function LinkingSection() { return ( <>

{t('integrations')}

-

{t('linked_accounts_explained')}

+

{t('linked_accounts_explained')}

{hasIntegrationLinkingSection ? ( <> -

{t('sync_dropbox_github')}

+

+ {t('sync_dropbox_github')} +

{integrationLinkingWidgets.map( ({ import: importObject, path }, widgetIndex) => ( @@ -46,7 +48,9 @@ function LinkingSection() { ) : null} {hasReferencesLinkingSection ? ( <> -

{t('reference_sync')}

+

+ {t('reference_sync')} +

{referenceLinkingWidgets.map( ({ import: importObject, path }, widgetIndex) => ( @@ -62,7 +66,9 @@ function LinkingSection() { ) : null} {hasSSOLinkingSection ? ( <> -

{t('linked_accounts')}

+

+ {t('linked_accounts')} +

{Object.values(subscriptions).map( (subscription, subscriptionIndex) => ( @@ -113,15 +119,28 @@ function SSOLinkingWidgetContainer({ const { t } = useTranslation() const { unlink } = useSSOContext() + let description = null + switch (subscription.providerId) { + case 'collabratec': + description = t('linked_collabratec_description') + break + case 'google': + case 'twitter': + description = t('login_with_service', { + service: subscription.provider.name, + }) + break + case 'orcid': + description = t('oauth_orcid_description') + break + } + return ( <> {t('premium_feature')} )}
-

+

{description}{' '} {t('learn_more')} @@ -64,7 +64,7 @@ export function IntegrationLinkingWidget({

{title}

-

+

{description?.replace(/<[^>]+>/g, '')}{' '} {helpPath ? ( @@ -77,7 +77,7 @@ export function SSOLinkingWidget({

diff --git a/services/web/frontend/js/shared/svgs/github-logo.js b/services/web/frontend/js/shared/svgs/github-logo.js index 71c1c3651a..6ad88db4de 100644 --- a/services/web/frontend/js/shared/svgs/github-logo.js +++ b/services/web/frontend/js/shared/svgs/github-logo.js @@ -6,32 +6,42 @@ function GithubLogo() { viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" - xmlnsXlink="http://www.w3.org/1999/xlink" > - + + + + + + + - - - - - - ) } diff --git a/services/web/frontend/js/shared/svgs/zotero-logo.js b/services/web/frontend/js/shared/svgs/zotero-logo.js index a41bc5c1a4..5913a4d073 100644 --- a/services/web/frontend/js/shared/svgs/zotero-logo.js +++ b/services/web/frontend/js/shared/svgs/zotero-logo.js @@ -14,19 +14,19 @@ function ZoteroLogo() { y="1.66666" width="36.6667" height="36.6667" - fill="url(#pattern0)" + fill="url(#zotero-pattern)" /> - + tr.affiliations-table-warning-row > td { border: 1px solid @gray-lighter; hr { - margin: 15px 10px; + margin: 0 10px; } } diff --git a/services/web/test/frontend/features/settings/components/linking/integration-widget.test.tsx b/services/web/test/frontend/features/settings/components/linking/integration-widget.test.tsx index 6e6843f289..3defa81371 100644 --- a/services/web/test/frontend/features/settings/components/linking/integration-widget.test.tsx +++ b/services/web/test/frontend/features/settings/components/linking/integration-widget.test.tsx @@ -25,7 +25,7 @@ describe('', function () { it('should render a link to upgrade the account', function () { expect( screen.getByRole('link', { name: 'Upgrade' }).getAttribute('href') - ).to.equal('user/subscription/plans') + ).to.equal('/user/subscription/plans') }) }) diff --git a/services/web/test/frontend/features/settings/components/linking/sso-widget.test.tsx b/services/web/test/frontend/features/settings/components/linking/sso-widget.test.tsx index 13a95fe5ce..4d3cdc678d 100644 --- a/services/web/test/frontend/features/settings/components/linking/sso-widget.test.tsx +++ b/services/web/test/frontend/features/settings/components/linking/sso-widget.test.tsx @@ -9,7 +9,7 @@ describe('', function () { title: 'integration', description: 'integration description', helpPath: '/help/integration', - linkPath: 'integration/link', + linkPath: '/integration/link', onUnlink: () => Promise.resolve(), } @@ -27,7 +27,7 @@ describe('', function () { render() expect( screen.getByRole('link', { name: 'Link' }).getAttribute('href') - ).to.equal('integration/link') + ).to.equal('/integration/link?intent=link') }) })