Fix misleading data in WebUI. Server Version is now called ClientVersion
This commit is contained in:
parent
ae0a6362a6
commit
c11fe9cb51
2
WebUI.py
2
WebUI.py
|
@ -108,7 +108,7 @@ class WebUiClient(Node):
|
||||||
|
|
||||||
def send_game_info(self, ctx: Context):
|
def send_game_info(self, ctx: Context):
|
||||||
self.broadcast_all(self.build_message('gameInfo', {
|
self.broadcast_all(self.build_message('gameInfo', {
|
||||||
'serverVersion': Utils.__version__,
|
'clientVersion': Utils.__version__,
|
||||||
'hintCost': ctx.hint_cost,
|
'hintCost': ctx.hint_cost,
|
||||||
'checkPoints': ctx.check_points,
|
'checkPoints': ctx.check_points,
|
||||||
'forfeitMode': ctx.forfeit_mode,
|
'forfeitMode': ctx.forfeit_mode,
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,7 +3,7 @@ import { connect } from 'react-redux';
|
||||||
import '../../../styles/WidgetArea/containers/WidgetArea.scss';
|
import '../../../styles/WidgetArea/containers/WidgetArea.scss';
|
||||||
|
|
||||||
const mapReduxStateToProps = (reduxState) => ({
|
const mapReduxStateToProps = (reduxState) => ({
|
||||||
serverVersion: reduxState.gameState.serverVersion,
|
clientVersion: reduxState.gameState.clientVersion,
|
||||||
forfeitMode: reduxState.gameState.forfeitMode,
|
forfeitMode: reduxState.gameState.forfeitMode,
|
||||||
remainingMode: reduxState.gameState.remainingMode,
|
remainingMode: reduxState.gameState.remainingMode,
|
||||||
hintCost: reduxState.gameState.hintCost,
|
hintCost: reduxState.gameState.hintCost,
|
||||||
|
@ -49,8 +49,8 @@ class WidgetArea extends Component {
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Server Version:</th>
|
<th>Client Version:</th>
|
||||||
<td>{this.props.serverVersion}</td>
|
<td>{this.props.clientVersion}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Forfeit Mode:</th>
|
<th>Forfeit Mode:</th>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import _assign from 'lodash-es/assign';
|
import _assign from 'lodash-es/assign';
|
||||||
|
|
||||||
const initialState = {
|
const initialState = {
|
||||||
serverVersion: null,
|
clientVersion: null,
|
||||||
forfeitMode: null,
|
forfeitMode: null,
|
||||||
remainingMode: null,
|
remainingMode: null,
|
||||||
connections: {
|
connections: {
|
||||||
|
|
|
@ -62,7 +62,7 @@ class WebSocketUtils {
|
||||||
|
|
||||||
case 'gameInfo':
|
case 'gameInfo':
|
||||||
return updateGameState({
|
return updateGameState({
|
||||||
serverVersion: data.content.serverVersion,
|
clientVersion: data.content.clientVersion,
|
||||||
forfeitMode: data.content.forfeitMode,
|
forfeitMode: data.content.forfeitMode,
|
||||||
remainingMode: data.content.remainingMode,
|
remainingMode: data.content.remainingMode,
|
||||||
hintCost: parseInt(data.content.hintCost, 10),
|
hintCost: parseInt(data.content.hintCost, 10),
|
||||||
|
|
Loading…
Reference in New Issue