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

Merge pull request #6558 from overleaf/tm-wfh2021-ended

Remove notifications for WFH2021 offer, revert side-bar to old Upgrade notice

GitOrigin-RevId: d5f0bb34b40605a335d48b1d2db54df8fab9224a
Thomas 4 лет назад
Родитель
Сommit
bbb97bed26

+ 0 - 19
services/web/app/views/project/list/notifications.pug

@@ -251,22 +251,3 @@ include ../../_mixins/reconfirm_affiliation
 			ng-if="userEmail.samlIdentifier && userEmail.samlIdentifier.providerId === reconfirmedViaSAML"
 		)
 			+reconfirmedAffiliationNotification()
-
-	- var hasPaidAffiliation = userAffiliations.some(affiliation => affiliation.licence && affiliation.licence !== 'free')
-	if settings.enableSubscriptions && !hasSubscription && !hasPaidAffiliation
-		ul.list-unstyled(
-			ng-controller="DismissableNotificationsController",
-			ng-cloak
-		)
-			li.notification-entry(
-				ng-if="shouldShowNotification && projects.length > 0"
-			)
-				.alert.alert-info
-					.notification-body
-						span Ending Soon: Our WFH2021 discounts are available until January 31st 2022.
-					.notification-action
-						a.pull-right.btn.btn-sm.btn-info(href="https://www.overleaf.com/events/wfh2021" event-tracking="Event-Pages" event-tracking-trigger="click" event-tracking-ga="WFH-Offer-Click" event-tracking-label="Dash-Banner") Upgrade
-					.notification-close
-						button(ng-click="dismiss()").close.pull-right
-							span(aria-hidden="true") ×
-							span.sr-only #{translate("close")}

+ 5 - 10
services/web/app/views/project/list/side-bar.pug

@@ -134,16 +134,11 @@ if (isOverleaf)
 						href="/user/settings"
 					) Add Affiliation
 
-		//- .row-spaced(ng-if="hasProjects && userHasNoSubscription && !userOnPayingUniversity", ng-cloak).text-centered
-		//- 	hr
-		//- 	p.small #{translate("on_free_sl")}
-		//- 	p
-		//- 		a(href="/user/subscription/plans" ng-click="upgradeSubscription()").btn.btn-primary #{translate("upgrade")}
-		//- 	p.small.text-centered
-		//- 		| #{translate("or_unlock_features_bonus")} 
-		//- 		a(href="/user/bonus" ng-click="share()") #{translate("sharing_sl")}.
 		.row-spaced(ng-if="hasProjects && userHasNoSubscription && !userOnPayingUniversity", ng-cloak).text-centered
 			hr
-			p.small Ending Soon: Our WFH2021 discounts are available until January 31st 2022.
+			p.small #{translate("on_free_sl")}
 			p
-				a(href="https://www.overleaf.com/events/wfh2021" event-tracking="Event-Pages" event-tracking-trigger="click" event-tracking-ga="WFH-Offer-Click" event-tracking-label="Dash-Sidebar").btn.btn-primary Upgrade
+				a(href="/user/subscription/plans" ng-click="upgradeSubscription()").btn.btn-primary #{translate("upgrade")}
+			p.small.text-centered
+				| #{translate("or_unlock_features_bonus")} 
+				a(href="/user/bonus" ng-click="share()") #{translate("sharing_sl")}.

+ 0 - 9
services/web/app/views/subscriptions/plans-marketing.pug

@@ -14,15 +14,6 @@ block append meta
 
 block content
 	main.content.content-alt#main-content
-		.container
-			.user-notifications
-				ul.list-unstyled(ng-cloak)
-					li.notification-entry
-						.alert.alert-info
-							.notification-body
-								span Ending Soon: Our WFH2021 discounts are available until January 31st 2022.
-							.notification-action
-								a.btn.btn-sm.btn-info(href="https://www.overleaf.com/events/wfh2021" event-tracking="Event-Pages" event-tracking-trigger="click" event-tracking-ga="WFH-Offer-Click" event-tracking-label="Plans-Banner") Upgrade
 		.content-page
 			.plans
 				.container(ng-cloak)

+ 0 - 13
services/web/frontend/js/main/project-list/notifications-controller.js

@@ -23,19 +23,6 @@ App.controller('NotificationsController', function ($scope, $http) {
   }
 })
 
-App.controller(
-  'DismissableNotificationsController',
-  function ($scope, localStorage) {
-    $scope.shouldShowNotification =
-      localStorage('dismissed-covid-19-notification-extended') !== true
-
-    $scope.dismiss = () => {
-      localStorage('dismissed-covid-19-notification-extended', true)
-      $scope.shouldShowNotification = false
-    }
-  }
-)
-
 App.controller('ProjectInviteNotificationController', function ($scope, $http) {
   // Shortcuts for translation keys
   $scope.projectName = $scope.notification.messageOpts.projectName