Ver Fonte

Merge pull request #13570 from overleaf/mj-twitter-login

[web] Deprecate twitter login

GitOrigin-RevId: a1e81463b652239b780587976a96b65a8c6827f1
Mathias Jakobsen há 3 anos atrás
pai
commit
c3a2786d82

+ 1 - 0
services/web/frontend/extracted-translations.json

@@ -553,6 +553,7 @@
   "log_in_with_primary_email_address": "",
   "log_viewer_error": "",
   "login_with_service": "",
+  "login_with_service_will_stop_working_soon": "",
   "logs_and_output_files": "",
   "looking_multiple_licenses": "",
   "looks_like_youre_at": "",

+ 5 - 1
services/web/frontend/js/features/settings/components/linking-section.tsx

@@ -160,11 +160,15 @@ function SSOLinkingWidgetContainer({
       description = t('linked_collabratec_description')
       break
     case 'google':
-    case 'twitter':
       description = `${t('login_with_service', {
         service: subscription.provider.name,
       })}.`
       break
+    case 'twitter':
+      description = t('login_with_service_will_stop_working_soon', {
+        service: subscription.provider.name,
+      })
+      break
     case 'orcid':
       description = t('oauth_orcid_description')
       break

+ 9 - 0
services/web/frontend/js/features/settings/components/linking/sso-widget.tsx

@@ -7,11 +7,20 @@ import IEEELogo from '../../../../shared/svgs/ieee-logo'
 import GoogleLogo from '../../../../shared/svgs/google-logo'
 import OrcidLogo from '../../../../shared/svgs/orcid-logo'
 import LinkingStatus from './status'
+import Icon from '../../../../shared/components/icon'
 
 const providerLogos: { readonly [p: string]: JSX.Element } = {
   collabratec: <IEEELogo />,
   google: <GoogleLogo />,
   orcid: <OrcidLogo />,
+  twitter: (
+    <Icon
+      type="exclamation-triangle"
+      fw
+      className="text-warning"
+      style={{ fontSize: '32px', width: '40px' }}
+    />
+  ),
 }
 
 type SSOLinkingWidgetProps = {

+ 4 - 0
services/web/frontend/stylesheets/components/buttons.less

@@ -335,3 +335,7 @@ input[type='button'] {
   padding-left: 20px;
   padding-right: 0;
 }
+
+.login-expand-more-btn {
+  display: list-item;
+}

+ 1 - 0
services/web/locales/en.json

@@ -922,6 +922,7 @@
   "login_to_overleaf": "Log in to Overleaf",
   "login_with_email": "Log in with your email",
   "login_with_service": "Log in with __service__",
+  "login_with_service_will_stop_working_soon": "Login with __service__ will stop working soon. If you log in with __service__, please take a moment to set up another SSO provider or a password.",
   "logs_and_output_files": "Logs and output files",
   "longer_compile_timeout": "Longer <0>compile timeout</0>",
   "looking_multiple_licenses": "Looking for multiple licenses?",