From ddd33aad91bf1de88e1704cf1dfdebb05e5800b7 Mon Sep 17 00:00:00 2001
From: Noah Petherbridge
Date: Thu, 4 Apr 2024 22:24:35 -0700
Subject: [PATCH] Change Log Buttons
* Dark theme fixes to brighten notification colors on mobile
* Add change log buttons around various pages to easily look into the history
of an object in the database:
* User profile page ('about user' and user table history links)
* User friends page
* User/Site gallery page (history of all (user) photos)
* Admin insights page (comments, threads, and blocklist history)
* Admin certification page (history of a user's cert photos)
* Comment history buttons on forums and photos
---
web/static/css/dark-theme.css | 9 +++
web/templates/account/friends.html | 8 +++
web/templates/account/profile.html | 83 ++++++++++++++++----------
web/templates/account/search.html | 2 +-
web/templates/admin/certification.html | 7 +++
web/templates/admin/user_actions.html | 47 +++++++++++++--
web/templates/base.html | 7 +--
web/templates/forum/thread.html | 12 +++-
web/templates/photo/gallery.html | 10 ++++
web/templates/photo/permalink.html | 33 +++++++++-
10 files changed, 172 insertions(+), 46 deletions(-)
diff --git a/web/static/css/dark-theme.css b/web/static/css/dark-theme.css
index 17cae7d..907b951 100644
--- a/web/static/css/dark-theme.css
+++ b/web/static/css/dark-theme.css
@@ -23,8 +23,17 @@
.nonshy-navbar-notification-tag.is-warning {
background-color: rgb(248, 223, 98) !important;
+ color: rgb(26, 0, 5) !important;
}
+/* force lit-up notification buttons (on the mobile top nav, e.g. new Messages/Friends)
+ to show as a bright bulma is-warning style (.tag.is-warning) */
+.nonshy-navbar-notification {
+ background-color: rgb(248, 223, 98) !important;
+ color: rgb(26, 0, 5) !important;
+}
+
+
.has-text-dark {
/* note: this css file otherwise didn't override this, dark's always dark, brighten it! */
color: #b5b5b5 !important;
diff --git a/web/templates/account/friends.html b/web/templates/account/friends.html
index fe7b81f..1143ab8 100644
--- a/web/templates/account/friends.html
+++ b/web/templates/account/friends.html
@@ -69,6 +69,14 @@
Found {{.Pager.Total}} friend{{Pluralize64 .Pager.Total}}
(page {{.Pager.Page}} of {{.Pager.Pages}}).
+
+
+ {{if .CurrentUser.IsAdmin}}
+
+
+ Change Log
+
+ {{end}}
diff --git a/web/templates/account/profile.html b/web/templates/account/profile.html
index 7f95f2f..219951a 100644
--- a/web/templates/account/profile.html
+++ b/web/templates/account/profile.html
@@ -542,43 +542,60 @@
-
+
{{end}}
diff --git a/web/templates/account/search.html b/web/templates/account/search.html
index 52847db..0573c3e 100644
--- a/web/templates/account/search.html
+++ b/web/templates/account/search.html
@@ -259,7 +259,7 @@
{{if $Root.FriendMap.Get .ID}}
-
+
Friends
diff --git a/web/templates/admin/certification.html b/web/templates/admin/certification.html
index fd1b3a4..0c4caf7 100644
--- a/web/templates/admin/certification.html
+++ b/web/templates/admin/certification.html
@@ -158,6 +158,13 @@
+
+
+ Social Change Log
+
+
+ These links go into the admin Change Log viewer to show history of the user's
+ interactions with parts of the website. Also look for "Change Log" buttons scattered
+ around various pages (profile, gallery, certification photo view) for history
+ about the user's data tables.
+
+
+
+
Block Lists
@@ -76,6 +101,13 @@
(Users who {{.User.Username}} is blocking)
+
+
+
+ Change Log
+
+
+
{{range .BlocklistInsights.Blocks}}
-
@@ -92,6 +124,13 @@
(Users who block {{.User.Username}})
+
+
+
+ Change Log
+
+
+
{{range .BlocklistInsights.BlockedBy}}
-
diff --git a/web/templates/base.html b/web/templates/base.html
index 3c03cbc..62aca84 100644
--- a/web/templates/base.html
+++ b/web/templates/base.html
@@ -276,7 +276,7 @@
{{end}}
-
{{if gt .NavFriendRequests 0}}
@@ -284,8 +284,7 @@
{{end}}
-
-
+
{{if gt .NavUnreadMessages 0}}
{{FormatNumberShort .NavUnreadMessages}}
@@ -293,7 +292,7 @@
{{if gt .NavUnreadNotifications 0}}
-
+
{{FormatNumberShort .NavUnreadNotifications}}
diff --git a/web/templates/forum/thread.html b/web/templates/forum/thread.html
index 9373a65..3e62d6c 100644
--- a/web/templates/forum/thread.html
+++ b/web/templates/forum/thread.html
@@ -101,7 +101,7 @@
{{$Root := .}}
{{range $i, $c := .Comments}}
-
+
@@ -306,6 +306,16 @@
Link
+
+
+ {{if $Root.CurrentUser.IsAdmin}}
+
+ {{end}}
{{if $Root.CurrentUser.IsAdmin}}
diff --git a/web/templates/photo/gallery.html b/web/templates/photo/gallery.html
index eb6110b..cdd4018 100644
--- a/web/templates/photo/gallery.html
+++ b/web/templates/photo/gallery.html
@@ -767,6 +767,16 @@
{{SimplePager .Pager}}
+
+ {{if .CurrentUser.IsAdmin}}
+
+ {{end}}
+
{{if .InnerCircleInviteView}}
diff --git a/web/templates/photo/permalink.html b/web/templates/photo/permalink.html
index 08329dd..7df607c 100644
--- a/web/templates/photo/permalink.html
+++ b/web/templates/photo/permalink.html
@@ -98,9 +98,14 @@
{{end}}
+
+
+ Uploaded {{.Photo.CreatedAt.Format "Jan _2 2006 15:04:05"}}
+
+
{{if and (not .Photo.Explicit) (ne .Photo.UserID .CurrentUser.ID)}}
-