aboutsummaryrefslogtreecommitdiff
path: root/diplomacy/web/src/gui/forms/select_via_form.jsx
diff options
context:
space:
mode:
authornotoraptor <stevenbocco@gmail.com>2019-07-25 10:59:36 -0400
committerPhilip Paquette <pcpaquette@gmail.com>2019-07-25 11:15:59 -0400
commit48ee1a065debde5027fc17e49144d348258dc5e4 (patch)
treeb85be5b31a61ad911a89789c2089eaf7852ad4d9 /diplomacy/web/src/gui/forms/select_via_form.jsx
parent09f9589bfa1a9e19805c2cc7dc58cad4da93f17f (diff)
[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
Diffstat (limited to 'diplomacy/web/src/gui/forms/select_via_form.jsx')
-rw-r--r--diplomacy/web/src/gui/forms/select_via_form.jsx16
1 files changed, 11 insertions, 5 deletions
diff --git a/diplomacy/web/src/gui/forms/select_via_form.jsx b/diplomacy/web/src/gui/forms/select_via_form.jsx
index b779b8d..8b340af 100644
--- a/diplomacy/web/src/gui/forms/select_via_form.jsx
+++ b/diplomacy/web/src/gui/forms/select_via_form.jsx
@@ -17,19 +17,25 @@
import React from "react";
import PropTypes from "prop-types";
import {Button} from "../components/button";
+import {FancyBox} from "../components/fancyBox";
export class SelectViaForm extends React.Component {
render() {
return (
- <div>
- <Button title={'regular move (M)'} large={true} onClick={() => this.props.onSelect('M')}/>
- <Button title={'move via (V)'} large={true} onClick={() => this.props.onSelect('V')}/>
- </div>
+ <FancyBox title={`Select move type for move order: ${this.props.path.join(' ')}`}
+ onClose={this.props.onClose}>
+ <div>
+ <Button title={'regular move (M)'} large={true} onClick={() => this.props.onSelect('M')}/>
+ <Button title={'move via (V)'} large={true} onClick={() => this.props.onSelect('V')}/>
+ </div>
+ </FancyBox>
);
}
}
SelectViaForm.propTypes = {
- onSelect: PropTypes.func.isRequired
+ path: PropTypes.array.isRequired,
+ onSelect: PropTypes.func.isRequired,
+ onClose: PropTypes.func.isRequired
};