From 48ee1a065debde5027fc17e49144d348258dc5e4 Mon Sep 17 00:00:00 2001 From: notoraptor Date: Thu, 25 Jul 2019 10:59:36 -0400 Subject: [Web] Added game creation interface - Replaced fancybox with react-confirm-alert + dialog box - Removed unused code - Default map can be selected with 1-click - Added ability to select map variants --- diplomacy/web/src/gui/forms/select_location_form.jsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'diplomacy/web/src/gui/forms/select_location_form.jsx') diff --git a/diplomacy/web/src/gui/forms/select_location_form.jsx b/diplomacy/web/src/gui/forms/select_location_form.jsx index ca7be09..1725c9b 100644 --- a/diplomacy/web/src/gui/forms/select_location_form.jsx +++ b/diplomacy/web/src/gui/forms/select_location_form.jsx @@ -17,20 +17,27 @@ import React from "react"; import PropTypes from "prop-types"; import {Button} from "../components/button"; +import {FancyBox} from "../components/fancyBox"; export class SelectLocationForm extends React.Component { render() { + const title = `Select location to continue building order: ${this.props.path.join(' ')}`; return ( -
- {this.props.locations.map((location, index) => ( -
+ +
+ {this.props.locations.map((location, index) => ( +
+
); } } SelectLocationForm.propTypes = { locations: PropTypes.arrayOf(PropTypes.string).isRequired, - onSelect: PropTypes.func.isRequired // onSelect(location) + onSelect: PropTypes.func.isRequired, // onSelect(location) + onClose: PropTypes.func.isRequired, + path: PropTypes.array.isRequired }; -- cgit v1.2.3