From c634f51eee3b12cf13149d809379b038b57d463d Mon Sep 17 00:00:00 2001 From: Alexandre Bourdin Date: Thu, 10 Jun 2021 10:04:21 +0200 Subject: [PATCH] Merge pull request #4116 from overleaf/ab-paywall-prompt-events Add paywall prompt events GitOrigin-RevId: 6b1b3b384590f14828f37210b2e14047e2ee33d6 --- .../app/views/project/editor/review-panel.pug | 4 +- .../components/add-collaborators-upgrade.js | 4 +- .../js/ide/history/HistoryV2Manager.js | 2 + .../js/ide/pdf/controllers/PdfController.js | 1 + .../controllers/ReviewPanelController.js | 1 + .../js/infrastructure/event-tracking.js | 30 +++++++++++-- .../js/infrastructure/session-storage.js | 45 +++++++++++++++++++ .../js/main/account-upgrade-angular.js | 9 ++-- .../web/frontend/js/main/account-upgrade.js | 16 ++++--- .../web/frontend/js/modules/sessionStorage.js | 32 ++++++------- .../components/start-free-trial-button.js | 16 +++---- .../components/share-project-modal.test.js | 2 + .../ide/history/HistoryV2ManagerTests.js | 6 ++- 13 files changed, 125 insertions(+), 43 deletions(-) create mode 100644 services/web/frontend/js/infrastructure/session-storage.js diff --git a/services/web/app/views/project/editor/review-panel.pug b/services/web/app/views/project/editor/review-panel.pug index 2db347f6a2..f6ac53f4cb 100644 --- a/services/web/app/views/project/editor/review-panel.pug +++ b/services/web/app/views/project/editor/review-panel.pug @@ -583,13 +583,13 @@ script(type="text/ng-template", id="trackChangesUpgradeModalTemplate") div(ng-show="user.allowedFreeTrial" ng-controller="FreeTrialModalController") a.btn.btn-success( href - ng-click="startFreeTrial('real-time-track-changes')" + ng-click="startFreeTrial('track-changes')" ng-show="project.owner._id == user.id" ) #{translate("try_it_for_free")} div(ng-show="!user.allowedFreeTrial" ng-controller="UpgradeModalController") a.btn.btn-success( href - ng-click="upgradePlan('projectMembers')" + ng-click="upgradePlan('project-sharing')" ng-show="project.owner._id == user.id" ) #{translate("upgrade")} p(ng-show="project.owner._id != user.id"): strong #{translate("please_ask_the_project_owner_to_upgrade_to_track_changes")} diff --git a/services/web/frontend/js/features/share-project-modal/components/add-collaborators-upgrade.js b/services/web/frontend/js/features/share-project-modal/components/add-collaborators-upgrade.js index 5ea142854b..08c35f6b3d 100644 --- a/services/web/frontend/js/features/share-project-modal/components/add-collaborators-upgrade.js +++ b/services/web/frontend/js/features/share-project-modal/components/add-collaborators-upgrade.js @@ -64,13 +64,13 @@ export default function AddCollaboratorsUpgrade() { ) : (