bloat/templates/notification.tmpl

83 lines
3.0 KiB
Cheetah
Raw Normal View History

2020-01-14 16:57:16 +00:00
{{with .Data}}
2020-02-18 22:15:37 +00:00
{{template "header.tmpl" (WithContext .CommonData $.Ctx)}}
<div class="notification-title-container">
2020-10-25 11:36:00 +00:00
<span class="page-title">
2020-02-18 22:15:37 +00:00
Notifications
2020-09-02 17:50:48 +00:00
{{if and (not $.Ctx.AntiDopamineMode) (gt .UnreadCount 0)}}
({{.UnreadCount }})
{{end}}
2020-10-25 11:36:00 +00:00
</span>
2020-10-19 06:06:41 +00:00
<a class="notification-refresh" href="/notifications" target="_self" accesskey="R" title="Refresh (R)">refresh</a>
2020-02-18 22:15:37 +00:00
{{if .ReadID}}
2020-10-25 11:36:00 +00:00
<form class="notification-read" action="/notifications/read?max_id={{.ReadID}}" method="post" target="_self">
2020-02-18 22:15:37 +00:00
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
2020-10-19 06:06:41 +00:00
<input type="submit" value="read" class="btn-link" accesskey="C" title="Clear unread notifications (C)">
2020-02-18 22:15:37 +00:00
</form>
{{end}}
</div>
2019-12-15 17:37:58 +00:00
{{range .Notifications}}
2020-10-25 11:36:00 +00:00
<div class="status-container-container {{if .Pleroma}}{{if not .Pleroma.IsSeen}}unread{{end}}{{end}}">
2019-12-15 17:37:58 +00:00
{{if eq .Type "follow"}}
<div class="notification-follow-container">
2019-12-22 03:43:25 +00:00
<div class="status-profile-img-container">
2020-02-23 13:26:39 +00:00
<a class="img-link" href="/user/{{.Account.ID}}">
2020-09-22 15:42:16 +00:00
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" title="@{{.Account.Acct}}" alt="profile-avatar" height="48" />
2019-12-22 03:43:25 +00:00
</a>
</div>
<div class="notification-follow">
2020-01-01 09:40:47 +00:00
<div class="notification-info-text">
2019-12-21 05:48:06 +00:00
<span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span>
2020-10-25 11:36:00 +00:00
<span class="notification-text"> followed you -
<time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{FormatTimeRFC822 .CreatedAt}}">{{TimeSince .CreatedAt}}</time>
2020-01-29 18:14:27 +00:00
</span>
2019-12-15 17:37:58 +00:00
</div>
2020-09-22 15:42:16 +00:00
<div>
<a href="/user/{{.Account.ID}}"> <span class="status-uname"> @{{.Account.Acct}} </span> </a>
2019-12-15 17:37:58 +00:00
</div>
</div>
</div>
{{else if eq .Type "mention"}}
2020-01-14 16:57:16 +00:00
{{template "status" (WithContext .Status $.Ctx)}}
2019-12-15 17:37:58 +00:00
{{else if eq .Type "reblog"}}
2020-01-29 18:14:27 +00:00
<div class="retweet-info">
2020-02-23 13:26:39 +00:00
<a class="img-link" href="/user/{{.Account.ID}}">
2020-09-22 15:42:16 +00:00
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" title="@{{.Account.Acct}}" alt="avatar" height="48" />
</a>
<a href="/user/{{.Account.ID}}">
<span class="status-uname"> @{{.Account.Acct}} </span>
2020-01-29 18:14:27 +00:00
</a>
2020-10-25 11:36:00 +00:00
<span class="notification-text"> retweeted your post -
<time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{FormatTimeRFC822 .CreatedAt}}">{{TimeSince .CreatedAt}}</time>
2020-01-29 18:14:27 +00:00
</span>
2019-12-15 17:37:58 +00:00
</div>
2020-01-29 18:14:27 +00:00
{{template "status" (WithContext .Status $.Ctx)}}
2019-12-15 17:37:58 +00:00
{{else if eq .Type "favourite"}}
2020-01-29 18:14:27 +00:00
<div class="retweet-info">
2020-02-23 13:26:39 +00:00
<a class="img-link" href="/user/{{.Account.ID}}">
2020-09-22 15:42:16 +00:00
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" title="@{{.Account.Acct}}" alt="avatar" height="48" />
</a>
<a href="/user/{{.Account.ID}}">
<span class="status-uname"> @{{.Account.Acct}} </span>
2020-01-29 18:14:27 +00:00
</a>
2020-10-25 11:36:00 +00:00
<span class="notification-text"> liked your post -
<time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{FormatTimeRFC822 .CreatedAt}}">{{TimeSince .CreatedAt}}</time>
2020-01-29 18:14:27 +00:00
</span>
2019-12-15 17:37:58 +00:00
</div>
2020-01-29 18:14:27 +00:00
{{template "status" (WithContext .Status $.Ctx)}}
2019-12-15 17:37:58 +00:00
{{end}}
</div>
{{end}}
<div class="pagination">
2020-01-28 17:51:00 +00:00
{{if .NextLink}}
2020-09-22 16:22:58 +00:00
<a href="{{.NextLink}}" target="_self">[next]</a>
2019-12-15 17:37:58 +00:00
{{end}}
</div>
2020-01-14 16:57:16 +00:00
2019-12-15 17:37:58 +00:00
{{template "footer.tmpl"}}
2020-01-14 16:57:16 +00:00
{{end}}