3 input#modalSettings.modal(type="checkbox")
4 div(role="dialog" data-checkbox="modalSettings")
5 .card(@change="updateSettings($event)")
6 label.modal-close(for="modalSettings")
7 h3.section {{ st.tr["Settings"] }}
10 label(for="setHints") {{ st.tr["Show possible moves?"] }}
11 input#setHints(type="checkbox" v-model="st.settings.hints")
13 label(for="setHighlight")
14 | {{ st.tr["Highlight last move and checks?"] }}
15 input#setHighlight(type="checkbox" v-model="st.settings.highlight")
17 label(for="setBcolor") {{ st.tr["Board colors"] }}
18 select#setBcolor(v-model="st.settings.bcolor")
19 option(value="lichess") {{ st.tr["brown"] }}
20 option(value="chesscom") {{ st.tr["green"] }}
21 option(value="chesstempo") {{ st.tr["blue"] }}
23 label(for="setSound") {{ st.tr["Play sounds?"] }}
24 select#setSound(v-model="st.settings.sound")
25 option(value="0") {{ st.tr["None"] }}
26 option(value="1") {{ st.tr["New game"] }}
27 option(value="2") {{ st.tr["All"] }}
31 import { store } from "@/store.js";
40 updateSettings: function(event) {
42 event.target.id.substr(3).replace(/^\w/, c => c.toLowerCase())
43 let value = (["bcolor","sound"].includes(propName)
45 : event.target.checked);
46 if (propName == "sound")
47 value = parseInt(value);
48 store.updateSetting(propName, value);
54 <style lang="sass" scoped>
55 [type="checkbox"].modal+div .card