mirror of
https://github.com/romancm/gamebrary
synced 2025-02-25 11:17:10 +00:00
improve right to left ui
This commit is contained in:
parent
ca0ac6c99b
commit
04ee1c78a3
4 changed files with 8 additions and 4 deletions
|
@ -9,11 +9,10 @@
|
||||||
v-if="game && game.name"
|
v-if="game && game.name"
|
||||||
>
|
>
|
||||||
<b-col cols="4">
|
<b-col cols="4">
|
||||||
<!-- TODO: handle rtl -->
|
|
||||||
<b-img
|
<b-img
|
||||||
fluid
|
fluid
|
||||||
blank-color="#ccc"
|
blank-color="#ccc"
|
||||||
rounded="left"
|
:rounded="isRTL ? 'left' : 'right'"
|
||||||
:src="coverUrl"
|
:src="coverUrl"
|
||||||
:alt="game.name"
|
:alt="game.name"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
title="Sidebar"
|
title="Sidebar"
|
||||||
shadow
|
shadow
|
||||||
backdrop
|
backdrop
|
||||||
|
:right="!isRTL"
|
||||||
bg-variant="dark"
|
bg-variant="dark"
|
||||||
text-variant="white"
|
text-variant="white"
|
||||||
header-class="px-2 pt-2 d-flex align-items-center justify-content-between"
|
header-class="px-2 pt-2 d-flex align-items-center justify-content-between"
|
||||||
|
@ -133,7 +134,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex';
|
import { mapState, mapGetters } from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
@ -189,6 +190,7 @@ export default {
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['user', 'profile']),
|
...mapState(['user', 'profile']),
|
||||||
|
...mapGetters(['isRTL']),
|
||||||
|
|
||||||
dev() {
|
dev() {
|
||||||
return process.env.NODE_ENV === 'development';
|
return process.env.NODE_ENV === 'development';
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default {
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['settings', 'games', 'tags', 'notes', 'progresses', 'board']),
|
...mapState(['settings', 'games', 'tags', 'notes', 'progresses', 'board']),
|
||||||
...mapGetters(['gameTags']),
|
...mapGetters(['gameTags', 'isRTL']),
|
||||||
|
|
||||||
highlightCompletedGame() {
|
highlightCompletedGame() {
|
||||||
return this.gameProgress && Number(this.gameProgress) === 100;
|
return this.gameProgress && Number(this.gameProgress) === 100;
|
||||||
|
|
|
@ -20,6 +20,9 @@ export default {
|
||||||
return boardOwner === userId;
|
return boardOwner === userId;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Arabic is the only ltr language supported at the moment
|
||||||
|
isRTL: ({ settings }) => settings && settings.language !== 'ar',
|
||||||
|
|
||||||
platformNames: (state) => {
|
platformNames: (state) => {
|
||||||
const formattedPlatforms = {};
|
const formattedPlatforms = {};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue