From d783a38588e36ff8ceab492ebe3f0dd91ef30426 Mon Sep 17 00:00:00 2001 From: Colin McLeod Date: Tue, 2 Feb 2016 09:13:59 -0800 Subject: [PATCH] Continued porting to react --- .eslintrc | 1 + __tests__/test-import.js | 35 +++-- __tests__/test-persist.js | 37 +++++ __tests__/test-serializer.js | 37 +++-- package.json | 4 + src/app/Coriolis.jsx | 4 +- src/app/components/ActiveLink.jsx | 3 +- src/app/components/AvailableModulesMenu.jsx | 38 ++++- src/app/components/BarChart.jsx | 1 - src/app/components/ComparisonTable.jsx | 8 +- src/app/components/CostSection.jsx | 32 ++-- src/app/components/HardpointsSlotSection.jsx | 35 ++--- src/app/components/Header.jsx | 40 ++--- src/app/components/InternalSlotSection.jsx | 11 +- src/app/components/LineChart.jsx | 1 - src/app/components/Link.jsx | 3 +- src/app/components/ModalCompare.jsx | 10 +- src/app/components/ModalDeleteAll.jsx | 6 +- src/app/components/ModalExport.jsx | 4 +- src/app/components/ModalImport.jsx | 32 ++-- src/app/components/ModalPermalink.jsx | 4 +- src/app/components/PowerBands.jsx | 8 +- src/app/components/PowerManagement.jsx | 32 ++-- src/app/components/Slider.jsx | 137 ++++++++++++----- src/app/components/Slot.jsx | 4 +- src/app/components/SlotSection.jsx | 15 +- src/app/components/StandardSlot.jsx | 2 +- src/app/components/StandardSlotSection.jsx | 33 ++-- src/app/components/Tooltip.jsx | 123 ++++++++++----- src/app/components/UtilitySlotSection.jsx | 19 +-- src/app/index.js | 5 + src/app/pages/ComparisonPage.jsx | 30 ++-- src/app/pages/OutfittingPage.jsx | 48 +++--- src/app/pages/ShipyardPage.jsx | 60 ++++---- src/app/shipyard/Ship.js | 150 +++++++++++-------- src/app/utils/SlotFunctions.js | 36 ++++- src/app/utils/UtilityFunctions.js | 11 ++ src/less/colors.less | 2 +- src/less/table.less | 10 -- src/less/tooltip.less | 9 +- src/schemas/ship-loadout/1.json | 4 +- src/schemas/ship-loadout/2.json | 2 +- src/schemas/ship-loadout/3.json | 4 +- 43 files changed, 679 insertions(+), 411 deletions(-) create mode 100644 __tests__/test-persist.js diff --git a/.eslintrc b/.eslintrc index 6be7aa40..74bf0806 100644 --- a/.eslintrc +++ b/.eslintrc @@ -25,6 +25,7 @@ "ClassDeclaration": true } }], + "no-console": 2, "brace-style": [2, "1tbs", { "allowSingleLine": true }], "comma-style": [2, "last"], "indent": [2, 2, { "SwitchCase": 1, "VariableDeclarator": 2 }], diff --git a/__tests__/test-import.js b/__tests__/test-import.js index c0d71233..01ce652a 100644 --- a/__tests__/test-import.js +++ b/__tests__/test-import.js @@ -6,10 +6,9 @@ import React from 'react'; import ReactDOM from 'react-dom'; import TU from 'react-testutils-additions'; import Utils from './testUtils'; -import Persist from '../src/app/stores/Persist'; import { getLanguage } from '../src/app/i18n/Language'; -describe('Import Controller', function() { +describe('Import Modal', function() { const Persist = require('../src/app/stores/Persist').default; const ModalImport = require('../src/app/components/ModalImport').default; @@ -90,8 +89,8 @@ describe('Import Controller', function() { }); it('imports an old valid backup', function() { - let importData = require('./fixtures/old-valid-export'); - let importStr = JSON.stringify(importData); + const importData = require('./fixtures/old-valid-export'); + const importStr = JSON.stringify(importData); pasteText(importStr); expect(modal.state.builds).toEqual(importData.builds); @@ -104,7 +103,7 @@ describe('Import Controller', function() { }); it('catches an invalid backup', function() { - let importData = require('./fixtures/valid-backup'); + const importData = require('./fixtures/valid-backup'); let invalidImportData = Object.assign({}, importData); invalidImportData.builds.asp = null; // Remove Asp Miner build used in comparison @@ -131,7 +130,7 @@ describe('Import Controller', function() { beforeEach(reset); it('imports a valid v3 build', function() { - let importData = require('./fixtures/anaconda-test-detailed-export-v3'); + const importData = require('./fixtures/anaconda-test-detailed-export-v3'); pasteText(JSON.stringify(importData)); expect(modal.state.importValid).toBeTruthy(); @@ -149,7 +148,7 @@ describe('Import Controller', function() { }); it('catches an invalid build', function() { - let importData = require('./fixtures/anaconda-test-detailed-export-v3'); + const importData = require('./fixtures/anaconda-test-detailed-export-v3'); pasteText(JSON.stringify(importData).replace('components', 'comps')); expect(modal.state.importValid).toBeFalsy(); @@ -162,8 +161,8 @@ describe('Import Controller', function() { beforeEach(reset); it('imports all builds', function() { - let importData = require('./fixtures/valid-detailed-export'); - let expectedBuilds = require('./fixtures/expected-builds'); + const importData = require('./fixtures/valid-detailed-export'); + const expectedBuilds = require('./fixtures/expected-builds'); pasteText(JSON.stringify(importData)); expect(modal.state.importValid).toBeTruthy(); @@ -185,7 +184,7 @@ describe('Import Controller', function() { describe('Import E:D Shipyard Builds', function() { it('imports a valid builds', function() { - let imports = require('./fixtures/ed-shipyard-import-valid'); + const imports = require('./fixtures/ed-shipyard-import-valid'); for (let i = 0; i < imports.length; i++ ) { reset(); @@ -203,7 +202,7 @@ describe('Import Controller', function() { }); it('catches invalid builds', function() { - let imports = require('./fixtures/ed-shipyard-import-invalid'); + const imports = require('./fixtures/ed-shipyard-import-invalid'); for (let i = 0; i < imports.length; i++ ) { reset(); @@ -212,7 +211,21 @@ describe('Import Controller', function() { expect(modal.state.errorMsg).toEqual(imports[i].errorMsg); } }); + }); + describe('Imports from a Comparison', function() { + + it('imports a valid comparison', function() { + const importBuilds = require('./fixtures/valid-backup').builds; + Persist.deleteAll(); + render = TU.renderIntoDocument(); + modal = TU.findRenderedComponentWithType(render, ModalImport); + + expect(modal.state.processed).toBe(true); + expect(modal.state.errorMsg).toEqual(null); + clickImport(); + expect(Persist.getBuilds()).toEqual(importBuilds); + }); }); }); diff --git a/__tests__/test-persist.js b/__tests__/test-persist.js new file mode 100644 index 00000000..233d2739 --- /dev/null +++ b/__tests__/test-persist.js @@ -0,0 +1,37 @@ +jest.dontMock('../src/app/stores/Persist'); + +import React from 'react'; +import ReactDOM from 'react-dom'; +import TU from 'react-testutils-additions'; + +xdescribe('Persist', function() { + + const Persist = require('../src/app/stores/Persist').default; + + describe('Builds', function() { + + + }); + + describe('Comparisons', function() { + + + }); + + describe('Settings', function() { + + it("has defaults", function() { + expect(false).toBeTruthy('Implement'); + }); + + it("loads from localStorage correctly", function() { + expect(false).toBeTruthy('Implement'); + }); + + it("generates the backup", function() { + expect(false).toBeTruthy('Implement'); + }); + + }); + +}); diff --git a/__tests__/test-serializer.js b/__tests__/test-serializer.js index 1ce3385a..5c64b903 100644 --- a/__tests__/test-serializer.js +++ b/__tests__/test-serializer.js @@ -1,27 +1,20 @@ import Ship from '../src/app/shipyard/Ship'; import { Ships } from 'coriolis-data'; import * as Serializer from '../src/app/shipyard/Serializer'; +import jsen from 'jsen'; -describe("Serializer Service", function() { - +describe("Serializer", function() { const anacondaTestExport = require.requireActual('./fixtures/anaconda-test-detailed-export-v3'); const code = anacondaTestExport.references[0].code; const anaconda = Ships.anaconda; + const validate = jsen(require('../src/schemas/ship-loadout/3')); describe("To Detailed Build", function() { + let testBuild = new Ship('anaconda', anaconda.properties, anaconda.slots).buildFrom(code); + let exportData = Serializer.toDetailedBuild('Test', testBuild); - let testBuild, exportData; - - beforeEach(function() { - testBuild = new Ship('anaconda', anaconda.properties, anaconda.slots); - testBuild.buildFrom(code); - exportData = Serializer.toDetailedBuild('Test', testBuild); - }); - - xit("conforms to the v2 ship-loadout schema", function() { - // var validate = jsen(require('../schemas/ship-loadout/3')); - // var valid = validate(exportData); - expect(valid).toBeTruthy(); + it("conforms to the v3 ship-loadout schema", function() { + expect(validate(exportData)).toBe(true); }); it("contains the correct components and stats", function() { @@ -33,6 +26,21 @@ describe("Serializer Service", function() { }); + describe("Export Detailed Builds", function() { + const expectedExport = require('./fixtures/valid-detailed-export'); + const builds = require('./fixtures/expected-builds'); + const exportData = Serializer.toDetailedExport(builds); + + it("conforms to the v3 ship-loadout schema", function() { + expect(exportData instanceof Array).toBe(true); + + for (let detailedBuild of exportData) { + expect(validate(detailedBuild)).toBe(true); + } + }); + + }); + describe("From Detailed Build", function() { it("builds the ship correctly", function() { @@ -51,4 +59,5 @@ describe("Serializer Service", function() { }); + }); diff --git a/package.json b/package.json index 3691386e..7fed1710 100644 --- a/package.json +++ b/package.json @@ -42,10 +42,12 @@ "/node_modules/classnames", "/node_modules/d3", "/node_modules/lz-string", + "/node_modules/jsen", "/node_modules/coriolis-data", "/src/app/shipyard", "/src/app/i18n", "/src/app/utils", + "/src/schemas", "/__tests__" ] }, @@ -67,6 +69,7 @@ "file-loader": "^0.8.4", "html-webpack-plugin": "^1.7.0", "jest-cli": "*", + "jsen": "^0.6.0", "json-loader": "^0.5.3", "less": "^2.5.3", "less-loader": "^2.2.1", @@ -79,6 +82,7 @@ "webpack-dev-server": "^1.14.0" }, "dependencies": { + "babel-polyfill": "^6.3.14", "classnames": "^2.2.0", "d3": "^3.5.9", "fbemitter": "^2.0.0", diff --git a/src/app/Coriolis.jsx b/src/app/Coriolis.jsx index 8e771650..d6f41e09 100644 --- a/src/app/Coriolis.jsx +++ b/src/app/Coriolis.jsx @@ -121,7 +121,7 @@ export default class Coriolis extends React.Component { * @param {React.Component} content Modal Content */ _showModal(content) { - let modal =
this._hideModal() }>{content}
; + let modal =
this._hideModal() }>{content}
; this.setState({ modal }); } @@ -238,7 +238,7 @@ export default class Coriolis extends React.Component { * @return {React.Component} The main app */ render() { - return
+ return
{ this.state.page ? : } { this.state.modal } diff --git a/src/app/components/ActiveLink.jsx b/src/app/components/ActiveLink.jsx index 13cb5ee9..ab472802 100644 --- a/src/app/components/ActiveLink.jsx +++ b/src/app/components/ActiveLink.jsx @@ -22,12 +22,13 @@ export default class ActiveLink extends Link { * @return {React.Component} The active link */ render() { + let action = this.handler.bind(this); let className = this.props.className; if (isActive(this.props.href)) { className = cn(className, 'active'); } - return {this.props.children}; + return {this.props.children}; } } \ No newline at end of file diff --git a/src/app/components/AvailableModulesMenu.jsx b/src/app/components/AvailableModulesMenu.jsx index b66776fa..4f3cae16 100644 --- a/src/app/components/AvailableModulesMenu.jsx +++ b/src/app/components/AvailableModulesMenu.jsx @@ -1,6 +1,7 @@ import React from 'react'; import { findDOMNode } from 'react-dom'; import TranslatedComponent from './TranslatedComponent'; +import { stopCtxPropagation } from '../utils/UtilityFunctions'; import cn from 'classnames'; import { MountFixed, MountGimballed, MountTurret } from './SvgIcons'; @@ -30,6 +31,7 @@ export default class AvailableModulesMenu extends TranslatedComponent { constructor(props, context) { super(props); this._hideDiff = this._hideDiff.bind(this); + this._diffMove = this._diffMove.bind(this); this.state = { list: this._initList(props, context) }; } @@ -49,8 +51,8 @@ export default class AvailableModulesMenu extends TranslatedComponent { m, warning, shipMass - (m && m.mass ? m.mass : 0), - (m) => { - this._hideDiff(); + (m, event) => { + this._hideDiff(event); onSelect(m); } ); @@ -89,9 +91,10 @@ export default class AvailableModulesMenu extends TranslatedComponent { let m = modules[i]; let mount = null; let disabled = m.maxmass && (mass + (m.mass ? m.mass : 0)) > m.maxmass; + let active = mountedModule && mountedModule === m; let classes = cn(m.name ? 'lc' : 'c', { - active: mountedModule && mountedModule.id === m.id, warning: !disabled && warningFunc && warningFunc(m), + active, disabled }); @@ -105,11 +108,14 @@ export default class AvailableModulesMenu extends TranslatedComponent { elems.push(
); } + let showDiff = disabled || active ? null : this._showDiff.bind(this, mountedModule, m); + elems.push(
  • @@ -132,15 +138,27 @@ export default class AvailableModulesMenu extends TranslatedComponent { * @param {SyntheticEvent} event Event */ _showDiff(mm, m, event) { + event.preventDefault(); if (this.props.diffDetails) { this.context.tooltip(this.props.diffDetails(m, mm), event.currentTarget.getBoundingClientRect()); } } + _touchStart(event) { + event.preventDefault(); + console.log(Object.assign({}, event)); + } + + _diffMove(event) { + console.log(Object.assign({}, event)); + } + /** * Hide diff tooltip + * @param {SyntheticEvent} event Event */ - _hideDiff() { + _hideDiff(event) { + event.preventDefault(); this.context.tooltip(); } @@ -170,7 +188,15 @@ export default class AvailableModulesMenu extends TranslatedComponent { */ render() { return ( -
    e.stopPropagation() }> +
    e.stopPropagation() } + onTouchStart={this._touchStart} + onTouchEnd={this._hideDiff} + onTouchCancel={this._hideDiff} + onContextMenu={stopCtxPropagation} + > {this.state.list}
    ); diff --git a/src/app/components/BarChart.jsx b/src/app/components/BarChart.jsx index 69e7d912..5789e375 100644 --- a/src/app/components/BarChart.jsx +++ b/src/app/components/BarChart.jsx @@ -1,5 +1,4 @@ import React from 'react'; -import { findDOMNode } from 'react-dom'; import d3 from 'd3'; import TranslatedComponent from './TranslatedComponent'; diff --git a/src/app/components/ComparisonTable.jsx b/src/app/components/ComparisonTable.jsx index ca99d307..cbe63663 100644 --- a/src/app/components/ComparisonTable.jsx +++ b/src/app/components/ComparisonTable.jsx @@ -38,8 +38,8 @@ export default class ComparisonTable extends TranslatedComponent { */ _buildHeaders(facets, onSort, translate) { let header = [ - {translate('ship')}, - {translate('build')} + {translate('ship')}, + {translate('build')} ]; let subHeader = []; @@ -47,13 +47,13 @@ export default class ComparisonTable extends TranslatedComponent { if (f.active) { let p = f.props; let pl = p.length; - header.push( + header.push( {translate(f.title)} ); if (pl > 1) { for (let i = 0; i < pl; i++) { - subHeader.push({translate(f.lbls[i])}); + subHeader.push({translate(f.lbls[i])}); } } } diff --git a/src/app/components/CostSection.jsx b/src/app/components/CostSection.jsx index 8acefa2c..e742ab10 100644 --- a/src/app/components/CostSection.jsx +++ b/src/app/components/CostSection.jsx @@ -295,9 +295,9 @@ export default class CostSection extends TranslatedComponent { if (item.m && item.m.cost) { let toggle = this._toggleCost.bind(this, item); rows.push( - {item.m.class + item.m.rating} - {slotName(translate, item)} - {formats.int(item.discountedCost)}{units.CR} + {item.m.class + item.m.rating} + {slotName(translate, item)} + {formats.int(item.discountedCost)}{units.CR} ); } } @@ -306,12 +306,12 @@ export default class CostSection extends TranslatedComponent { - - + @@ -346,7 +346,7 @@ export default class CostSection extends TranslatedComponent { if (retrofitCosts.length) { for (let i = 0, l = retrofitCosts.length; i < l; i++) { let item = retrofitCosts[i]; - rows.push( + rows.push( @@ -363,9 +363,9 @@ export default class CostSection extends TranslatedComponent {
    + {translate('component')} {shipDiscount < 1 && {`[${translate('ship')} -${formats.pct1(1 - shipDiscount)}]`}} {moduleDiscount < 1 && {`[${translate('modules')} -${formats.pct1(1 - moduleDiscount)}]`}} {translate('credits')}{translate('credits')}
    {item.sellClassRating} {translate(item.sellName)} {item.buyClassRating}
    - - - + + @@ -473,10 +473,10 @@ export default class CostSection extends TranslatedComponent {
    {translate('sell')}{translate('buy')} + {translate('sell')}{translate('buy')} {translate('net cost')} {moduleDiscount < 1 && {`[${translate('modules')} -${formats.rPct(1 - moduleDiscount)}]`}}
    - - - - + + + + @@ -673,9 +673,9 @@ export default class CostSection extends TranslatedComponent {
    {translate('module')}{translate('qty')}{translate('unit cost')}{translate('total cost')}{translate('module')}{translate('qty')}{translate('unit cost')}{translate('total cost')}
    - - - + + +
    {translate('costs')}{translate('retrofit costs')}{translate('reload costs')}{translate('costs')}{translate('retrofit costs')}{translate('reload costs')}
    diff --git a/src/app/components/HardpointsSlotSection.jsx b/src/app/components/HardpointsSlotSection.jsx index 86a8a898..6fa84257 100644 --- a/src/app/components/HardpointsSlotSection.jsx +++ b/src/app/components/HardpointsSlotSection.jsx @@ -3,6 +3,7 @@ import SlotSection from './SlotSection'; import HardpointSlot from './HardpointSlot'; import cn from 'classnames'; import { MountFixed, MountGimballed, MountTurret } from '../components/SvgIcons'; +import { stopCtxPropagation } from '../utils/UtilityFunctions'; /** * Hardpoint slot section @@ -90,39 +91,39 @@ export default class HardpointsSlotSection extends SlotSection { _getSectionMenu(translate) { let _fill = this._fill; - return
    e.stopPropagation()}> + return
    e.stopPropagation()} onContextMenu={stopCtxPropagation}>
      -
    • {translate('empty all')}
    • +
    • {translate('empty all')}
    {translate('pl')}
      -
    • -
    • -
    • +
    • +
    • +
    {translate('ul')}
      -
    • -
    • -
    • +
    • +
    • +
    {translate('bl')}
      -
    • -
    • -
    • +
    • +
    • +
    {translate('mc')}
      -
    • -
    • -
    • +
    • +
    • +
    {translate('c')}
      -
    • -
    • -
    • +
    • +
    • +
    ; } diff --git a/src/app/components/Header.jsx b/src/app/components/Header.jsx index eec26052..4086620e 100644 --- a/src/app/components/Header.jsx +++ b/src/app/components/Header.jsx @@ -34,6 +34,11 @@ export default class Header extends TranslatedComponent { this._setLanguage = this._setLanguage.bind(this); this._setInsurance = this._setInsurance.bind(this); + this._openShips = this._openMenu.bind(this, 's'); + this._openBuilds = this._openMenu.bind(this, 'b'); + this._openComp = this._openMenu.bind(this, 'comp'); + this._openSettings = this._openMenu.bind(this, 'settings'); + this.languageOptions = []; this.insuranceOptions = []; this.discountOptions = []; @@ -156,12 +161,11 @@ export default class Header extends TranslatedComponent { /** * Open a menu - * @param {SyntheticEvent} event Event * @param {string} menu Menu name + * @param {SyntheticEvent} event Event */ - _openMenu(event, menu) { + _openMenu(menu, event) { event.stopPropagation(); - if (this.props.currentMenu == menu) { menu = null; } @@ -181,7 +185,7 @@ export default class Header extends TranslatedComponent { } return ( -
    e.stopPropagation() }> +
    e.stopPropagation() }> {shipList}
    ); @@ -207,7 +211,7 @@ export default class Header extends TranslatedComponent { } return ( -
    e.stopPropagation() }> +
    e.stopPropagation() }>
    {buildList}
    ); @@ -233,7 +237,7 @@ export default class Header extends TranslatedComponent { } return ( -
    e.stopPropagation() } style={{ whiteSpace: 'nowrap' }}> +
    e.stopPropagation() } style={{ whiteSpace: 'nowrap' }}> {comparisons}
    {translate('compare all')} @@ -251,14 +255,14 @@ export default class Header extends TranslatedComponent { let tips = Persist.showTooltips(); return ( -
    e.stopPropagation() }> +
    e.stopPropagation() }>
    {translate('language')}
    - + {translate('tooltips')}
    {(tips ? '✓' : '✗')}
    @@ -281,10 +285,10 @@ export default class Header extends TranslatedComponent {

    @@ -295,7 +299,7 @@ export default class Header extends TranslatedComponent { - +
    A
    {translate('reset')}{translate('reset')}
    @@ -343,7 +347,7 @@ export default class Header extends TranslatedComponent { let hasBuilds = Persist.hasBuilds(); if (this.props.appCacheUpdate) { - return
    window.location.reload() }>{translate('PHRASE_UPDATE_RDY')}
    ; + return
    window.location.reload() }>{translate('PHRASE_UPDATE_RDY')}
    ; } return ( @@ -351,28 +355,28 @@ export default class Header extends TranslatedComponent {
    -
    this._openMenu(e,'s') } > +
    {' ' + translate('ships')}
    {openedMenu == 's' ? this._getShipsMenu() : null}
    -
    this._openMenu(e,'b') : null }> +
    {' ' + translate('builds')}
    {openedMenu == 'b' ? this._getBuildsMenu() : null}
    -
    this._openMenu(e,'comp') : null }> +
    {' ' + translate('compare')}
    {openedMenu == 'comp' ? this._getComparisonsMenu() : null}
    -
    this._openMenu(e,'settings') }> +
    {translate('settings')}
    {openedMenu == 'settings' ? this._getSettingsMenu() : null} diff --git a/src/app/components/InternalSlotSection.jsx b/src/app/components/InternalSlotSection.jsx index 69e8863c..9dd5ae0e 100644 --- a/src/app/components/InternalSlotSection.jsx +++ b/src/app/components/InternalSlotSection.jsx @@ -3,6 +3,7 @@ import cn from 'classnames'; import SlotSection from './SlotSection'; import InternalSlot from './InternalSlot'; import * as ModuleUtils from '../shipyard/ModuleUtils'; +import { stopCtxPropagation } from '../utils/UtilityFunctions'; /** * Internal slot section @@ -131,12 +132,12 @@ export default class InternalSlotSection extends SlotSection { * @return {React.Component} Section menu */ _getSectionMenu(translate) { - return
    e.stopPropagation()}> + return
    e.stopPropagation()} onContextMenu={stopCtxPropagation}>
      -
    • {translate('empty all')}
    • -
    • {translate('cargo')}
    • -
    • {translate('scb')}
    • -
    • {translate('hr')}
    • +
    • {translate('empty all')}
    • +
    • {translate('cargo')}
    • +
    • {translate('scb')}
    • +
    • {translate('hr')}
    ; } diff --git a/src/app/components/LineChart.jsx b/src/app/components/LineChart.jsx index 595b7b46..bfafada0 100644 --- a/src/app/components/LineChart.jsx +++ b/src/app/components/LineChart.jsx @@ -1,5 +1,4 @@ import React from 'react'; -import { findDOMNode } from 'react-dom'; import d3 from 'd3'; import TranslatedComponent from './TranslatedComponent'; diff --git a/src/app/components/Link.jsx b/src/app/components/Link.jsx index 7567d087..e4fef0e8 100644 --- a/src/app/components/Link.jsx +++ b/src/app/components/Link.jsx @@ -41,7 +41,8 @@ export default class Link extends React.Component { * @return {React.Component} A href element */ render() { - return {this.props.children}; + let action = this.handler.bind(this); + return {this.props.children}; } } \ No newline at end of file diff --git a/src/app/components/ModalCompare.jsx b/src/app/components/ModalCompare.jsx index 00a70aef..a7bbe8af 100644 --- a/src/app/components/ModalCompare.jsx +++ b/src/app/components/ModalCompare.jsx @@ -96,20 +96,20 @@ export default class ModalCompare extends TranslatedComponent { let translate = this.context.language.translate; let availableBuilds = unusedBuilds.map((build, i) => - + {build.name} {build.buildName} ); let selectedBuilds = usedBuilds.map((build, i) => - + {build.name}< td className='tl'>{build.buildName} ); - return
    e.stopPropagation() }> + return
    e.stopPropagation() }>

    {translate('PHRASE_SELECT_BUILDS')}

    @@ -127,8 +127,8 @@ export default class ModalCompare extends TranslatedComponent {

    - - + +
    ; } } diff --git a/src/app/components/ModalDeleteAll.jsx b/src/app/components/ModalDeleteAll.jsx index fd0eb948..44aa65f8 100644 --- a/src/app/components/ModalDeleteAll.jsx +++ b/src/app/components/ModalDeleteAll.jsx @@ -22,11 +22,11 @@ export default class ModalDeleteAll extends TranslatedComponent { render() { let translate = this.context.language.translate; - return
    e.stopPropagation()}> + return
    e.stopPropagation()}>

    {translate('delete all')}

    {translate('PHRASE_CONFIRMATION')}

    - - + +
    ; } } diff --git a/src/app/components/ModalExport.jsx b/src/app/components/ModalExport.jsx index 70e95ee2..9b418d9f 100644 --- a/src/app/components/ModalExport.jsx +++ b/src/app/components/ModalExport.jsx @@ -52,13 +52,13 @@ export default class ModalExport extends TranslatedComponent { description =
    {translate(this.props.description)}
    ; } - return
    e.stopPropagation() }> + return
    e.stopPropagation() }>

    {translate(this.props.title || 'Export')}

    {description}