diff --git a/public/content/task_list.md b/public/content/task_list.md index 7d34438..687f16e 100644 --- a/public/content/task_list.md +++ b/public/content/task_list.md @@ -5,6 +5,8 @@ Major * Write the instructions for badges. * Implement countdown timers for combat and training. * Implement referral links. +* Implement admin panel / stats page. +* Implement bug tracker. Minor --- @@ -20,6 +22,7 @@ Patch * Game Balance. * Images to social media instead of links. +* Occasional flickering when rendering Profile page. Potential And Confirmed Bugs --- diff --git a/src/components/pages/spying_log.jsx b/src/components/pages/spying_log.jsx index 3b695ff..ec763c3 100644 --- a/src/components/pages/spying_log.jsx +++ b/src/components/pages/spying_log.jsx @@ -22,7 +22,6 @@ class SpyingLog extends React.Component { length: parseInt(params.length) || 20, fetch: null, - buttonsVisible: false, warning: '' }; @@ -84,10 +83,6 @@ class SpyingLog extends React.Component { } buttonHeader() { - if (!this.buttonsVisible && this.props.spies <= 0) { - return null; - } -//TODO: prettier messages return (
@@ -151,8 +146,6 @@ class SpyingLog extends React.Component { } onReceived(data) { - this.setState({ buttonsVisible: data.length > 0 }); - if (data.length === 0) { let start = Math.max(0, this.state.start - this.state.length); diff --git a/src/components/panels/equipment.jsx b/src/components/panels/equipment.jsx index 2a4e621..1698171 100644 --- a/src/components/panels/equipment.jsx +++ b/src/components/panels/equipment.jsx @@ -32,17 +32,16 @@ class Equipment extends React.Component { return (
-
+

Name

Type

Boost

Owned

-

Buy

-

Sell

+

Buy

+

Sell


-
{Object.keys(display).map((key) =>

@@ -50,12 +49,12 @@ class Equipment extends React.Component {

{display[key].name}

{display[key].type}

-

{display[key].combatBoost * 100}%

-

{display[key].owned}

+

+{display[key].combatBoost * 100}%

+

Owned: {display[key].owned}

- {display[key].purchasable ? :
} - {display[key].saleable ? :
} + {display[key].purchasable ? :
} + {display[key].saleable ? :
}
@@ -77,7 +76,7 @@ class Equipment extends React.Component { let json = JSON.parse(xhr.responseText); //on success - this.setState({ data: json }); + this.setState({ data: Object.assign({}, this.state.data, json) }); if (this.props.onSuccess) { this.props.onSuccess(json); diff --git a/src/components/panels/news.jsx b/src/components/panels/news.jsx index f3a8deb..ce40a60 100644 --- a/src/components/panels/news.jsx +++ b/src/components/panels/news.jsx @@ -7,7 +7,7 @@ class News extends React.Component { super(props); this.state = { - // + //TODO: data? }; if (props.getFetch) { diff --git a/src/components/panels/paged_combat_log.jsx b/src/components/panels/paged_combat_log.jsx index f77f89d..0276bc5 100644 --- a/src/components/panels/paged_combat_log.jsx +++ b/src/components/panels/paged_combat_log.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import { withRouter, Link } from 'react-router-dom'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; @@ -18,8 +19,17 @@ class PagedCombatLog extends React.Component { } render() { + //nothing to report + if (this.state.data.length === 0) { + return ( +
+

Go and attack someone!

+
+ ); + } + return ( -
+
{Object.keys(this.state.data).map((key) => )}
); @@ -39,7 +49,7 @@ class PagedCombatLog extends React.Component { json.sort((a, b) => new Date(b.eventTime) - new Date(a.eventTime)); //on success - this.setState({ data: json }); + this.setState({ data: json }); //OVERRIDE existing data if (this.props.onReceived) { this.props.onReceived(json); @@ -88,4 +98,4 @@ const mapDispatchToProps = (dispatch) => { PagedCombatLog = connect(mapStoreToProps, mapDispatchToProps)(PagedCombatLog); -export default PagedCombatLog; \ No newline at end of file +export default withRouter(PagedCombatLog); \ No newline at end of file diff --git a/src/components/panels/paged_ladder.jsx b/src/components/panels/paged_ladder.jsx index 1181b9c..32aa023 100644 --- a/src/components/panels/paged_ladder.jsx +++ b/src/components/panels/paged_ladder.jsx @@ -6,7 +6,7 @@ class PagedLadder extends React.Component { constructor(props) { super(props); this.state = { - // + //TODO: data? } if (props.getFetch) { @@ -16,7 +16,7 @@ class PagedLadder extends React.Component { render() { return ( -
+

Username

Soldiers

diff --git a/src/components/panels/paged_spying_log.jsx b/src/components/panels/paged_spying_log.jsx index b331536..6f3a688 100644 --- a/src/components/panels/paged_spying_log.jsx +++ b/src/components/panels/paged_spying_log.jsx @@ -1,5 +1,4 @@ import React from 'react'; -import { withRouter, Link } from 'react-router-dom'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; @@ -20,17 +19,16 @@ class PagedSpyingLog extends React.Component { render() { //if there are no spies - if (this.props.spies <= 0 && this.state.data.length <= 0) { + if (this.state.data.length === 0) { return (
-

You have no spies!

-

Go and train some!

+

It's empty in here, isn't it?

); } return ( -
+
{Object.keys(this.state.data).map((key) => )}
); @@ -50,7 +48,7 @@ class PagedSpyingLog extends React.Component { json.sort((a, b) => new Date(b.eventTime) - new Date(a.eventTime)); //on success - this.setState({ data: json }); + this.setState({ data: json }); //OVERRIDE existing data if (this.props.onReceived) { this.props.onReceived(json); @@ -99,4 +97,4 @@ const mapDispatchToProps = (dispatch) => { PagedSpyingLog = connect(mapStoreToProps, mapDispatchToProps)(PagedSpyingLog); -export default withRouter(PagedSpyingLog); \ No newline at end of file +export default PagedSpyingLog; \ No newline at end of file