diff --git a/Endpoints/StateEndpoints.cs b/Endpoints/StateEndpoints.cs index 843cb42..fb6b4dd 100644 --- a/Endpoints/StateEndpoints.cs +++ b/Endpoints/StateEndpoints.cs @@ -49,7 +49,6 @@ public static class StateEndpoints return Results.BadRequest(new { error = "Results are locked until the admin enables them." }); } - // Non-admins can only move forward player.CurrentPhase = next; await db.SaveChangesAsync(); return Results.Ok(new { player.CurrentPhase, appState.ResultsOpen }); @@ -90,8 +89,8 @@ public static class StateEndpoints private static Phase NextPhase(Phase current) => current switch { - Phase.Suggest => Phase.Reveal, - Phase.Reveal => Phase.Vote, + Phase.Suggest => Phase.Vote, + Phase.Reveal => Phase.Vote, // legacy safety Phase.Vote => Phase.Results, _ => Phase.Results }; @@ -99,8 +98,8 @@ public static class StateEndpoints private static Phase PrevPhase(Phase current) => current switch { Phase.Results => Phase.Vote, - Phase.Vote => Phase.Reveal, - Phase.Reveal => Phase.Suggest, + Phase.Vote => Phase.Suggest, + Phase.Reveal => Phase.Suggest, // legacy safety _ => Phase.Suggest }; } diff --git a/Endpoints/SuggestEndpoints.cs b/Endpoints/SuggestEndpoints.cs index fe4fa64..251dfed 100644 --- a/Endpoints/SuggestEndpoints.cs +++ b/Endpoints/SuggestEndpoints.cs @@ -187,8 +187,8 @@ public static class SuggestEndpoints var player = await EndpointHelpers.GetAuthenticatedPlayer(ctx, db); if (player is null) return Results.Unauthorized(); var phase = await EndpointHelpers.GetPhase(db, player.Id); - if (phase < Phase.Reveal) - return EndpointHelpers.PhaseMismatch(Phase.Reveal, phase); + if (phase < Phase.Vote) + return EndpointHelpers.PhaseMismatch(Phase.Vote, phase); var all = await db.Suggestions.AsNoTracking() .Include(s => s.Player) diff --git a/wwwroot/app.js b/wwwroot/app.js index a21dcef..c78967a 100644 --- a/wwwroot/app.js +++ b/wwwroot/app.js @@ -298,9 +298,7 @@ function bindNavButtons() { }); }); }); - makeForward("nav-reveal-next"); makeForward("nav-vote-next"); - makeBack("nav-reveal-prev"); makeBack("nav-vote-prev"); } diff --git a/wwwroot/css/components.css b/wwwroot/css/components.css index d4a5eb5..df131ea 100644 --- a/wwwroot/css/components.css +++ b/wwwroot/css/components.css @@ -17,6 +17,7 @@ grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 12px; margin-top: 12px; + margin-bottom: 12px; width: 100%; max-width: 1280px; margin-inline: auto; diff --git a/wwwroot/index.html b/wwwroot/index.html index e218f20..700435f 100644 --- a/wwwroot/index.html +++ b/wwwroot/index.html @@ -91,7 +91,7 @@
Only you can see your suggestions until Reveal.
+Only you can see your suggestions until voting starts.