diff --git a/src/app/components/ModalShoppingList.jsx b/src/app/components/ModalShoppingList.jsx index 4465d274..2b12418c 100644 --- a/src/app/components/ModalShoppingList.jsx +++ b/src/app/components/ModalShoppingList.jsx @@ -12,7 +12,8 @@ const base64url = require('base64url'); export default class ModalShoppingList extends TranslatedComponent { static propTypes = { - ship: PropTypes.object.isRequired + ship: PropTypes.object.isRequired, + buildName: PropTypes.string }; /** @@ -156,6 +157,7 @@ export default class ModalShoppingList extends TranslatedComponent { sendToEDOMH(event) { event.preventDefault(); const ship = this.props.ship; + const buildName = this.props.buildName; let blueprints = []; //create the json @@ -216,15 +218,18 @@ export default class ModalShoppingList extends TranslatedComponent { } } + let shipName = buildName + " - " + ship.name; + //create JSON to encode let baseJson = { "version":1, - "name":ship.name, // TO-DO: Import build name and put that here correctly + "name": shipName, // TO-DO: Import build name and put that here correctly "items": blueprints } let JSONString = JSON.stringify(baseJson) console.log(JSONString) + console.log(ship) let deflated = zlib.deflateSync(JSONString) //actually encode @@ -333,6 +338,7 @@ export default class ModalShoppingList extends TranslatedComponent { this.sendToEDOMH = this.sendToEDOMH.bind(this); return
e.stopPropagation() }>

{translate('PHRASE_SHOPPING_MATS')}

+

{translate('PHRASE_DIFFERENT_ROLLS')}

{/*
diff --git a/src/app/i18n/en.json b/src/app/i18n/en.json index b856a2e4..eef0c6ff 100644 --- a/src/app/i18n/en.json +++ b/src/app/i18n/en.json @@ -26,6 +26,7 @@ "PHRASE_NO_SPECIAL": "No experimental effect", "PHRASE_SHOPPING_LIST": "Stations that sell this build", "PHRASE_SHOPPING_MATS": "Materials needed for this build", + "PHRASE_DIFFERENT_ROLLS": "NOTE: ED Engineer and/or EDOMH likely have their own 'rolls' configuration, so material requirements may differ!", "PHRASE_REFIT_SHOPPING_LIST": "Stations that sell required modules", "PHRASE_TOTAL_EFFECTIVE_SHIELD": "Total amount of damage that can be taken from each damage type, if using all shield cells", "PHRASE_TIME_TO_LOSE_SHIELDS": "Shields will hold for", @@ -81,9 +82,9 @@ "TT_SUMMARY_UNLADEN_TOTAL_JUMP": "Farthest possible range with no cargo, a full fuel tank, and jumping as far as possible each time", "TT_SUMMARY_LADEN_TOTAL_JUMP": "Farthest possible range with full cargo, a full fuel tank, and jumping as far as possible each time", "HELP_MODIFICATIONS_MENU": "Click on a number to enter a new value, or drag along the bar for small changes", - "PHRASE_FAIL_EDENGINEER": "Failed to send to EDEngineer (Launch EDEngineer and make sure the API is started then refresh the page.)", - "PHRASE_ENSURE_EDOMH": "Ensure EDO Material Helper is running, else this button will do nothing!", - "PHRASE_FIREFOX_EDENGINEER": "Sending to EDEngineer is not compatible with Firefox's security settings. Please try again with Chrome.", + "PHRASE_FAIL_EDENGINEER": "Failed to send to EDEngineer (Launch EDEngineer and make sure the API is started then refresh the page.)", + "PHRASE_ENSURE_EDOMH": "Ensure EDO Material Helper is installed and registered to handle edomh:// urls, else this button will do nothing!", + "PHRASE_FIREFOX_EDENGINEER": "Sending to EDEngineer is not compatible with Firefox's security settings. Please try again with Chrome.", "PHRASE_FAILED_TO_FIND_EDENGINEER": "Failed to find ED Engineer API. Please ensure it is running and try again.", "MISSING_MODULES": "Missing Modules", "am": "Auto Field-Maintenance Unit", diff --git a/src/app/pages/OutfittingPage.jsx b/src/app/pages/OutfittingPage.jsx index da012259..485a8189 100644 --- a/src/app/pages/OutfittingPage.jsx +++ b/src/app/pages/OutfittingPage.jsx @@ -700,7 +700,9 @@ export default class OutfittingPage extends Page { * Generates the shopping list */ _genShoppingList() { - this.context.showModal(); + this.context.showModal(); } /**