mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-08 19:40:48 +00:00
Merge pull request #2796 from overleaf/cmg-covid-top-notification
Top notification for Coronavirus upgrade offer GitOrigin-RevId: bdad53ebbcbec93034df5c652fe82d309f73f22d
This commit is contained in:
parent
6d078c4528
commit
f0bdd34823
2 changed files with 33 additions and 0 deletions
services/web
|
@ -181,3 +181,23 @@ include ../../_mixins/saml
|
|||
i.fa.fa-spinner.fa-spin(aria-hidden="true")
|
||||
|
|
||||
| #{translate('resending_confirmation_email')}…
|
||||
- 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 In response to ongoing developments around #COVID19, we're providing free temporary upgrades to our Professional Account.
|
||||
span
|
||||
a(href="https://overleaf.com/blog/helping-you-collaborate-on-overleaf-during-the-coronavirus-pandemic") More info.
|
||||
.notification-action
|
||||
a.pull-right.btn.btn-sm.btn-info(href="https://forms.gle/zWrVdF3GdoWovjd66") Upgrade
|
||||
.notification-close
|
||||
button(ng-click="dismiss()").close.pull-right
|
||||
span(aria-hidden="true") ×
|
||||
span.sr-only #{translate("close")}
|
||||
|
|
|
@ -18,6 +18,19 @@ define(['../../base'], function(App) {
|
|||
}).then(() => (notification.hide = true))
|
||||
})
|
||||
|
||||
App.controller('DismissableNotificationsController', function(
|
||||
$scope,
|
||||
localStorage
|
||||
) {
|
||||
$scope.shouldShowNotification =
|
||||
localStorage('dismissed-covid-19-notification') !== true
|
||||
|
||||
$scope.dismiss = () => {
|
||||
localStorage('dismissed-covid-19-notification', true)
|
||||
$scope.shouldShowNotification = false
|
||||
}
|
||||
})
|
||||
|
||||
App.controller('ProjectInviteNotificationController', function(
|
||||
$scope,
|
||||
$http
|
||||
|
|
Loading…
Add table
Reference in a new issue