Skip to content

Commit

Permalink
Update isRightAligned property name to more clearly reflect rtl purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
kommunarr committed Aug 29, 2023
1 parent b8462cc commit 03648af
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/renderer/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default defineComponent({
showProgressBar: function () {
return this.$store.getters.getShowProgressBar
},
isRightAligned: function () {
isLocaleRightToLeft: function () {
return this.locale === 'ar' || this.locale === 'fa' || this.locale === 'he' ||
this.locale === 'ur' || this.locale === 'yi' || this.locale === 'ku'
},
Expand Down Expand Up @@ -510,7 +510,7 @@ export default defineComponent({

setLocale: function() {
document.documentElement.setAttribute('lang', this.locale)
if (this.isRightAligned) {
if (this.isLocaleRightToLeft) {
document.body.dir = 'rtl'
} else {
document.body.dir = 'ltr'
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
id="app"
:class="{
hideOutlines: hideOutlines,
rightAligned: isRightAligned
rightAligned: isLocaleRightToLeft
}"
>
<top-nav ref="topNav" />
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/top-nav/top-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default defineComponent({
return this.$store.getters.getCurrentLocale
},

isRightAligned: function() {
isLocaleRightToLeft: function() {
const locale = this.$i18n.locale.replace('_', '-')
return locale === 'ar' || locale === 'fa' || locale === 'he' ||
locale === 'ur' || locale === 'yi' || locale === 'ku'
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/components/top-nav/top-nav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
:aria-disabled="isArrowBackwardDisabled"
class="navIcon"
:class="{ arrowBackwardDisabled: isArrowBackwardDisabled}"
:icon="['fas', !isRightAligned ? 'arrow-left' : 'arrow-right']"
:icon="['fas', !isLocaleRightToLeft ? 'arrow-left' : 'arrow-right']"
role="button"
tabindex="0"
:title="backwardText"
Expand All @@ -28,7 +28,7 @@
:aria-disabled="isArrowForwardDisabled"
class="navIcon"
:class="{ arrowForwardDisabled: isArrowForwardDisabled}"
:icon="['fas', !isRightAligned ? 'arrow-right' : 'arrow-left']"
:icon="['fas', !isLocaleRightToLeft ? 'arrow-right' : 'arrow-left']"
role="button"
tabindex="0"
:title="forwardText"
Expand Down

0 comments on commit 03648af

Please sign in to comment.