Просмотр исходного кода

Merge pull request #16874 from overleaf/jdt-me-learn-links-new-tab

Learn wiki links should open in new tab

GitOrigin-RevId: 7e87feff971bc2c28d0e0bac85e0e20ef139e321
Jimmy Domagala-Tang 2 лет назад
Родитель
Сommit
537c822789

+ 1 - 1
services/web/app/views/_mixins/reconfirm_affiliation-marketing.pug

@@ -39,7 +39,7 @@ mixin reconfirmAffiliationNotification-marketing(userEmail, location)
 					| !{translate("please_reconfirm_institutional_email", {}, [{name: 'a', attrs: {href: '/user/settings?remove=' + userEmail.email}}])}
 					| !{translate("please_reconfirm_institutional_email", {}, [{name: 'a', attrs: {href: '/user/settings?remove=' + userEmail.email}}])}
 
 
 				|  
 				|  
-				a(href="/learn/how-to/Institutional_Email_Reconfirmation") #{translate("learn_more")}
+				a(href="/learn/how-to/Institutional_Email_Reconfirmation" target="_blank") #{translate("learn_more")}
 
 
 			div(hidden data-ol-sent)
 			div(hidden data-ol-sent)
 				| !{translate("please_check_your_inbox_to_confirm", {institutionName: userEmail.affiliation.institution.name}, ['strong'])}
 				| !{translate("please_check_your_inbox_to_confirm", {institutionName: userEmail.affiliation.institution.name}, ['strong'])}

+ 1 - 1
services/web/frontend/js/features/group-management/components/members-table/offboard-managed-user-modal.tsx

