diff --git a/public/content/task_list.md b/public/content/task_list.md new file mode 100644 index 0000000..e50af2e --- /dev/null +++ b/public/content/task_list.md @@ -0,0 +1,20 @@ +Major +--- + +* Spies have no use right now. +* Game instructions on the profile page. +* Timers for count downs. + +Minor +--- + +* Attack button isn't being disabled with no soldiers. +* Better combat log. +* Game Ladder sorting. +* Badges. + +Patch +--- + +* Game Balance. + diff --git a/public/styles/shared.css b/public/styles/shared.css index 089a92d..23016f9 100644 --- a/public/styles/shared.css +++ b/public/styles/shared.css @@ -272,6 +272,7 @@ footer { /* bits and pieces */ .logoutButton { align-self: stretch; + margin-bottom: .5rem; } .newsLine { diff --git a/server/index.js b/server/index.js index 8ae518b..1f1d544 100644 --- a/server/index.js +++ b/server/index.js @@ -53,8 +53,9 @@ app.post('/equipmentpurchaserequest', equipment.purchaseRequest(connection)); app.post('/equipmentsellrequest', equipment.sellRequest(connection)); //static directories -app.use('/styles', express.static(path.resolve(__dirname + '/../public/styles')) ); +app.use('/content', express.static(path.resolve(__dirname + '/../public/content')) ); app.use('/img', express.static(path.resolve(__dirname + '/../public/img')) ); +app.use('/styles', express.static(path.resolve(__dirname + '/../public/styles')) ); //the app file(s) app.get('/*app.bundle.js', (req, res) => { diff --git a/src/components/app.jsx b/src/components/app.jsx index 3bb35ae..af1f96d 100644 --- a/src/components/app.jsx +++ b/src/components/app.jsx @@ -71,6 +71,8 @@ export default class App extends React.Component { import('./pages/combat_log.jsx')} /> import('./pages/equipment.jsx')} /> + import('./pages/task_list.jsx')} /> + import('./pages/page_not_found.jsx')} /> diff --git a/src/components/pages/task_list.jsx b/src/components/pages/task_list.jsx new file mode 100644 index 0000000..8c3c3a9 --- /dev/null +++ b/src/components/pages/task_list.jsx @@ -0,0 +1,68 @@ +import React from 'react'; +import ReactMarkdown from 'react-markdown/with-html'; + +//panels +import CommonLinks from '../panels/common_links.jsx'; + +class TaskList extends React.Component { + constructor(props) { + super(props); + this.state = { + data: '', + warning: '' + }; + + this.sendRequest('/content/task_list.md'); + } + + render() { + let warningStyle = { + display: this.state.warning.length > 0 ? 'flex' : 'none' + }; + + return ( +
+
+
+ +
+ +
+
+

{this.state.warning}

+
+ +

Kingdom Battles Developer Task List

+ {this.state ? :

Loading task list...

} +
+
+
+ ); + } + + sendRequest(url, args = {}) { + //build the XHR + let xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + + xhr.onreadystatechange = () => { + if (xhr.readyState === 4) { + if (xhr.status === 200) { + //on success + this.setState({ data: xhr.responseText }); + } + else { + this.setWarning(xhr.responseText); + } + } + }; + + xhr.send(); + } + + setWarning(s) { + this.setState({ warning: s }); + } +}; + +export default TaskList; \ No newline at end of file diff --git a/src/components/panels/common_links.jsx b/src/components/panels/common_links.jsx index 6179c04..a2b935b 100644 --- a/src/components/panels/common_links.jsx +++ b/src/components/panels/common_links.jsx @@ -34,6 +34,7 @@ class CommonLinks extends React.Component {

Game Ladder

Combat Log

Change Password

+

Task List

@@ -48,6 +49,7 @@ class CommonLinks extends React.Component {

Login

Recover Password

Game Ladder

+

Task List

@@ -65,7 +67,8 @@ CommonLinks.propTypes = { onClickHome: PropTypes.func, onClickProfile: PropTypes.func, onClickLadder: PropTypes.func, - onClickPasswordChange: PropTypes.func + onClickPasswordChange: PropTypes.func, + onClickTaskList: PropTypes.func }; function mapStoreToProps(store) {