web: fix unread count, use white-space pre
This commit is contained in:
parent
d020599e09
commit
4baf9e4a22
|
@ -93,8 +93,8 @@ class PolicyProcess(Process):
|
|||
)
|
||||
# Create policy exception event
|
||||
self.create_event(EventAction.POLICY_EXCEPTION, message=error_string)
|
||||
LOGGER.debug("P_ENG(proc): error", exc=exc)
|
||||
policy_result = PolicyResult(False, str(exc))
|
||||
LOGGER.debug("P_ENG(proc): error", exc=src_exc)
|
||||
policy_result = PolicyResult(False, str(src_exc))
|
||||
policy_result.source_policy = self.binding.policy
|
||||
# Invert result if policy.negate is set
|
||||
if self.binding.negate:
|
||||
|
|
|
@ -22,6 +22,9 @@ export class NotificationDrawer extends LitElement {
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.pf-c-notification-drawer__list-item-description {
|
||||
white-space: pre;
|
||||
}
|
||||
`
|
||||
);
|
||||
}
|
||||
|
@ -29,7 +32,7 @@ export class NotificationDrawer extends LitElement {
|
|||
firstUpdated(): void {
|
||||
Notification.list().then(r => {
|
||||
this.notifications = r;
|
||||
this.unread = r.results.filter((n) => n.seen).length;
|
||||
this.unread = r.results.filter((n) => !n.seen).length;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -60,12 +63,8 @@ export class NotificationDrawer extends LitElement {
|
|||
${item.event?.action}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="pf-c-notification-drawer__list-item-description">
|
||||
${item.body}
|
||||
</div>
|
||||
<div class="pf-c-notification-drawer__list-item-timestamp">
|
||||
${age}
|
||||
</div>
|
||||
<p class="pf-c-notification-drawer__list-item-description">${item.body}</p>
|
||||
<small class="pf-c-notification-drawer__list-item-timestamp">${age}</small>
|
||||
</li>`;
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue