X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Fprotocol%2FItem.js;fp=resources%2Fjs%2Fcomponents%2Fprotocol%2FItem.js;h=18b04cc7d6b96f5f5408f0af2d1e5cd6407038e2;hb=6f22614d8c68c68c88b44804802cdffeb3c6a3c7;hp=9fcc7e5c6e09b539b837a2056513714dae8af359;hpb=cd36cb0ba2718e6bfa08765e7702d57dfe7fd733;p=alttp.git diff --git a/resources/js/components/protocol/Item.js b/resources/js/components/protocol/Item.js index 9fcc7e5..18b04cc 100644 --- a/resources/js/components/protocol/Item.js +++ b/resources/js/components/protocol/Item.js @@ -25,6 +25,13 @@ const getEntryDetailsUsername = entry => { const getEntryRoundNumber = entry => (entry && entry.details && entry.details.round && entry.details.round.number) || '?'; +const getEntryResultComment = entry => { + if (!entry || !entry.details || !entry.details.result || !entry.details.result.comment) { + return ''; + } + return entry.details.result.comment; +}; + const getEntryResultTime = entry => { if (!entry || !entry.details || !entry.details.result) return 'ERROR'; const result = entry.details.result; @@ -44,6 +51,12 @@ const getEntryDescription = entry => { username: getEntryDetailsUsername(entry), }, ); + case 'result.comment': { + const comment = getEntryResultComment(entry); + return + {{comment}}, + ; + } case 'result.report': { const time = getEntryResultTime(entry); return @@ -52,6 +65,7 @@ const getEntryDescription = entry => { } case 'round.create': case 'round.lock': + case 'round.seed': case 'round.unlock': return i18n.t( `protocol.description.${entry.type}`, @@ -60,7 +74,6 @@ const getEntryDescription = entry => { number: getEntryRoundNumber(entry), }, ); - case 'result.comment': case 'tournament.lock': return i18n.t( `protocol.description.${entry.type}`,