From 25829d2d0e379c323b8f2ae6e7c2aad7548f0a30 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sat, 18 Jun 2022 13:57:30 -0700 Subject: sticky and lock implemented --- views/partials/posts.html | 8 ++++++-- views/partials/top.html | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'views/partials') diff --git a/views/partials/posts.html b/views/partials/posts.html index 6fe2d2d..676ca81 100644 --- a/views/partials/posts.html +++ b/views/partials/posts.html @@ -17,6 +17,8 @@ [Ban Media] [Delete Attachment] [Mark Sensitive] + [Sticky] + [Lock] {{ end }} File: {{ shortImg (index .Attachment 0).Name }} ({{ convertSize (index .Attachment 0).Size }}) @@ -48,7 +50,7 @@ {{ .Name }} {{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }} {{ .TripCode }} - {{ .Published | timeToReadableLong }} No. {{ shortURL $board.Actor.Outbox .Id }} {{ if ne .Type "Tombstone" }}[Report]{{ end }} + {{ .Published | timeToReadableLong }} No. {{ shortURL $board.Actor.Outbox .Id }} {{ if .Sticky }}{{ end }} {{ if .Locked }} {{ end }}{{ if ne .Type "Tombstone" }}[Report]{{ end }}

{{ parseContent $board.Actor $opId .Content $thread .Id $page.PostType }}

{{ if .Replies }} {{ $replies := .Replies }} @@ -70,6 +72,8 @@ [Ban Media] [Delete Attachment] [Mark Sensitive] + [Sticky] + [Lock] {{ end }} File {{ shortImg (index .Attachment 0).Name }} ({{ convertSize (index .Attachment 0).Size }}) @@ -103,7 +107,7 @@ {{ .Name }} {{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }} {{ .TripCode }} - {{ .Published | timeToReadableLong }} No. {{ shortURL $board.Actor.Outbox .Id }} {{ if ne .Type "Tombstone" }}[Report]{{ end }} + {{ .Published | timeToReadableLong }} No. {{ shortURL $board.Actor.Outbox .Id }} {{ if ne .Type "Tombstone" }}[Report]{{ end }} {{ $parentId := .Id }} {{ if .Replies.OrderedItems }} {{ range .Replies.OrderedItems }} diff --git a/views/partials/top.html b/views/partials/top.html index 73da840..2a5c16b 100644 --- a/views/partials/top.html +++ b/views/partials/top.html @@ -4,8 +4,10 @@ {{ $len := len .Posts }} {{ if eq $len 0 }} {{ if eq .PostType "reply" }} + {{ if eq (index .Posts 0).Locked false }} - {{ else if eq .PostType "new" }} + {{ end }} + {{ else if and (eq .PostType "new") }} {{ end }}
@@ -60,7 +62,9 @@ {{ if eq (index .Posts 0).Type "Note" }} {{ if .Board.InReplyTo }} + {{ if eq (index .Posts 0).Locked false }} + {{ end }} {{ else }} {{ end }} -- cgit v1.2.3