diff --git a/src/app/components/Header.jsx b/src/app/components/Header.jsx index a3140649..de3ea25b 100644 --- a/src/app/components/Header.jsx +++ b/src/app/components/Header.jsx @@ -25,11 +25,11 @@ const SIZE_RANGE = 0.55; * @return {Number} Normalized value */ function normalizePercent(val) { - if (val === '' || isNaN(val)) { - return 0; - } - val = Math.round(val * 1000) / 1000; - return val >= 100 ? 100 : val; + if (val === '' || isNaN(val)) { + return 0; + } + val = Math.round(val * 1000) / 1000; + return val >= 100 ? 100 : val; } /** @@ -38,7 +38,7 @@ function normalizePercent(val) { * @return {Number} Rounded value */ function nearestQtrPct(val) { - return Math.round(val * 4) / 4; + return Math.round(val * 4) / 4; } /** @@ -46,7 +46,7 @@ function nearestQtrPct(val) { * @param {SyntheticEvent} e Event */ function selectAll(e) { - e.target.select(); + e.target.select(); } /** @@ -54,11 +54,11 @@ function selectAll(e) { */ export default class Header extends TranslatedComponent { - /** - * Constructor - * @param {Object} props React Component properties - * @param {Object} context React Component context - */ + /** + * Constructor + * @param {Object} props React Component properties + * @param {Object} context React Component context + */ constructor(props, context) { super(props); this.shipOrder = Object.keys(Ships).sort(); @@ -372,6 +372,23 @@ export default class Header extends TranslatedComponent { ); } + /** + * Generate the help menu + * @return {React.Component} Menu + */ + _getHelpMenu() { + let translate = this.context.language.translate; + + return ( +
e.stopPropagation() } style={{ whiteSpace: 'nowrap' }}> +
{translate('introduction')}
+
{translate('importing your build')}
+
{translate('engineers')}
+
{translate('tricks and tips')}
+
+ ); + } + /** * Generate the settings menu * @return {React.Component} Menu