{/* Messages. */}
{tabNames.map(protagonist => (
{(!messageChannels.hasOwnProperty(protagonist) || !messageChannels[protagonist].length ?
(No
messages{engine.isPlayerGame() ? ` with ${protagonist}` : ''}.
) :
(messageChannels[protagonist].map((message, index) => {
let id = null;
if (!message.read && !unreadMarked.has(protagonist)) {
if (engine.isOmniscientGame() || message.sender !== role) {
unreadMarked.add(protagonist);
id = `${protagonist}-unread`;
}
}
return ;
}))
)}
))}
{/* Link to go to first unread received message. */}
{unreadMarked.has(currentTabId) && (
Go to 1st unread message
)}
{/* Send form. */}
{engine.isPlayerGame() && (
this.sendMessage(engine.client, currentTabId, form.message)}/>)}
);
}
renderMapForResults(gameEngine, showOrders) {
return (
{this.state.historyCurrentOrders && (
{this.state.historyCurrentOrders.join(', ')}
)}
{this.renderMapForMessages(engine, this.state.historyShowOrders)}
{this.__form_phases(pastPhases, phaseIndex)}
{pastPhases[phaseIndex] === initialEngine.phase ? (
this.renderCurrentMessages(initialEngine, currentPowerName)
) : (
this.renderPastMessages(engine, currentPowerName)
)}
{toDisplay && }
{toDisplay && }
{toDisplay && }
{toDisplay && }
);
}
renderTabCurrentPhase(toDisplay, engine, powerName, orderType, orderPath, currentPowerName, currentTabOrderCreation) {
const powerNames = Object.keys(engine.powers);
powerNames.sort();
const orderedPowers = powerNames.map(pn => engine.powers[pn]);
return (