From 41d9a3b57178a66cf4b7fd97772ba1b4a32851a0 Mon Sep 17 00:00:00 2001 From: Frank Tovar Date: Sat, 7 Feb 2026 13:53:06 +0100 Subject: [PATCH] Style blocked suggest-next button as red --- wwwroot/css/base.css | 11 +++++++++++ wwwroot/js/votes-ui.js | 11 ++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/wwwroot/css/base.css b/wwwroot/css/base.css index 66cb46b..4763521 100644 --- a/wwwroot/css/base.css +++ b/wwwroot/css/base.css @@ -84,6 +84,17 @@ button.ghost:hover { border-color: #b4d9f3; color: #1a3d64; } +button.needs-suggestion, +button.needs-suggestion:disabled { + background: #e0564f; + border-color: #c54740; + color: #fffaf3; + opacity: 1; +} +button.needs-suggestion:hover { + background: #c9473f; + border-color: #a83a35; +} .label { color: #6c5a42; diff --git a/wwwroot/js/votes-ui.js b/wwwroot/js/votes-ui.js index 6d404f2..61f9dc2 100644 --- a/wwwroot/js/votes-ui.js +++ b/wwwroot/js/votes-ui.js @@ -251,11 +251,12 @@ export function updatePhaseNav() { const suggestNext = $("nav-suggest-next"); if (suggestNext) { const hasSuggestions = (state.mySuggestions?.length ?? 0) > 0; - const canAdvance = phase !== "Suggest" || hasSuggestions; - suggestNext.disabled = !canAdvance; - suggestNext.textContent = canAdvance - ? t("nav.next") - : t("nav.addSuggestionFirst"); + const needsSuggestion = phase === "Suggest" && !hasSuggestions; + suggestNext.disabled = needsSuggestion; + suggestNext.classList.toggle("needs-suggestion", needsSuggestion); + suggestNext.textContent = needsSuggestion + ? t("nav.addSuggestionFirst") + : t("nav.next"); } const voteNext = $("nav-vote-next");