summaryrefslogtreecommitdiff
path: root/src/client/app/common/views/components
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-05-21 02:13:39 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-05-21 02:13:39 +0900
commit42c811a5234b36938aba1e0ab988df0c055bdcbb (patch)
tree5352c81eee754206d4b20f440145b3a88e227844 /src/client/app/common/views/components
parentMerge pull request #1617 from syuilo/l10n_master (diff)
downloadmisskey-42c811a5234b36938aba1e0ab988df0c055bdcbb.tar.gz
misskey-42c811a5234b36938aba1e0ab988df0c055bdcbb.tar.bz2
misskey-42c811a5234b36938aba1e0ab988df0c055bdcbb.zip
Refactor
Diffstat (limited to 'src/client/app/common/views/components')
-rw-r--r--src/client/app/common/views/components/avatar.vue2
-rw-r--r--src/client/app/common/views/components/messaging-room.vue4
-rw-r--r--src/client/app/common/views/components/othello.game.vue8
3 files changed, 7 insertions, 7 deletions
diff --git a/src/client/app/common/views/components/avatar.vue b/src/client/app/common/views/components/avatar.vue
index 8cc72fb518..6b407ccc80 100644
--- a/src/client/app/common/views/components/avatar.vue
+++ b/src/client/app/common/views/components/avatar.vue
@@ -22,7 +22,7 @@ export default Vue.extend({
},
computed: {
lightmode(): boolean {
- return localStorage.getItem('lightmode') == 'true';
+ return this.$store.state.device.lightmode;
},
style(): any {
return {
diff --git a/src/client/app/common/views/components/messaging-room.vue b/src/client/app/common/views/components/messaging-room.vue
index 330834233a..7832a331df 100644
--- a/src/client/app/common/views/components/messaging-room.vue
+++ b/src/client/app/common/views/components/messaging-room.vue
@@ -149,9 +149,9 @@ export default Vue.extend({
onMessage(message) {
// サウンドを再生する
- if ((this as any).os.isEnableSounds) {
+ if (this.$store.state.device.enableSounds) {
const sound = new Audio(`${url}/assets/message.mp3`);
- sound.volume = localStorage.getItem('soundVolume') ? parseInt(localStorage.getItem('soundVolume'), 10) / 100 : 0.5;
+ sound.volume = this.$store.state.device.soundVolume;
sound.play();
}
diff --git a/src/client/app/common/views/components/othello.game.vue b/src/client/app/common/views/components/othello.game.vue
index 8c646cce07..ea75558d10 100644
--- a/src/client/app/common/views/components/othello.game.vue
+++ b/src/client/app/common/views/components/othello.game.vue
@@ -162,9 +162,9 @@ export default Vue.extend({
this.o.put(this.myColor, pos);
// サウンドを再生する
- if ((this as any).os.isEnableSounds) {
+ if (this.$store.state.device.enableSounds) {
const sound = new Audio(`${url}/assets/othello-put-me.mp3`);
- sound.volume = localStorage.getItem('soundVolume') ? parseInt(localStorage.getItem('soundVolume'), 10) / 100 : 0.5;
+ sound.volume = this.$store.state.device.soundVolume;
sound.play();
}
@@ -186,9 +186,9 @@ export default Vue.extend({
this.$forceUpdate();
// サウンドを再生する
- if ((this as any).os.isEnableSounds && x.color != this.myColor) {
+ if (this.$store.state.device.enableSounds && x.color != this.myColor) {
const sound = new Audio(`${url}/assets/othello-put-you.mp3`);
- sound.volume = localStorage.getItem('soundVolume') ? parseInt(localStorage.getItem('soundVolume'), 10) / 100 : 0.5;
+ sound.volume = this.$store.state.device.soundVolume;
sound.play();
}
},