Skip to content

Build your personal knowledge base with Trilium Notes

fix(client/rtl): wrong order of tabs

Elian Doranf880aa769c46
diff --git a/apps/client/src/stylesheets/theme-next/shell.css b/apps/client/src/stylesheets/theme-next/shell.css
index 6e8beb777d..bbae316853 100644
--- a/apps/client/src/stylesheets/theme-next/shell.css
+++ b/apps/client/src/stylesheets/theme-next/shell.css
@@ -1055,7 +1055,7 @@ body.layout-horizontal .tab-row-widget .note-tab .note-tab-wrapper {
background-color: var(--workspace-tab-background-color);
}
-.tab-row-widget .note-tab:nth-child(1) {
+body:not([dir=rtl]) .tab-row-widget .note-tab:nth-child(1) {
transform: translate3d(var(--tab-first-item-horiz-offset), 0, 0);
}
diff --git a/apps/client/src/widgets/tab_row.ts b/apps/client/src/widgets/tab_row.ts
index 84c96378b1..c2405aaed7 100644
--- a/apps/client/src/widgets/tab_row.ts
+++ b/apps/client/src/widgets/tab_row.ts
@@ -500,6 +500,9 @@ export default class TabRowWidget extends BasicWidget {
position -= MARGIN_WIDTH; // the last margin should not be applied
const anchorPosition = position;
+ if (glob.isRtl) {
+ tabPositions.reverse();
+ }
return { tabPositions, anchorPosition };
}