From 0b18a29521ec8cb46bf0de21a86ff2f5e7a9da9c Mon Sep 17 00:00:00 2001 From: pikachu0542 <112343747+pikachu0542@users.noreply.github.com> Date: Mon, 16 Feb 2026 11:16:31 -0500 Subject: [PATCH 1/4] Add feedback for why users cant vote (#74) * Added alert on results screen for when you already voted * Added banner alert telling user that they already voted * Tried to make the alert have vertically centered text * Fixed vertical centering (thanks noah) * Added alert for if user is inactive * Updated alert to account for inactive and gatekept, added alert for db error * Updated alert to account for inactive and gatekept, added alert for db error * Added sentence telling people to contact evals or opcomm for more info --- main.go | 1 + templates/result.tmpl | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/main.go b/main.go index a5f1a2a..19eb373 100644 --- a/main.go +++ b/main.go @@ -430,6 +430,7 @@ func main() { "IsOpen": poll.Open, "IsHidden": poll.Hidden, "CanModify": canModify, + "CanVote": canVote(claims.UserInfo, *poll, poll.AllowedUsers), "Username": claims.UserInfo.Username, "FullName": claims.UserInfo.FullName, "Gatekeep": poll.Gatekeep, diff --git a/templates/result.tmpl b/templates/result.tmpl index 9e81f54..5e5e1c2 100644 --- a/templates/result.tmpl +++ b/templates/result.tmpl @@ -9,6 +9,12 @@ media="screen" /> + +