Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[next] fix(NcAppDetailsToggle): Rtl support #6160

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/components/NcAppContent/NcAppDetailsToggle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
class="app-details-toggle"
:class="{ 'app-details-toggle--mobile': isMobile }">
<template #icon>
<ArrowRight :size="20" />
<ArrowLeft v-if="isRTL" :size="20" />
<ArrowRight v-else :size="20" />
</template>
</NcButton>
</template>
Expand All @@ -23,7 +24,10 @@ import Tooltip from '../../directives/Tooltip/index.js'
import { emit } from '@nextcloud/event-bus'

import ArrowRight from 'vue-material-design-icons/ArrowRight.vue'
import ArrowLeft from 'vue-material-design-icons/ArrowLeft.vue'

import { useIsMobile } from '../../composables/useIsMobile/index.js'
import { isRTL } from '@nextcloud/l10n'

export default {
name: 'NcAppDetailsToggle',
Expand All @@ -35,9 +39,11 @@ export default {
components: {
NcButton,
ArrowRight,
ArrowLeft,
},
setup() {
return {
isRTL: isRTL(),
isMobile: useIsMobile(),
}
},
Expand Down Expand Up @@ -92,10 +98,10 @@ export default {

top: var(--app-navigation-padding);
// Navigation Toggle button width + 2 paddings around
left: calc(var(--default-clickable-area) + var(--app-navigation-padding) * 2);
inset-inline-start: calc(var(--default-clickable-area) + var(--app-navigation-padding) * 2);
&--mobile {
// There is no NavigationToggle button
left: var(--app-navigation-padding);
inset-inline-start: var(--app-navigation-padding);
}

&:active,
Expand Down
Loading