projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add unambiguous section in the PGN + some fixes + code formatting and fix typos
[vchess.git]
/
client
/
src
/
components
/
Settings.vue
diff --git
a/client/src/components/Settings.vue
b/client/src/components/Settings.vue
index
6adf9b0
..
d2194da
100644
(file)
--- a/
client/src/components/Settings.vue
+++ b/
client/src/components/Settings.vue
@@
-1,7
+1,7
@@
<template lang="pug">
div
input#modalSettings.modal(type="checkbox")
<template lang="pug">
div
input#modalSettings.modal(type="checkbox")
- div(
+ div
#settingsDiv
(
role="dialog"
data-checkbox="modalSettings"
)
role="dialog"
data-checkbox="modalSettings"
)
@@
-27,14
+27,14
@@
div
)
div(@change="updateSettings($event)")
fieldset
)
div(@change="updateSettings($event)")
fieldset
- label(for="setHints") {{ st.tr["Show possible moves
?
"] }}
+ label(for="setHints") {{ st.tr["Show possible moves"] }}
input#setHints(
type="checkbox"
v-model="st.settings.hints"
)
fieldset
label(for="setHighlight")
input#setHints(
type="checkbox"
v-model="st.settings.hints"
)
fieldset
label(for="setHighlight")
- | {{ st.tr["Highlight last move
and checks?
"] }}
+ | {{ st.tr["Highlight last move"] }}
input#setHighlight(
type="checkbox"
v-model="st.settings.highlight"
input#setHighlight(
type="checkbox"
v-model="st.settings.highlight"
@@
-47,13
+47,20
@@
div
option(value="chesstempo") {{ st.tr["blue"] }}
fieldset
label(for="setSound")
option(value="chesstempo") {{ st.tr["blue"] }}
fieldset
label(for="setSound")
- | {{ st.tr["Sound alert
when game starts?
"] }}
+ | {{ st.tr["Sound alert
at game start
"] }}
input#setSound(
type="checkbox"
v-model="st.settings.sound"
)
fieldset
input#setSound(
type="checkbox"
v-model="st.settings.sound"
)
fieldset
- label(for="setRandomness") {{ st.tr["Randomness against computer"] }}
+ label(for="setGotonext")
+ | {{ st.tr["Show next game after a move"] }}
+ input#setGotonext(
+ type="checkbox"
+ v-model="st.settings.gotonext"
+ )
+ fieldset
+ label(for="setRandomness") {{ st.tr["Randomness"] }}
select#setRandomness(v-model="st.settings.randomness")
option(value="0") {{ st.tr["Deterministic"] }}
option(value="1") {{ st.tr["Symmetric random"] }}
select#setRandomness(v-model="st.settings.randomness")
option(value="0") {{ st.tr["Deterministic"] }}
option(value="1") {{ st.tr["Symmetric random"] }}
@@
-62,6
+69,7
@@
div
<script>
import { store } from "@/store.js";
<script>
import { store } from "@/store.js";
+import { processModalClick } from "@/utils/modalClick.js";
export default {
name: "my-settings",
data: function() {
export default {
name: "my-settings",
data: function() {
@@
-70,6
+78,8
@@
export default {
};
},
mounted: function() {
};
},
mounted: function() {
+ document.getElementById("settingsDiv")
+ .addEventListener("click", processModalClick);
// NOTE: better style would be in pug directly, but how?
document.querySelectorAll("#langSelect > option").forEach(opt => {
if (opt.value == this.st.lang) opt.selected = true;
// NOTE: better style would be in pug directly, but how?
document.querySelectorAll("#langSelect > option").forEach(opt => {
if (opt.value == this.st.lang) opt.selected = true;
@@
-100,7
+110,7
@@
export default {
<style lang="sass" scoped>
[type="checkbox"].modal+div .card
<style lang="sass" scoped>
[type="checkbox"].modal+div .card
- max-width:
767
px
+ max-width:
520
px
max-height: 100%
#flagContainer
display: inline-block
max-height: 100%
#flagContainer
display: inline-block