3 input#modalSettings.modal(type="checkbox")
6 data-checkbox="modalSettings"
8 .card(@change="updateSettings($event)")
9 label.modal-close(for="modalSettings")
12 label(for="setHints") {{ st.tr["Show possible moves?"] }}
15 v-model="st.settings.hints"
18 label(for="setHighlight")
19 | {{ st.tr["Highlight last move and checks?"] }}
22 v-model="st.settings.highlight"
25 label(for="setBcolor") {{ st.tr["Board colors"] }}
26 select#setBcolor(v-model="st.settings.bcolor")
27 option(value="lichess") {{ st.tr["brown"] }}
28 option(value="chesscom") {{ st.tr["green"] }}
29 option(value="chesstempo") {{ st.tr["blue"] }}
31 label(for="setSound") {{ st.tr["Play sounds?"] }}
32 select#setSound(v-model="st.settings.sound")
33 option(value="0") {{ st.tr["None"] }}
34 option(value="1") {{ st.tr["New game"] }}
35 option(value="2") {{ st.tr["All"] }}
39 import { store } from "@/store.js";
48 updateSettings: function(event) {
49 const propName = event.target.id
51 .replace(/^\w/, c => c.toLowerCase());
52 let value = ["bcolor", "sound"].includes(propName)
54 : event.target.checked;
55 if (propName == "sound") value = parseInt(value);
56 store.updateSetting(propName, value);
62 <style lang="sass" scoped>
63 [type="checkbox"].modal+div .card