Re-add recovery/recharge times and tweak styling

This commit is contained in:
Cmdr McDonald
2016-11-11 00:39:14 +00:00
parent ad570534a0
commit 782603727a
2 changed files with 9 additions and 3 deletions

View File

@@ -32,13 +32,20 @@ export default class DefenceSummary extends TranslatedComponent {
return (
<span>
<h1>{translate('defence summary')}</h1>
<table className='summary' style={{ width: '100%', lineHeight: '1em', backgroundColor: 'transparent' }}>
<table className='summary' style={{ marginLeft: 'auto', marginRight: 'auto', lineHeight: '1em', backgroundColor: 'transparent' }}>
<tbody>
{ship.shield ?
<tr>
<td colSpan='4' className='summary'><h2>{translate('shields')}: {formats.int(ship.shield)} {units.MJ}</h2></td>
</tr> : null }
{ship.shield ?
<tr>
<td className='ri' onMouseEnter={termtip.bind(null, 'PHRASE_SG_RECOVER', { cap: 0 })} onMouseLeave={hide}>{translate('recovery')}</td>
<td className='le'>{formats.time(ship.calcShieldRecovery())}</td>
<td className='ri' onMouseEnter={termtip.bind(null, 'PHRASE_SG_RECHARGE', { cap: 0 })} onMouseLeave={hide}>{translate('recharge')}</td>
<td className='le'>{formats.time(ship.calcShieldRecharge())}</td>
</tr> : null }
{ship.shield ?
<tr>
<td className='le'>{translate('damage from')}</td>
<td className='ri' onMouseOver={termtip.bind(null, 'explosive')} onMouseOut={tooltip.bind(null, null)}><DamageExplosive /> {formats.pct1(ship.shieldExplRes || 1)}</td>
@@ -54,7 +61,6 @@ export default class DefenceSummary extends TranslatedComponent {
<tr>
<td colSpan='4'><h2>{translate('armour')}: {formats.int(ship.armour)}</h2></td>
</tr>
<tr>
<td className='le'>{translate('damage from')}</td>
<td className='ri' onMouseOver={termtip.bind(null, 'explosive')} onMouseOut={tooltip.bind(null, null)}><DamageExplosive /> {formats.pct1(ship.hullExplRes || 1)}</td>

View File

@@ -32,7 +32,7 @@ export default class OffenceSummary extends TranslatedComponent {
return (
<span>
<h1>{translate('offence summary')}</h1>
<table className='summary' style={{ width: '100%', lineHeight: '1em', backgroundColor: 'transparent' }}>
<table className='summary' style={{ marginLeft: 'auto', marginRight: 'auto', lineHeight: '1em', backgroundColor: 'transparent' }}>
<tbody>
<tr>
<td colSpan='4' className='summary'><h2>{translate('dps')}: {formats.f1(ship.totalDps)}</h2></td>