Skip to content

Commit 25e2f00

Browse files
committed
Fix pagination direction in RTL layout
Fixes #227
1 parent 893a438 commit 25e2f00

File tree

3 files changed

+29
-7
lines changed

3 files changed

+29
-7
lines changed

src/components.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,33 @@ declare module 'vue' {
4444
MessageItem: typeof import('./components/Apps/Chat/MessageItem.vue')['default']
4545
MicrosoftIcon: typeof import('./components/CustomIcons/MicrosoftIcon.vue')['default']
4646
NAutoComplete: typeof import('naive-ui')['NAutoComplete']
47+
NAvatar: typeof import('naive-ui')['NAvatar']
4748
Navbar: typeof import('./components/Navbar/Navbar.vue')['default']
4849
NBadge: typeof import('naive-ui')['NBadge']
4950
NBreadcrumb: typeof import('naive-ui')['NBreadcrumb']
5051
NBreadcrumbItem: typeof import('naive-ui')['NBreadcrumbItem']
5152
NButton: typeof import('naive-ui')['NButton']
53+
NCollapse: typeof import('naive-ui')['NCollapse']
54+
NCollapseItem: typeof import('naive-ui')['NCollapseItem']
5255
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
5356
NDataTable: typeof import('naive-ui')['NDataTable']
5457
NDialogProvider: typeof import('naive-ui')['NDialogProvider']
58+
NDrawer: typeof import('naive-ui')['NDrawer']
59+
NDrawerContent: typeof import('naive-ui')['NDrawerContent']
5560
NDropdown: typeof import('naive-ui')['NDropdown']
5661
NEmpty: typeof import('naive-ui')['NEmpty']
5762
NForm: typeof import('naive-ui')['NForm']
5863
NFormItem: typeof import('naive-ui')['NFormItem']
5964
NIcon: typeof import('naive-ui')['NIcon']
6065
NInput: typeof import('naive-ui')['NInput']
6166
NLayout: typeof import('naive-ui')['NLayout']
67+
NLayoutContent: typeof import('naive-ui')['NLayoutContent']
6268
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
6369
NList: typeof import('naive-ui')['NList']
6470
NListItem: typeof import('naive-ui')['NListItem']
6571
NMenu: typeof import('naive-ui')['NMenu']
6672
NMessageProvider: typeof import('naive-ui')['NMessageProvider']
73+
NModal: typeof import('naive-ui')['NModal']
6774
NNotificationProvider: typeof import('naive-ui')['NNotificationProvider']
6875
Notifications: typeof import('./components/Navbar/Notifications.vue')['default']
6976
NPageHeader: typeof import('naive-ui')['NPageHeader']
@@ -78,6 +85,7 @@ declare module 'vue' {
7885
NText: typeof import('naive-ui')['NText']
7986
NThing: typeof import('naive-ui')['NThing']
8087
NTooltip: typeof import('naive-ui')['NTooltip']
88+
NTreeSelect: typeof import('naive-ui')['NTreeSelect']
8189
OrderManagement: typeof import('./components/Orders/OrderManagement.vue')['default']
8290
PersianIcon: typeof import('./components/CustomIcons/PersianIcon.vue')['default']
8391
ProductsManagement: typeof import('./components/Products/ProductsManagement.vue')['default']

src/layouts/default.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ watch(
4848
<NScrollbar>
4949
<div
5050
class="h-full overflow-auto md:mx-auto"
51-
:class="{ 'md-container': !effectiveFluid, 'md:pb-15': !fullScreen, 'p-3': !fullScreen }"
51+
:class="{ 'md-container': !effectiveFluid, 'md:pb-18': !fullScreen, 'p-3': !fullScreen }"
5252
>
5353
<router-view v-slot="{ Component, route }">
5454
<transition name="route" mode="out-in">

src/styles/utils/_override.scss

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,21 @@
4949
top: 2px;
5050
}
5151

52+
.n-pagination *:not(:last-child) {
53+
margin: var(--n-item-margin);
54+
}
55+
56+
.n-pagination *:last-child {
57+
margin: auto;
58+
}
59+
5260
.n-pagination {
53-
flex-direction: row-reverse !important;
61+
62+
.n-pagination-item--button {
63+
svg {
64+
transform: rotate(180deg);
65+
}
66+
}
5467
}
5568

5669
.n-data-table-expand-trigger {
@@ -69,10 +82,10 @@
6982
flex: 0;
7083
}
7184

72-
.n-layout-sider .n-layout-sider__border {
73-
left:0;
74-
right: auto;
75-
}
85+
.n-layout-sider .n-layout-sider__border {
86+
left: 0;
87+
right: auto;
88+
}
7689
}
7790

7891

@@ -93,6 +106,7 @@ select:-webkit-autofill:focus {
93106
.border-color-default {
94107
border-color: var(--border-color);
95108
}
109+
96110
// ApexCharts
97111
.dark {
98112
.apexcharts-text {
@@ -122,5 +136,5 @@ select:-webkit-autofill:focus {
122136
}
123137

124138
.n-list {
125-
background-color: transparent!important;
139+
background-color: transparent !important;
126140
}

0 commit comments

Comments
 (0)