commit fecf6d883a08834972d79af9b47ce8fac9b9fd1b
parent 000b7213de62f662de416f7df29a8c3206c70f5d
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Sat, 28 Jan 2023 12:26:52 -0800
move code
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/pkg/web/public/views/pages/chat-messages.gohtml b/pkg/web/public/views/pages/chat-messages.gohtml
@@ -189,6 +189,12 @@
{{ $baseTopBarURL := (print "/api/v1/chat/top-bar/" $.Data.RoomName) }}
{{ $readMarkerRendered := false }}
{{ range $idx, $e := .Data.Messages }}
+ {{ $tagType := "tag" }}
+ {{- if and $.AuthUser.CanSeeHB (or .IsHellbanned .User.IsHellbanned) -}}
+ {{ $tagType = "htag" }}
+ {{- else if and $.AuthUser.IsModerator .Moderators -}}
+ {{ $tagType = "mtag" }}
+ {{- end -}}
{{- if (.UserCanSee $.AuthUser) -}}
<div class="msg
{{- if and (or .User.IsHellbanned .IsHellbanned) $.AuthUser.DisplayHellbanned }} hb-row
@@ -261,12 +267,6 @@
<a href="{{ $baseTopBarURL }}?quote={{ .UUID }}{{ $.Data.TopBarQueryParams | safeURL }}" target="iframe1" class="date date-link" title="{{ .CreatedAt.Format "01-02 15:04:05" }}">{{ .CreatedAt.Format $.Data.DateFormat }}</a>
{{- end -}}
<a href="/u/{{ .GetProfile $.AuthUser }}" target="_blank" class="f-def-clr">-</a>
- {{ $tagType := "tag" }}
- {{- if and $.AuthUser.CanSeeHB (or .IsHellbanned .User.IsHellbanned) -}}
- {{ $tagType = "htag" }}
- {{- else if and $.AuthUser.IsModerator .Moderators -}}
- {{ $tagType = "mtag" }}
- {{- end -}}
{{- if .ToUserID -}}
[
{{- if eq .User.ID $.AuthUser.ID -}}