mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-22 02:04:31 +00:00
Allow v2 notification banner to be dismissed
This commit is contained in:
parent
3e65d6ff59
commit
d8ed0e5277
5 changed files with 25 additions and 13 deletions
|
@ -1,10 +1,20 @@
|
|||
if (user.awareOfV2 && !settings.overleaf)
|
||||
.alert.alert-info.small
|
||||
a.pull-right.btn.btn-info.btn-sm(href="/user/login_to_ol_v2" style="margin-left: 12px") Click here to try Overleaf v2
|
||||
p
|
||||
| ShareLaTeX is joining Overleaf and will become <em>Overleaf v2</em> in late 2018 (<a href="https://www.overleaf.com/help/342-overleaf-v2-faq">read more</a>).
|
||||
<br/>
|
||||
| We’re beta testing Overleaf v2 now and you can try it out with your ShareLaTeX account.
|
||||
.userNotifications
|
||||
ul.list-unstyled.notifications-list(ng-controller="OverleafNotificationController", ng-show="visible")
|
||||
li.notification_entry
|
||||
.row
|
||||
.col-xs-12
|
||||
.alert.alert-info
|
||||
.notification_inner
|
||||
.notification_body
|
||||
a.btn.btn-info.btn-sm.pull-right(href="/user/login_to_ol_v2") Try Overleaf v2
|
||||
| ShareLaTeX is joining Overleaf and will become <em>Overleaf v2</em> in late 2018 (<a href="https://www.overleaf.com/help/342-overleaf-v2-faq">read more</a>).
|
||||
<br/>
|
||||
| We’re beta testing Overleaf v2 now and you can try it out with your ShareLaTeX account.
|
||||
.notification_close
|
||||
button(ng-click="dismiss()").close.pull-right
|
||||
span(aria-hidden="true") ×
|
||||
span.sr-only #{translate("close")}
|
||||
|
||||
span(ng-controller="NotificationsController").userNotifications
|
||||
ul.list-unstyled.notifications-list(
|
||||
|
|
|
@ -29,4 +29,3 @@ define [
|
|||
|
||||
$scope.showAll = ->
|
||||
$scope.ui.newItems = 0
|
||||
|
||||
|
|
|
@ -35,4 +35,11 @@ define [
|
|||
$scope.notification.accepted = true
|
||||
.catch () ->
|
||||
$scope.notification.inflight = false
|
||||
$scope.notification.error = true
|
||||
$scope.notification.error = true
|
||||
|
||||
App.controller "OverleafNotificationController", ($scope, localStorage) ->
|
||||
$scope.visible = !localStorage('overleaf_notification_hidden_at')
|
||||
|
||||
$scope.dismiss = () ->
|
||||
$scope.visible = false
|
||||
localStorage('overleaf_notification_hidden_at', Date.now())
|
||||
|
|
|
@ -130,10 +130,6 @@
|
|||
padding-right: 15px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.notification_close {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
line-height: 1;
|
||||
color: @close-color;
|
||||
text-shadow: @close-text-shadow;
|
||||
.opacity(.2);
|
||||
.opacity(.4);
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
|
|
Loading…
Reference in a new issue