bloat/templates/notification.tmpl

129 lines
5.0 KiB
Cheetah
Raw Normal View History

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