diff --git a/viewer/babel.config.js b/viewer/babel.config.js index 218963b..9b3fbbf 100644 --- a/viewer/babel.config.js +++ b/viewer/babel.config.js @@ -1,3 +1,11 @@ module.exports = { - presets: ['@vue/cli-plugin-babel/preset'], + // Webpack 4 cannot parse these forms even when modern browsers support them. + presets: [ + [ + '@vue/cli-plugin-babel/preset', + { + include: ['@babel/plugin-transform-numeric-separator', '@babel/plugin-transform-export-namespace-from'], + }, + ], + ], }; diff --git a/viewer/package.json b/viewer/package.json index d4998ee..a4cc50e 100644 --- a/viewer/package.json +++ b/viewer/package.json @@ -1,6 +1,6 @@ { "name": "powergrid-viewer", - "version": "2.3.4", + "version": "2.3.5", "repository": { "type": "git", "url": "git+https://github.com/boardgamers/powergrid.git", diff --git a/viewer/src/components/Calculator.vue b/viewer/src/components/Calculator.vue index dc4eb4e..8310e22 100644 --- a/viewer/src/components/Calculator.vue +++ b/viewer/src/components/Calculator.vue @@ -22,7 +22,7 @@ import { Vue, Component, Prop, Watch } from 'vue-property-decorator'; @Component({ created(this: Calculator) { - this.value = this.minValue; + this.value = Math.min(this.maxValue, Math.max(this.minValue, this.initialValue ?? this.minValue)); }, }) export default class Calculator extends Vue { @@ -32,6 +32,8 @@ export default class Calculator extends Vue { @Prop() maxValue; + @Prop() initialValue?: number; + value: number = 0; // The legal floor can rise while the calculator is open (e.g. a rival bid in a diff --git a/viewer/src/components/Game.vue b/viewer/src/components/Game.vue index aeba16c..7162fa1 100644 --- a/viewer/src/components/Game.vue +++ b/viewer/src/components/Game.vue @@ -4,29 +4,6 @@
{{ getStatusMessage() }}
-
- - -
0; if (!this.canMove()) return false; const currentPlayer = this.G!.players[this.player!]; @@ -3121,38 +3145,6 @@ export default class Game extends Vue { }