Fix misleading data in WebUI. Server Version is now called ClientVersion

This commit is contained in:
Chris Wilson 2020-09-13 00:39:52 -04:00
parent ae0a6362a6
commit c11fe9cb51
5 changed files with 7 additions and 7 deletions

View File

@ -108,7 +108,7 @@ class WebUiClient(Node):
def send_game_info(self, ctx: Context):
self.broadcast_all(self.build_message('gameInfo', {
'serverVersion': Utils.__version__,
'clientVersion': Utils.__version__,
'hintCost': ctx.hint_cost,
'checkPoints': ctx.check_points,
'forfeitMode': ctx.forfeit_mode,

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@ import { connect } from 'react-redux';
import '../../../styles/WidgetArea/containers/WidgetArea.scss';
const mapReduxStateToProps = (reduxState) => ({
serverVersion: reduxState.gameState.serverVersion,
clientVersion: reduxState.gameState.clientVersion,
forfeitMode: reduxState.gameState.forfeitMode,
remainingMode: reduxState.gameState.remainingMode,
hintCost: reduxState.gameState.hintCost,
@ -49,8 +49,8 @@ class WidgetArea extends Component {
<table>
<tbody>
<tr>
<th>Server Version:</th>
<td>{this.props.serverVersion}</td>
<th>Client Version:</th>
<td>{this.props.clientVersion}</td>
</tr>
<tr>
<th>Forfeit Mode:</th>

View File

@ -1,7 +1,7 @@
import _assign from 'lodash-es/assign';
const initialState = {
serverVersion: null,
clientVersion: null,
forfeitMode: null,
remainingMode: null,
connections: {

View File

@ -62,7 +62,7 @@ class WebSocketUtils {
case 'gameInfo':
return updateGameState({
serverVersion: data.content.serverVersion,
clientVersion: data.content.clientVersion,
forfeitMode: data.content.forfeitMode,
remainingMode: data.content.remainingMode,
hintCost: parseInt(data.content.hintCost, 10),