@@ -89,7 +89,7 @@ export default function OffboardManagedUserModal({
           <p>
           <p>
             <span>{t('this_action_cannot_be_reversed')}</span>
             <span>{t('this_action_cannot_be_reversed')}</span>
             &nbsp;
             &nbsp;
-            <a href="/learn/how-to/User_Management_in_Overleaf">
+            <a href="/learn/how-to/User_Management_in_Overleaf" target="_blank">
               {t('learn_more_about_managed_users')}
               {t('learn_more_about_managed_users')}
             </a>
             </a>
           </p>
           </p>

+ 4 - 1
services/web/frontend/js/features/project-list/components/notifications/groups/affiliation/reconfirm-affiliation.tsx

@@ -129,7 +129,10 @@ function ReconfirmAffiliation({
         components={[<a href={`/user/settings?remove=${email}`} />]}
         components={[<a href={`/user/settings?remove=${email}`} />]}
       />
       />
       &nbsp;
       &nbsp;
-      <a href="/learn/how-to/Institutional_Email_Reconfirmation">
+      <a
+        href="/learn/how-to/Institutional_Email_Reconfirmation"
+        target="_blank"
+      >
         {t('learn_more')}
         {t('learn_more')}
       </a>
       </a>
       {isError && (
       {isError && (

+ 8 - 2
services/web/frontend/js/features/project-list/components/notifications/groups/common.tsx

@@ -262,7 +262,10 @@ function CommonNotification({ notification }: CommonNotificationProps) {
                   i18nKey="dropbox_duplicate_project_names_suggestion"
                   i18nKey="dropbox_duplicate_project_names_suggestion"
                   components={[<b />]} // eslint-disable-line react/jsx-key
                   components={[<b />]} // eslint-disable-line react/jsx-key
                 />{' '}
                 />{' '}
-                <a href="/learn/how-to/Dropbox_Synchronization#Troubleshooting">
+                <a
+                  href="/learn/how-to/Dropbox_Synchronization#Troubleshooting"
+                  target="_blank"
+                >
                   {t('learn_more')}
                   {t('learn_more')}
                 </a>
                 </a>
                 .
                 .
@@ -290,7 +293,10 @@ function CommonNotification({ notification }: CommonNotificationProps) {
               ) : (
               ) : (
                 t('confirm_affiliation_to_relink_dropbox')
                 t('confirm_affiliation_to_relink_dropbox')
               )}{' '}
               )}{' '}
-              <a href="/learn/how-to/Institutional_Email_Reconfirmation">
+              <a
+                href="/learn/how-to/Institutional_Email_Reconfirmation"
+                target="_blank"
+              >
                 {t('learn_more')}
                 {t('learn_more')}
               </a>
               </a>
             </>
             </>

+ 5 - 1
services/web/frontend/js/features/project-list/components/notifications/groups/institution.tsx

@@ -67,7 +67,10 @@ function Institution() {
                         shouldUnescape
                         shouldUnescape
                         tOptions={{ interpolation: { escapeValue: true } }}
                         tOptions={{ interpolation: { escapeValue: true } }}
                       />{' '}
                       />{' '}
-                      <a href="/learn/how-to/Institutional_Login">
+                      <a
+                        href="/learn/how-to/Institutional_Login"
+                        target="_blank"
+                      >
                         {t('learn_more')}
                         {t('learn_more')}
                       </a>
                       </a>
                     </div>
                     </div>
@@ -152,6 +155,7 @@ function Institution() {
                     className={newNotificationStyle ? 'btn-secondary' : ''}
                     className={newNotificationStyle ? 'btn-secondary' : ''}
                     bsSize="sm"
                     bsSize="sm"
                     href="/learn/how-to/Institutional_Login"
                     href="/learn/how-to/Institutional_Login"
+                    target="_blank"
                   >
                   >
                     {t('find_out_more')}
                     {t('find_out_more')}
                   </Button>
                   </Button>

+ 4 - 0
services/web/frontend/js/features/project-list/components/welcome-message-new/welcome-message-link.tsx

@@ -2,6 +2,7 @@ type WelcomeMessageLinkProps = {
   imgSrc: string
   imgSrc: string
   title: string
   title: string
   href: string
   href: string
+  target?: string
   onClick?: () => void
   onClick?: () => void
 }
 }
 
 
@@ -9,6 +10,7 @@ export default function WelcomeMessageLink({
   imgSrc,
   imgSrc,
   title,
   title,
   href,
   href,
+  target,
   onClick,
   onClick,
 }: WelcomeMessageLinkProps) {
 }: WelcomeMessageLinkProps) {
   return (
   return (
@@ -16,6 +18,8 @@ export default function WelcomeMessageLink({
       href={href}
       href={href}
       onClick={onClick}
       onClick={onClick}
       className="card welcome-message-card welcome-message-card-link"
       className="card welcome-message-card welcome-message-card-link"
+      target={target || undefined}
+      rel="noopener"
     >
     >
       <p>{title}</p>
       <p>{title}</p>
       <img
       <img

+ 1 - 0
services/web/frontend/js/features/project-list/components/welcome-message.tsx

@@ -24,6 +24,7 @@ export default function WelcomeMessage() {
               imgSrc="/img/welcome-page/learn-latex.svg"
               imgSrc="/img/welcome-page/learn-latex.svg"
               title="Learn LaTeX with a tutorial"
               title="Learn LaTeX with a tutorial"
               href="/learn/latex/Learn_LaTeX_in_30_minutes"
               href="/learn/latex/Learn_LaTeX_in_30_minutes"
+              target="_blank"
             />
             />
             <WelcomeMessageLink
             <WelcomeMessageLink
               imgSrc="/img/welcome-page/browse-templates.svg"
               imgSrc="/img/welcome-page/browse-templates.svg"

+ 4 - 1
services/web/frontend/js/features/settings/components/emails-section.tsx

@@ -39,7 +39,10 @@ function EmailsSectionContent() {
             // eslint-disable-next-line react/jsx-key
             // eslint-disable-next-line react/jsx-key
             <strong />,
             <strong />,
             // eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key
             // eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key
-            <a href="/learn/how-to/Managing_your_Overleaf_emails" />,
+            <a
+              href="/learn/how-to/Managing_your_Overleaf_emails"
+              target="_blank"
+            />,
           ]}
           ]}
         />
         />
       </p>
       </p>

+ 4 - 1
services/web/frontend/js/features/settings/components/emails/reconfirmation-info/reconfirmation-info-prompt.tsx

@@ -171,7 +171,10 @@ function ReconfirmationInfoPromptText({
           [<span />]
           [<span />]
         }
         }
       />{' '}
       />{' '}
-      <a href="/learn/how-to/Institutional_Email_Reconfirmation">
+      <a
+        href="/learn/how-to/Institutional_Email_Reconfirmation"
+        target="_blank"
+      >
         {t('learn_more')}
         {t('learn_more')}
       </a>
       </a>
       <br />
       <br />

+ 1 - 1
services/web/frontend/js/features/settings/components/emails/row.tsx

@@ -138,7 +138,7 @@ function SSOAffiliationInfo({ userEmailData }: SSOAffiliationInfoProps) {
                     [<strong />]
                     [<strong />]
                   }
                   }
                 />{' '}
                 />{' '}
-                <a href="/learn/how-to/Institutional_Login">
+                <a href="/learn/how-to/Institutional_Login" target="_blank">
                   {t('find_out_more_about_institution_login')}
                   {t('find_out_more_about_institution_login')}
                 </a>
                 </a>
               </p>
               </p>

+ 5 - 1
services/web/frontend/js/features/settings/components/managed-account-alert.tsx

@@ -30,7 +30,11 @@ export default function ManagedAccountAlert() {
           <Trans
           <Trans
             i18nKey="need_contact_group_admin_to_make_changes"
             i18nKey="need_contact_group_admin_to_make_changes"
             components={[
             components={[
-              <a href="/learn/how-to/Understanding_Managed_Overleaf_Accounts" />, // eslint-disable-line jsx-a11y/anchor-has-content, react/jsx-key
+              // eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key
+              <a
+                href="/learn/how-to/Understanding_Managed_Overleaf_Accounts"
+                target="_blank"
+              />,
             ]}
             ]}
           />
           />
         </div>
         </div>

+ 1 - 1
services/web/frontend/js/features/subscription/components/dashboard/free-plan.tsx

@@ -9,7 +9,7 @@ function FreePlan() {
         i18nKey="on_free_plan_upgrade_to_access_features"
         i18nKey="on_free_plan_upgrade_to_access_features"
         components={[
         components={[
           // eslint-disable-next-line react/jsx-key, jsx-a11y/anchor-has-content
           // eslint-disable-next-line react/jsx-key, jsx-a11y/anchor-has-content
-          <a href="/learn/how-to/Overleaf_premium_features" rel="noopener" />,
+          <a href="/learn/how-to/Overleaf_premium_features" target="_blank" />,
         ]}
         ]}
       />
       />
       :
       :