From b23dfb1e4e1954b519ee123cbfda6a7e33b2a83c Mon Sep 17 00:00:00 2001 From: Ella S Date: Fri, 6 Feb 2026 17:28:31 -0500 Subject: [PATCH 1/7] Added alert on results screen for when you already voted --- main.go | 1 + templates/result.tmpl | 19 +++++++++++++++++++ 2 files changed, 20 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..b9c7b7e 100644 --- a/templates/result.tmpl +++ b/templates/result.tmpl @@ -25,6 +25,15 @@
+ {{ if eq .CanVote 9 }} +
+ +
You have already voted in this poll.
+
+ {{ end }} +

{{ .ShortDescription }}

{{ if .LongDescription }}

{{ .LongDescription | MakeLinks }}

@@ -38,6 +47,16 @@

Results will be available once the poll closes

{{ else }} + {{/* Displays a message informing you that you are unable to vote, and common reasons why this might be the case */}} + + {{ if and (gt .CanVote 0) (ne .CanVote 9) }} +
+
+ You are not eligible to vote in this poll. This likely means that you are either not active + or did not meet the gatekeep requirements at the time the poll opened. +
+
+ {{ end }} {{/* Displays information about required quorum and number of voters */}}
Number of Eligible Voters: {{ len .EligibleVoters }}
From 71aca493fe12b3553976e7fd76081dd60b1ef84f Mon Sep 17 00:00:00 2001 From: pikachu0542 Date: Sun, 8 Feb 2026 20:10:05 -0500 Subject: [PATCH 2/7] Added banner alert telling user that they already voted --- templates/result.tmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/result.tmpl b/templates/result.tmpl index b9c7b7e..c9f5cb9 100644 --- a/templates/result.tmpl +++ b/templates/result.tmpl @@ -26,11 +26,11 @@
{{ if eq .CanVote 9 }} -
- -
You have already voted in this poll.
{{ end }} From 60c7ded6dc80cde6c46b82606c434ebbb16c40a9 Mon Sep 17 00:00:00 2001 From: pikachu0542 Date: Mon, 9 Feb 2026 14:40:39 -0500 Subject: [PATCH 3/7] Tried to make the alert have vertically centered text --- templates/result.tmpl | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/templates/result.tmpl b/templates/result.tmpl index c9f5cb9..342ff2e 100644 --- a/templates/result.tmpl +++ b/templates/result.tmpl @@ -26,7 +26,7 @@
{{ if eq .CanVote 9 }} -