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

Use hasFeature for message about returning to v1/SL

James Allen 8 лет назад
Родитель
Сommit
de7f13aea6

+ 2 - 0
services/web/app/coffee/infrastructure/Features.coffee

@@ -12,5 +12,7 @@ module.exports = Features =
 				return not Features.externalAuthenticationSystemUsed()
 			when 'github-sync'
 				return Settings.enableGithubSync
+			when 'v1-return-message'
+				return Settings.accountMerge? and Settings.overleaf?
 			else
 				throw new Error("unknown feature: #{feature}")

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

@@ -64,7 +64,7 @@ block content
 					aside.project-list-sidebar.col-md-2.col-xs-3
 						include ./list/side-bar
 
-					if settings.accountMerge && settings.overleaf
+					if hasFeature('v1-return-message')
 						.project-list-sidebar-v2-pane.col-md-2.col-xs-3
 							span Welcome to the Overleaf v2 alpha! #[a(href="https://www.overleaf.com/help/342-overleaf-v2-faq") Find out more].
 							if userIsFromOLv1(user)