diff --git a/components/CopyField.jsx b/components/CopyField.jsx index 8009343..bc37856 100644 --- a/components/CopyField.jsx +++ b/components/CopyField.jsx @@ -2,10 +2,16 @@ import React from "react"; import { Button } from "reactstrap"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { + faCopy, + faVoteYea, + faExclamationTriangle, + faExternalLinkAlt, +} from "@fortawesome/free-solid-svg-icons"; -const CopyField = props => { +const CopyField = (props) => { const ref = React.createRef(); - const handleClickOnField = event => { + const handleClickOnField = (event) => { event.target.focus(); event.target.select(); }; @@ -16,7 +22,7 @@ const CopyField = props => { document.execCommand("copy"); }; - const { t, value, iconCopy } = props; + const { t, value, iconCopy, iconOpen } = props; return (
@@ -30,6 +36,18 @@ const CopyField = props => { />
+ {/* + + */}
- {/*
- - - {t("Open")} - -
*/}
); }; +CopyField.defaultProps = { + iconCopy: faCopy, + iconOpen: faExternalLinkAlt, +}; + export default CopyField; diff --git a/package-lock.json b/package-lock.json index e5618e6..65247ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1959,7 +1959,7 @@ "browserify-rsa": "^4.0.1", "create-hash": "^1.2.0", "create-hmac": "^1.1.7", - "elliptic": "^6.5.4", + "elliptic": "^6.5.3", "inherits": "^2.0.4", "parse-asn1": "^5.1.5", "readable-stream": "^3.6.0", diff --git a/pages/new/confirm/[pid].jsx b/pages/new/confirm/[pid].jsx index 2413de9..daf7582 100644 --- a/pages/new/confirm/[pid].jsx +++ b/pages/new/confirm/[pid].jsx @@ -11,6 +11,7 @@ import { faVoteYea, faExclamationTriangle, faExternalLinkAlt, + faPollH, } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import CopyField from "@components/CopyField"; @@ -91,16 +92,16 @@ const ConfirmElection = ({ ); const participate = invitationOnly ? null : ( - - + <> + - + - {t("Participate now!")} + {t("resource.participateBtn")} - + ); return ( @@ -143,7 +144,17 @@ const ConfirmElection = ({ - {participate} + + {participate} + + + + + {t("resource.resultsBtn")} + + + + ); }; diff --git a/public/locales/de/resource.json b/public/locales/de/resource.json index 7580842..85b3ba2 100644 --- a/public/locales/de/resource.json +++ b/public/locales/de/resource.json @@ -49,7 +49,7 @@ "Copy": "Kopieren", "Here is the link for the results in real time:": " Hier ist der Link für die Ergebnisse in Echtzeit:", "Keep these links carefully": "Speichern Sie diesen Link an einem sicheren Ort.", - "Participate now!": "Machen Sie jetzt mit!", + "resource.participateBtn": "Machen Sie jetzt mit!", "t": "<0>Achtung : Sie werden zu einem späteren Zeitpunkt keine Möglichkeit haben, diese Links abzurufen, auch wir haben keinen Zugriff darauf. Sie können aber beispielsweise diese Seite in Ihrem Browser als Lesezeichen speichern.", "Simple and free: organize an election with Majority Judgment.": "Einfach und kostenlos: Organisation von Mehrheitswahlen.", "Start": "Start", diff --git a/public/locales/en/resource.json b/public/locales/en/resource.json index d1a5f65..2cf28b7 100644 --- a/public/locales/en/resource.json +++ b/public/locales/en/resource.json @@ -49,7 +49,8 @@ "Copy": "Copy", "Here is the link for the results in real time:": "Here is the link for real-time results:", "Keep these links carefully": "Keep these links carefully", - "Participate now!": "Participate now!", + "resource.participateBtn": "Participate now!", + "resource.resultsBtn": "Go to results", "t": "<0>Warning: you will have no possibility to recover these links, and we will not be able to share them with you. For safekeeping, you can bookmark them in your browser.", "resource.start": "Start", "resource.noAds": "No advertising or ad cookies", diff --git a/public/locales/es/resource.json b/public/locales/es/resource.json index 29be75d..7641bbc 100644 --- a/public/locales/es/resource.json +++ b/public/locales/es/resource.json @@ -49,7 +49,7 @@ "Copy": "Copiar", "Here is the link for the results in real time:": "En este enlace puedes revisar los resultados en tiempo real", "Keep these links carefully": "Guarda cuidadosamente estos enlaces", - "Participate now!": "¡Participa ahora!", + "resource.participateBtn": "¡Participa ahora!", "t": "<0>Advertencia: No tendrás otras opciones para recuperar los enlaces, y no podremos compartirlos contigo. Por ejemplo, puedes agregarlos a favoritos de tu buscador.", "Simple and free: organize an election with Majority Judgment.": "Simple y gratuito: organiza una elección con Juicio Mayoritario", "Start": "Comenzar", diff --git a/public/locales/fr/locale.json b/public/locales/fr/locale.json index 6665663..a035912 100644 --- a/public/locales/fr/locale.json +++ b/public/locales/fr/locale.json @@ -39,7 +39,7 @@ "Copy": "Copier", "Here is the link for the results in real time:": "Voici le lien pour afficher les résultats en temps réel :", "Keep these links carefully": "Gardez ces liens précieusement", - "Participate now!": "Participez maintenant !", + "resource.participateBtn": "Participez maintenant !", "t": "<0>Attention : vous n'aurez pas d'autres moyens pour récupérer ces liens par la suite, et nous ne serons pas capables de les partager avec vous. Vous pouvez, par exemple, ajouter ces liens à vos favoris dans votre navigateur.", "Simple and free: organize an election with Majority Judgment.": "Simple et grauit: organiser une élection avec le Jugement Majoritaire.", "Start": "Démarrer", diff --git a/public/locales/fr/resource.json b/public/locales/fr/resource.json index f0aa145..de4564d 100644 --- a/public/locales/fr/resource.json +++ b/public/locales/fr/resource.json @@ -26,9 +26,9 @@ "resource.advancedOptions": "Options avancées", "Starting date": "Date de début", "Ending date": "Date de fin ", - "Defined period" : "Période définie", - "Unlimited" : "Illimitée", - "Voting time" : "Durée du vote", + "Defined period": "Période définie", + "Unlimited": "Illimitée", + "Voting time": "Durée du vote", "Grades": "Mentions", "You can select here the number of grades for your election": "You pouvez choisir ici le nombre de mentions de votre vote", "5 = Excellent, Very good, Good, Fair, Passable": "5 = Excellent, Très bien, Bien, Assez bien, Passable", @@ -48,7 +48,8 @@ "Copy": "Copier", "Here is the link for the results in real time:": "Voici le lien pour afficher les résultats en temps réel :", "Keep these links carefully": "Gardez ces liens précieusement", - "Participate now!": "Participez maintenant !", + "resource.participateBtn": "Participez maintenant !", + "resource.resultsBtn": "Résultats", "t": "<0>Attention : vous n'aurez pas d'autres moyens pour récupérer ces liens par la suite, et nous ne serons pas capables de les partager avec vous. Vous pouvez, par exemple, ajouter ces liens à vos favoris dans votre navigateur.", "resource.start": "Démarrer", "resource.noAds": "Pas de publicités, ni de cookies publicitaires", @@ -87,19 +88,18 @@ "Support us !": "Soutenez-nous !", "PayPal - The safer, easier way to pay online!": "PayPal - Le moyen le plus sûr et le plus simple de payer en ligne !", "Number of votes:": "Nombre de votes :", - "Access to results" : "Accès aux résultats", + "Access to results": "Accès aux résultats", "Immediately": "Immédiatement", "At the end of the election": "A la clôture du vote", "Results available at the close of the vote": "Résultats disponibles à la clôture du vote", - "The results page will not be accessible until all participants have voted.":"La page de résultats ne sera pas accessible tant que tous les participants n'auront pas voté.", + "The results page will not be accessible until all participants have voted.": "La page de résultats ne sera pas accessible tant que tous les participants n'auront pas voté.", "The results page will not be accessible until the end date is reached.": "La page de résultats ne sera pas accessible tant que la date de fin ne sera pas atteinte.", "No one will be able to see the result until the end date is reached or until all participants have voted.": "Personne ne pourra voir le résultat tant que la date de fin n'est pas atteinte ou que tous les participants n'ont pas voté.", - "Send me this link" : "Envoyez-moi ce lien", - "Send me these links" : "Envoyez-moi ces liens", - "Open" : "Ouvrir", - "Voting address" : "Adresse du vote", - "Results address" : "Adresse des résultats", - "Share election on Facebook" : "Partager le vote sur Facebook", - "Share results on Facebook" : "Partager ces résultats sur Facebook" - + "Send me this link": "Envoyez-moi ce lien", + "Send me these links": "Envoyez-moi ces liens", + "Open": "Ouvrir", + "Voting address": "Adresse du vote", + "Results address": "Adresse des résultats", + "Share election on Facebook": "Partager le vote sur Facebook", + "Share results on Facebook": "Partager ces résultats sur Facebook" } diff --git a/public/locales/ru/resource.json b/public/locales/ru/resource.json index db817cf..a8415c7 100644 --- a/public/locales/ru/resource.json +++ b/public/locales/ru/resource.json @@ -49,7 +49,7 @@ "Copy": "Скопировать", "Here is the link for the results in real time:": "Ссылка на результаты в режиме онлайн:", "Keep these links carefully": "Сохраните эти ссылки, чтобы не потерять", - "Participate now!": "Участвуйте сейчас!", + "resource.participateBtn": "Участвуйте сейчас!", "t": "<0>Предупреждение: вы не сможете восстановить ссылки и не сможете ими поделиться. Например, вы можете добавить их в избранное в вашем браузере.", "Simple and free: organize an election with Majority Judgment.": "Просто и бесплатно: создайте голосование с Решением Большинства.", "Start": "Начать",