2018-03-01 22:52:01 +01:00
|
|
|
component Notifications(notifications []*arn.Notification, viewUser *arn.User, user *arn.User)
|
2018-02-27 15:27:16 +01:00
|
|
|
h1 Notifications
|
|
|
|
|
2018-02-28 23:26:06 +01:00
|
|
|
.corner-buttons
|
2018-03-01 22:52:01 +01:00
|
|
|
if user.ID == viewUser.ID
|
|
|
|
button.action(data-action="markNotificationsAsSeen", data-trigger="click")
|
|
|
|
Icon("check")
|
|
|
|
span Mark all as seen
|
2018-02-28 23:26:06 +01:00
|
|
|
|
|
|
|
.notifications-container
|
|
|
|
.notifications
|
|
|
|
each notification in notifications
|
|
|
|
Notification(notification)
|
2018-02-27 15:27:16 +01:00
|
|
|
|
2018-03-01 23:18:29 +01:00
|
|
|
component AllNotifications(notifications []*arn.Notification)
|
|
|
|
h1 All notifications
|
|
|
|
|
|
|
|
.notifications-container
|
|
|
|
.notifications
|
|
|
|
each notification in notifications
|
|
|
|
Notification(notification)
|
|
|
|
|
|
|
|
.notification-user
|
2018-03-23 21:33:19 +01:00
|
|
|
a(href=notification.User().Link())= notification.User().Nick
|
2018-03-01 23:18:29 +01:00
|
|
|
|
2018-02-27 15:27:16 +01:00
|
|
|
component Notification(notification *arn.Notification)
|
2018-06-28 17:22:15 +09:00
|
|
|
a.notification(href=notification.Link, data-seen=notification.Seen, data-id=notification.ID)
|
2018-02-27 15:27:16 +01:00
|
|
|
.notification-icon
|
|
|
|
img.lazy(data-src=notification.Icon, alt=notification.Title)
|
|
|
|
|
|
|
|
.notification-info
|
2018-02-28 23:26:06 +01:00
|
|
|
h3.notification-title= notification.Title
|
2018-03-01 23:18:29 +01:00
|
|
|
|
2018-02-28 23:26:06 +01:00
|
|
|
.notification-footer
|
|
|
|
p.notification-text= notification.Message
|
2018-03-01 00:06:03 +01:00
|
|
|
.notification-date.utc-date(data-date=notification.Created)
|
|
|
|
|
|
|
|
if notification.Seen != ""
|
|
|
|
.notification-seen
|
|
|
|
RawIcon("check")
|