projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TODO: finish draw offer logic + fix inCheck bug (no highlight)
[vchess.git]
/
client
/
src
/
components
/
Settings.vue
diff --git
a/client/src/components/Settings.vue
b/client/src/components/Settings.vue
index
003dc15
..
b9a2b63
100644
(file)
--- a/
client/src/components/Settings.vue
+++ b/
client/src/components/Settings.vue
@@
-39,9
+39,12
@@
export default {
updateSettings: function(event) {
const propName =
event.target.id.substr(3).replace(/^\w/, c => c.toLowerCase())
updateSettings: function(event) {
const propName =
event.target.id.substr(3).replace(/^\w/, c => c.toLowerCase())
- l
ocalStorage[propName] =
["bcolor","sound"].includes(propName)
+ l
et value = (
["bcolor","sound"].includes(propName)
? event.target.value
? event.target.value
- : event.target.checked;
+ : event.target.checked);
+ if (propName == "sound")
+ value = parseInt(value);
+ store.updateSetting(propName, value);
},
},
};
},
},
};