diff --git a/src/app/pages/ShipyardPage.jsx b/src/app/pages/ShipyardPage.jsx
index 8ef8f8e4..74404f45 100644
--- a/src/app/pages/ShipyardPage.jsx
+++ b/src/app/pages/ShipyardPage.jsx
@@ -139,15 +139,16 @@ export default class ShipyardPage extends Page {
* @param {Object} u Localized unit map
* @param {Function} fInt Localized integer formatter
* @param {Function} fRound Localized round formatter
+ * @param {Boolean} highlight Should this row be highlighted
* @return {React.Component} Table Row
*/
- _shipRowElement(s, translate, u, fInt, fRound) {
+ _shipRowElement(s, translate, u, fInt, fRound, highlight) {
let noTouch = this.context.noTouch;
return
| {s.manufacturer} |
@@ -246,13 +247,26 @@ export default class ShipyardPage extends Page {
let shipRows = new Array(shipSummaries.length);
let detailRows = new Array(shipSummaries.length);
+ let lastShipSortValue = null;
+ let backgroundHighlight = false;
+
for (let s of shipSummaries) {
- detailRows[i] = this._shipRowElement(s, translate, units, fInt, formats.f1);
+ let shipSortValue = s[shipPredicate];
+ if( shipPredicateIndex != undefined ) {
+ shipSortValue = shipSortValue[shipPredicateIndex];
+ }
+
+ if( shipSortValue != lastShipSortValue ) {
+ backgroundHighlight = !backgroundHighlight;
+ lastShipSortValue = shipSortValue;
+ }
+
+ detailRows[i] = this._shipRowElement(s, translate, units, fInt, formats.f1, backgroundHighlight);
shipRows[i] = (
| {s.name} |
@@ -316,16 +330,16 @@ export default class ShipyardPage extends Page {
{translate('internal compartments')} |
- | {units.CR} |
- {units.T} |
- {units['m/s']} |
- {units['m/s']} |
- |
- {units.MJ} |
- {units['m/s']} |
- {units['m/s']} |
- {units.LY} |
- {units.T} |
+ {units.CR} |
+ {units.T} |
+ {units['m/s']} |
+ {units['m/s']} |
+ |
+ {units.MJ} |
+ {units['m/s']} |
+ {units['m/s']} |
+ {units.LY} |
+ {units.T} |
{'pp'} |
{'th'} |
{'fsd'} |
diff --git a/src/less/colors.less b/src/less/colors.less
index 4814e724..2a18f6de 100755
--- a/src/less/colors.less
+++ b/src/less/colors.less
@@ -18,6 +18,7 @@
@bg: rgba(30,30,30,1);
@bgBlack: #000;
@primary-bg: fadeout(darken(@primary, 47%), 15%);
+@alt-primary-bg: fadeout(darken(@primary, 42%), 15%); // Lighter brown background
@secondary-bg: fadeout(darken(@secondary, @bgDarken), @bgTransparency); // Brown background
@warning-bg: fadeout(darken(@warning, @bgDarken), @bgTransparency); // Dark Red
diff --git a/src/less/table.less b/src/less/table.less
index 93f6f8e3..1cce0319 100755
--- a/src/less/table.less
+++ b/src/less/table.less
@@ -54,6 +54,10 @@ tbody tr {
.no-touch &.highlight:hover, .no-touch &.highlighted {
background-color: @warning-bg;
}
+
+ &.alt {
+ background-color: @alt-primary-bg;
+ }
}
td {