From 2e4d3d7aabb62377fab1a4a7667fb13e9e266e65 Mon Sep 17 00:00:00 2001 From: Tim Alby Date: Fri, 14 Sep 2018 14:09:43 +0100 Subject: [PATCH] change links to v1 to sign user in first --- services/web/app/views/project/list.pug | 2 +- services/web/app/views/project/list/modals.pug | 2 +- services/web/app/views/project/list/v1-item.pug | 2 +- services/web/app/views/subscriptions/dashboard.pug | 4 ++-- services/web/app/views/user/settings.pug | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/services/web/app/views/project/list.pug b/services/web/app/views/project/list.pug index b1d903ca49..92453e768f 100644 --- a/services/web/app/views/project/list.pug +++ b/services/web/app/views/project/list.pug @@ -98,7 +98,7 @@ block content | To tag or rename your v1 projects, please go back to Overleaf v1. div(ng-show="visible") a.project-list-sidebar-v1-link( - href=settings.overleaf.host + "/dash?prefer-v1-dash=1" + href='/sign_in_to_v1?return_to=%2Fdash%3Fprefer-v1-dash%3D1' ) Go back to v1 if userIsFromSL(user) div(ng-show="visible") diff --git a/services/web/app/views/project/list/modals.pug b/services/web/app/views/project/list/modals.pug index 2c1f30bbbb..c82c3bdb91 100644 --- a/services/web/app/views/project/list/modals.pug +++ b/services/web/app/views/project/list/modals.pug @@ -356,7 +356,7 @@ script(type="text/ng-template", id="v1ImportModalTemplate") form-messages(for="v1ImportForm") if settings.overleaf && settings.overleaf.host a.btn.btn-primary.v1-import-btn( - ng-href=settings.overleaf.host + "/{{project.id}}" + ng-href='/sign_in_to_v1?return_to=%2F{{project.id}}' ng-class="{disabled: v1ImportForm.inflight || v1ImportForm.response.success}" ) No thanks, open in v1 input.btn.btn-primary.v1-import-btn( diff --git a/services/web/app/views/project/list/v1-item.pug b/services/web/app/views/project/list/v1-item.pug index 5a8e37bca0..3eb621f977 100644 --- a/services/web/app/views/project/list/v1-item.pug +++ b/services/web/app/views/project/list/v1-item.pug @@ -13,7 +13,7 @@ ng-show="project.accessLevel == 'owner'" ) {{project.name}} a.projectName( - href=settings.overleaf.host + "/{{project.id}}" + href='/sign_in_to_v1?return_to=%2F{{project.id}}' target="_blank" ng-hide="project.accessLevel == 'owner'" ) {{project.name}} diff --git a/services/web/app/views/subscriptions/dashboard.pug b/services/web/app/views/subscriptions/dashboard.pug index 36a79820de..00be7b0952 100644 --- a/services/web/app/views/subscriptions/dashboard.pug +++ b/services/web/app/views/subscriptions/dashboard.pug @@ -122,7 +122,7 @@ block content p | You are subscribed to Overleaf through Overleaf v1 p - a.btn.btn-primary(href=settings.overleaf.host+"/users/edit#status") Manage v1 Subscription + a.btn.btn-primary(href='/sign_in_to_v1?return_to=%2Fusers%2Fedit%23status') Manage v1 Subscription hr if settings.overleaf && v1Subscriptions && v1Subscriptions.teams && v1Subscriptions.teams.length > 0 @@ -130,7 +130,7 @@ block content p | You are a member of the Overleaf v1 team: #{team.name} p - a.btn.btn-primary(href=settings.overleaf.host+"/teams") Manage v1 Team Membership + a.btn.btn-primary(href="/sign_in_to_v1?return_to=%2Fteams") Manage v1 Team Membership hr .card(ng-if="view == 'cancelation'") diff --git a/services/web/app/views/user/settings.pug b/services/web/app/views/user/settings.pug index b6f4818d7f..d671709c9d 100644 --- a/services/web/app/views/user/settings.pug +++ b/services/web/app/views/user/settings.pug @@ -127,7 +127,7 @@ block content h3 #{translate("change_password")} p | To change your password, - | please go to #[a(href=settings.overleaf.host+'/users/edit') Overleaf v1 settings] + | please go to #[a(href='/sign_in_to_v1?return_to=%2Fusers%2Fedit%23details') Overleaf v1 settings] | !{moduleIncludes("userSettings", locals)} @@ -193,7 +193,7 @@ block content if settings.createV1AccountOnLogin && settings.overleaf p strong - | This will also delete your user account on #[a(href=settings.overleaf.host target="_blank") Overleaf v1]. + | This will also delete your user account on #[a(href='/sign_in_to_v1?return_to=%2Fdash%3Fprefer-v1-dash%3D1' target="_blank") Overleaf v1]. | If you want to remove your projects from Overleaf v1, you must do this before you | delete your account by going to your My Projects page in Overleaf v1, moving your | projects to the Trash, and then from there either ‘leaving’ or ‘purging’ them, as appropriate. @@ -244,7 +244,7 @@ block content div.alert.alert-info | If you can't remember your password, or if you are using Single-Sign-On with another provider | to sign in (such as Twitter or Google), please - | #[a(href=settings.overleaf.host+'/users/password/new', target='_blank') reset your password], + | #[a(href='/sign_in_to_v1?return_to=%2Fusers%2Fpassword%2Fnew', target='_blank') reset your password], | and try again. .modal-footer button.btn.btn-default(