0
0
This commit is contained in:
syuilo 2019-06-07 20:34:05 +09:00
parent c227641d50
commit 81fadfa4ff
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
3 changed files with 11 additions and 15 deletions

View File

@ -23,11 +23,11 @@
</div> </div>
<div class="board"> <div class="board">
<div class="labels-x" v-if="this.$store.state.settings.games.reversi.showBoardLabels"> <div class="labels-x" v-if="$store.state.settings.gamesReversiShowBoardLabels">
<span v-for="i in game.map[0].length">{{ String.fromCharCode(64 + i) }}</span> <span v-for="i in game.map[0].length">{{ String.fromCharCode(64 + i) }}</span>
</div> </div>
<div class="flex"> <div class="flex">
<div class="labels-y" v-if="this.$store.state.settings.games.reversi.showBoardLabels"> <div class="labels-y" v-if="$store.state.settings.gamesReversiShowBoardLabels">
<div v-for="i in game.map.length">{{ i }}</div> <div v-for="i in game.map.length">{{ i }}</div>
</div> </div>
<div class="cells" :style="cellsStyle"> <div class="cells" :style="cellsStyle">
@ -35,7 +35,7 @@
:class="{ empty: stone == null, none: o.map[i] == 'null', isEnded: game.isEnded, myTurn: !game.isEnded && isMyTurn, can: turnUser ? o.canPut(turnUser.id == blackUser.id, i) : null, prev: o.prevPos == i }" :class="{ empty: stone == null, none: o.map[i] == 'null', isEnded: game.isEnded, myTurn: !game.isEnded && isMyTurn, can: turnUser ? o.canPut(turnUser.id == blackUser.id, i) : null, prev: o.prevPos == i }"
@click="set(i)" @click="set(i)"
:title="`${String.fromCharCode(65 + o.transformPosToXy(i)[0])}${o.transformPosToXy(i)[1] + 1}`"> :title="`${String.fromCharCode(65 + o.transformPosToXy(i)[0])}${o.transformPosToXy(i)[1] + 1}`">
<template v-if="$store.state.settings.games.reversi.useAvatarStones"> <template v-if="$store.state.settings.gamesReversiUseAvatarStones">
<img v-if="stone === true" :src="blackUser.avatarUrl" alt="black"> <img v-if="stone === true" :src="blackUser.avatarUrl" alt="black">
<img v-if="stone === false" :src="whiteUser.avatarUrl" alt="white"> <img v-if="stone === false" :src="whiteUser.avatarUrl" alt="white">
</template> </template>
@ -45,11 +45,11 @@
</template> </template>
</div> </div>
</div> </div>
<div class="labels-y" v-if="this.$store.state.settings.games.reversi.showBoardLabels"> <div class="labels-y" v-if="this.$store.state.settings.gamesReversiShowBoardLabels">
<div v-for="i in game.map.length">{{ i }}</div> <div v-for="i in game.map.length">{{ i }}</div>
</div> </div>
</div> </div>
<div class="labels-x" v-if="this.$store.state.settings.games.reversi.showBoardLabels"> <div class="labels-x" v-if="this.$store.state.settings.gamesReversiShowBoardLabels">
<span v-for="i in game.map[0].length">{{ String.fromCharCode(64 + i) }}</span> <span v-for="i in game.map[0].length">{{ String.fromCharCode(64 + i) }}</span>
</div> </div>
</div> </div>

View File

@ -472,13 +472,13 @@ export default Vue.extend({
}, },
games_reversi_showBoardLabels: { games_reversi_showBoardLabels: {
get() { return this.$store.state.settings.games.reversi.showBoardLabels; }, get() { return this.$store.state.settings.gamesReversiShowBoardLabels; },
set(value) { this.$store.dispatch('settings/set', { key: 'games.reversi.showBoardLabels', value }); } set(value) { this.$store.dispatch('settings/set', { key: 'gamesReversiShowBoardLabels', value }); }
}, },
games_reversi_useAvatarStones: { games_reversi_useAvatarStones: {
get() { return this.$store.state.settings.games.reversi.useAvatarStones; }, get() { return this.$store.state.settings.gamesReversiUseAvatarStones; },
set(value) { this.$store.dispatch('settings/set', { key: 'games.reversi.useAvatarStones', value }); } set(value) { this.$store.dispatch('settings/set', { key: 'gamesReversiUseAvatarStones', value }); }
}, },
disableAnimatedMfm: { disableAnimatedMfm: {

View File

@ -31,12 +31,8 @@ const defaultSettings = {
wallpaper: null, wallpaper: null,
webSearchEngine: 'https://www.google.com/?#q={{query}}', webSearchEngine: 'https://www.google.com/?#q={{query}}',
mutedWords: [], mutedWords: [],
games: { gamesReversiShowBoardLabels: false,
reversi: { gamesReversiUseAvatarStones: true,
showBoardLabels: false,
useAvatarStones: true,
}
}
}; };
const defaultDeviceSettings = { const defaultDeviceSettings = {