- paramètre "random" de l'affichage des propositions à True par défaut
- améliorations UX/UI mineures de la page de vote
This commit is contained in:
@@ -220,7 +220,7 @@ CREATE POLICY "Admins can manage settings" ON settings
|
||||
|
||||
-- Paramètres par défaut
|
||||
INSERT INTO settings (key, value, category, description) VALUES
|
||||
('randomize_propositions', 'false', 'display', 'Afficher les propositions dans un ordre aléatoire lors du vote');
|
||||
('randomize_propositions', 'true', 'display', 'Afficher les propositions dans un ordre aléatoire lors du vote');
|
||||
|
||||
-- ========================================
|
||||
-- FONCTIONS UTILITAIRES
|
||||
|
||||
@@ -286,7 +286,6 @@ export default function PublicVotePage() {
|
||||
<div className="bg-white rounded-lg shadow-sm border border-gray-200 p-6 mb-8">
|
||||
<div className="grid grid-cols-1 md:grid-cols-1 gap-6">
|
||||
<div>
|
||||
<h3 className="text-sm font-medium text-gray-500">Description</h3>
|
||||
<p className="mt-1 text-sm text-gray-900 whitespace-pre-wrap">{campaign?.description}</p>
|
||||
{isRandomOrder && (
|
||||
<div className="mt-3 p-2 bg-blue-50 border border-blue-200 rounded-md">
|
||||
@@ -312,7 +311,17 @@ export default function PublicVotePage() {
|
||||
) : (
|
||||
<div className="space-y-6">
|
||||
{propositions.map((proposition) => (
|
||||
<div key={proposition.id} className="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden">
|
||||
<div
|
||||
key={proposition.id}
|
||||
className={`rounded-lg shadow-sm border overflow-hidden transition-all duration-200 relative ${
|
||||
localVotes[proposition.id] && localVotes[proposition.id] > 0
|
||||
? 'border-indigo-400 shadow-lg bg-indigo-100'
|
||||
: 'bg-white border-gray-200'
|
||||
}`}
|
||||
>
|
||||
<div className="absolute -top-1 left-4 bg-white px-2 text-xs text-gray-500 font-medium z-10 border border-gray-200 rounded-t">
|
||||
Proposition
|
||||
</div>
|
||||
<div className="p-6">
|
||||
<div className="flex items-start justify-between">
|
||||
<div className="flex-1">
|
||||
|
||||
Reference in New Issue
Block a user