mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
fix: fix rtl in mac to prevernt traffic lights overlapping
This commit is contained in:
parent
2351110f84
commit
3e1d3cee54
@ -16,7 +16,9 @@
|
||||
<h1 class="text-xl font-semibold select-none" v-if="title">
|
||||
{{ title }}
|
||||
</h1>
|
||||
<div class="flex items-stretch window-no-drag gap-2 ms-auto">
|
||||
<div
|
||||
class="flex items-stretch window-no-drag gap-2 ms-auto"
|
||||
:class="platform === 'Mac' && languageDirection === 'rtl' ? 'me-20' : ''">
|
||||
<slot />
|
||||
<div class="border-e" v-if="showBorder" />
|
||||
<BackLink v-if="backLink" class="window-no-drag rtl-rotate-180" />
|
||||
@ -28,6 +30,8 @@
|
||||
import { Transition } from 'vue';
|
||||
import BackLink from './BackLink.vue';
|
||||
import SearchBar from './SearchBar.vue';
|
||||
import { fyo } from 'src/initFyo';
|
||||
import { RTL_LANGUAGES } from 'fyo/utils/consts';
|
||||
|
||||
export default {
|
||||
inject: ['sidebar'],
|
||||
@ -43,6 +47,13 @@ export default {
|
||||
showBorder() {
|
||||
return !!this.$slots.default && this.searchborder;
|
||||
},
|
||||
languageDirection(){
|
||||
const language = fyo.config.get('language');
|
||||
const languageDirection = RTL_LANGUAGES.includes(language)
|
||||
? 'rtl'
|
||||
: 'ltr';
|
||||
return languageDirection;
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<!-- Company name and DB Switcher -->
|
||||
<div
|
||||
class="px-4 flex flex-row items-center justify-between mb-4"
|
||||
:class="platform === 'Mac' ? 'mt-10' : 'mt-2'"
|
||||
:class="platform === 'Mac' && languageDirection === 'ltr' ? 'mt-10' : 'mt-2'"
|
||||
>
|
||||
<h6
|
||||
class="
|
||||
@ -164,6 +164,7 @@ import { getSidebarConfig } from 'src/utils/sidebarConfig';
|
||||
import { docsPath, routeTo } from 'src/utils/ui';
|
||||
import router from '../router';
|
||||
import Icon from './Icon.vue';
|
||||
import { RTL_LANGUAGES } from 'fyo/utils/consts';
|
||||
|
||||
export default {
|
||||
components: [Button],
|
||||
@ -179,6 +180,13 @@ export default {
|
||||
appVersion() {
|
||||
return fyo.store.appVersion;
|
||||
},
|
||||
languageDirection(){
|
||||
const language = fyo.config.get('language');
|
||||
const languageDirection = RTL_LANGUAGES.includes(language)
|
||||
? 'rtl'
|
||||
: 'ltr';
|
||||
return languageDirection;
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Icon,
|
||||
|
Loading…
Reference in New Issue
Block a user