From 6ff0d3355c487dbdc13403ec32f5e587c7f93073 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 14 Apr 2025 11:18:18 +0200 Subject: [PATCH] [feature/frontend] Add visibility icon for posts (#4005) --- web/source/css/status.css | 4 ++++ web/template/status_info.tmpl | 29 ++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/web/source/css/status.css b/web/source/css/status.css index 6f2c458f4..91665cd45 100644 --- a/web/source/css/status.css +++ b/web/source/css/status.css @@ -275,6 +275,10 @@ gap: 0.4rem; } + .stats-item.published-at { + text-decoration: underline; + } + .stats-item:not(.published-at):not(.edited-at) { z-index: 1; user-select: none; diff --git a/web/template/status_info.tmpl b/web/template/status_info.tmpl index 194a799f5..5d26811d7 100644 --- a/web/template/status_info.tmpl +++ b/web/template/status_info.tmpl @@ -17,9 +17,36 @@ // along with this program. If not, see . */ -}} +{{- define "visibility_icon" -}} + {{- if eq .Visibility "public" -}} + globe + {{- else if eq .Visibility "unlisted" -}} + unlock + {{- else -}} + question + {{- end -}} +{{- end -}} + +{{- define "visibility_title" -}} + {{- if eq .Visibility "public" -}} + Public + {{- else if eq .Visibility "unlisted" -}} + Unlisted + {{- else -}} + Unknown + {{- end -}} +{{- end -}} + {{- with . }}
+
+
Visibility
+
+ + {{- template "visibility_title" . -}} +
+
Published
@@ -30,7 +57,7 @@
Edited
- (edited ) + edited
{{ end }}