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

change links to v1 to sign user in first

Tim Alby 8 лет назад
Родитель
Сommit
2e4d3d7aab

+ 1 - 1
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.
 										| To tag or rename your v1 projects, please go back to Overleaf v1.
 									div(ng-show="visible")
 									div(ng-show="visible")
 										a.project-list-sidebar-v1-link(
 										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
 										) Go back to v1
 								if userIsFromSL(user)
 								if userIsFromSL(user)
 									div(ng-show="visible")
 									div(ng-show="visible")

+ 1 - 1
services/web/app/views/project/list/modals.pug

@@ -356,7 +356,7 @@ script(type="text/ng-template", id="v1ImportModalTemplate")
 			form-messages(for="v1ImportForm")
 			form-messages(for="v1ImportForm")
 			if settings.overleaf && settings.overleaf.host
 			if settings.overleaf && settings.overleaf.host
 				a.btn.btn-primary.v1-import-btn(
 				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}"
 					ng-class="{disabled: v1ImportForm.inflight || v1ImportForm.response.success}"
 				) No thanks, open in v1
 				) No thanks, open in v1
 			input.btn.btn-primary.v1-import-btn(
 			input.btn.btn-primary.v1-import-btn(

+ 1 - 1
services/web/app/views/project/list/v1-item.pug

@@ -13,7 +13,7 @@
 				ng-show="project.accessLevel == 'owner'"
 				ng-show="project.accessLevel == 'owner'"
 			) {{project.name}}
 			) {{project.name}}
 			a.projectName(
 			a.projectName(
-				href=settings.overleaf.host + "/{{project.id}}"
+				href='/sign_in_to_v1?return_to=%2F{{project.id}}'
 				target="_blank"
 				target="_blank"
 				ng-hide="project.accessLevel == 'owner'"
 				ng-hide="project.accessLevel == 'owner'"
 			) {{project.name}}
 			) {{project.name}}

+ 2 - 2
services/web/app/views/subscriptions/dashboard.pug

@@ -122,7 +122,7 @@ block content
 							p
 							p
 								| You are subscribed to Overleaf through Overleaf v1
 								| You are subscribed to Overleaf through Overleaf v1
 							p
 							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
 							hr
 
 
 						if settings.overleaf && v1Subscriptions && v1Subscriptions.teams && v1Subscriptions.teams.length > 0
 						if settings.overleaf && v1Subscriptions && v1Subscriptions.teams && v1Subscriptions.teams.length > 0
@@ -130,7 +130,7 @@ block content
 								p
 								p
 									| You are a member of the Overleaf v1 team: <strong>#{team.name}</strong>
 									| You are a member of the Overleaf v1 team: <strong>#{team.name}</strong>
 							p
 							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
 							hr
 
 
 					.card(ng-if="view == 'cancelation'")
 					.card(ng-if="view == 'cancelation'")

+ 3 - 3
services/web/app/views/user/settings.pug

@@ -127,7 +127,7 @@ block content
 											h3 #{translate("change_password")}
 											h3 #{translate("change_password")}
 											p
 											p
 												| To change your password,
 												| 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)}
 							| !{moduleIncludes("userSettings", locals)}
@@ -193,7 +193,7 @@ block content
 			if settings.createV1AccountOnLogin && settings.overleaf
 			if settings.createV1AccountOnLogin && settings.overleaf
 				p
 				p
 					strong
 					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
 						| 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
 						| 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.
 						| 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
 					div.alert.alert-info
 						| If you can't remember your password, or if you are using Single-Sign-On with another provider
 						| 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
 						| 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.
 						| and try again.
 		.modal-footer
 		.modal-footer
 			button.btn.btn-default(
 			button.btn.btn-default(