]> git.localhorst.tv Git - alttp.git/commitdiff
show number of results for open asyncs
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 9 Nov 2022 08:38:13 +0000 (09:38 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 9 Nov 2022 08:38:13 +0000 (09:38 +0100)
resources/js/components/rounds/Item.js
resources/js/i18n/de.js
resources/js/i18n/en.js

index 3197f6d9aa64da0a8df2c68a02b7f1a522deae7b..817069f98dc1fb7552188ed0cbfcb80a9d326dcd 100644 (file)
@@ -73,6 +73,9 @@ const Item = ({
                                        />
                                </p>
                        : null}
+                       {tournament.type === 'open-async' && round.results && round.results.length ?
+                               <p>{i18n.t('rounds.numberOfResults', { count: round.results.length })}</p>
+                       : null}
                        <div className="button-bar">
                                <LockButton round={round} tournament={tournament} />
                                {mayEditRound(user, tournament, round) ?
@@ -91,12 +94,15 @@ Item.propTypes = {
                game: PropTypes.string,
                locked: PropTypes.bool,
                number: PropTypes.number,
+               results: PropTypes.arrayOf(PropTypes.shape({
+               })),
                seed: PropTypes.string,
                title: PropTypes.string,
        }),
        tournament: PropTypes.shape({
                participants: PropTypes.arrayOf(PropTypes.shape({
                })),
+               type: PropTypes.string,
        }),
        user: PropTypes.shape({
        }),
index ace2f3d6ee65038ceddf55852eb52462174ed933..57174139c23187182129e6f95be31d7602d66d9b 100644 (file)
@@ -434,6 +434,8 @@ export default {
                        heading: 'Runden',
                        new: 'Neue Runde',
                        noSeed: 'Noch kein Seed',
+                       numberOfResults: '{{ count }} Ergebniss',
+                       numberOfResults_plural: '{{ count }} Ergebnisse',
                        lock: 'Runde sperren',
                        lockDescription: 'Wenn die Runde gesperrt wird, können Runner keine Änderungen an ihrem Ergebnis mehr vornehmen.',
                        locked: 'Die Runde ist für weitere Änderungen am Ergebnis gesperrt.',
index 9bd521345eb68942f5f0904bb11d70cb10360f7f..ab70e38c5d51f45af4b2b7dd8904910c82c14567 100644 (file)
@@ -434,6 +434,8 @@ export default {
                        heading: 'Rounds',
                        new: 'New round',
                        noSeed: 'No seed set',
+                       numberOfResults: '{{ count }} submission',
+                       numberOfResults_plural: '{{ count }} submissions',
                        lock: 'Lock round',
                        lockDescription: 'When a round is locked, runners cannot submit or change results.',
                        locked: 'Results for this round have been locked.',