Change text direction if arabic is selected

This commit is contained in:
romancm 2019-06-19 07:58:31 -07:00
parent 222b786818
commit ad548d2361

View file

@ -3,6 +3,7 @@
id="app" id="app"
:class="{ dark: darkModeEnabled }" :class="{ dark: darkModeEnabled }"
:style="style" :style="style"
:dir="dir"
> >
<nav-header /> <nav-header />
@ -52,6 +53,12 @@ export default {
...mapState(['user', 'platform', 'wallpaperUrl', 'settings']), ...mapState(['user', 'platform', 'wallpaperUrl', 'settings']),
...mapGetters(['darkModeEnabled']), ...mapGetters(['darkModeEnabled']),
dir() {
return this.settings && this.settings.language === 'ar'
? 'rtl'
: 'ltr';
},
isPublic() { isPublic() {
return this.$route.name === 'share-list'; return this.$route.name === 'share-list';
}, },