sync notification UI with backend changes

This commit is contained in:
Girish Ramakrishnan
2021-05-29 12:11:17 -07:00
parent 841c9bc261
commit 5aa6e18ea7
5 changed files with 38 additions and 68 deletions

View File

@@ -19,10 +19,11 @@
<div class="card notification-item" ng-repeat="notification in notifications.notifications">
<div class="row">
<div class="col-xs-12" ng-click="notification.isCollapsed = !notification.isCollapsed" ng-class="{ 'notification-details': notification.detailsShown }">
{{ notification.title }} <small class="text-muted" uib-tooltip="{{ notification.creationTime | prettyLongDate }}">{{ notification.creationTime | prettyDate }}</small>
<button class="btn btn-xs btn-default pull-right" ng-hide="notification.acknowledged" ng-click="notifications.ack(notification, $event)" uib-tooltip="{{ 'notifications.dismissTooltip' | tr }}"><i class="fa fa-times"></i></button>
<span ng-class="{'text-bold': !notification.acknowledged }">{{ notification.title }}</span> <small class="text-muted" uib-tooltip="{{ notification.creationTime | prettyLongDate }}">{{ notification.creationTime | prettyDate }}</small>
<!-- hidden for now since it seems overkill to have "unread" -->
<!-- <button class="btn btn-xs btn-default pull-right" ng-show="notification.acknowledged" ng-click="notifications.ack(notification, false, $event)" uib-tooltip="{{ 'notifications.dismissTooltip' | tr }}"><i class="fa fa-asterisk"></i></button> -->
<div uib-collapse="notification.isCollapsed" expanding="notificationExpanding(notification)">
<div uib-collapse="notification.isCollapsed" expanding="notifications.ack(notification, true)">
<br/>
<p ng-hide="notification.messageJson" ng-click="$event.stopPropagation();" style="cursor: auto; overflow: auto;" ng-bind-html="notification.message | markdown2html"></p>
<pre ng-show="notification.messageJson" ng-click="$event.stopPropagation();" style="cursor: auto">{{ notification.messageJson | json }}</pre>