mirror of
https://github.com/zadam/trilium.git
synced 2025-10-21 07:38:53 +02:00
feat(client/rtl): set lang to body as well
This commit is contained in:
parent
1e78dd8296
commit
42b1dcebcd
@ -33,7 +33,7 @@ export default class RootContainer extends FlexContainer<BasicWidget> {
|
|||||||
this.#setMotion(options.is("motionEnabled"));
|
this.#setMotion(options.is("motionEnabled"));
|
||||||
this.#setShadows(options.is("shadowsEnabled"));
|
this.#setShadows(options.is("shadowsEnabled"));
|
||||||
this.#setBackdropEffects(options.is("backdropEffectsEnabled"));
|
this.#setBackdropEffects(options.is("backdropEffectsEnabled"));
|
||||||
this.#setRightToLeft(options.get("locale"));
|
this.#setLocaleAndDirection(options.get("locale"));
|
||||||
|
|
||||||
return super.render();
|
return super.render();
|
||||||
}
|
}
|
||||||
@ -71,8 +71,9 @@ export default class RootContainer extends FlexContainer<BasicWidget> {
|
|||||||
document.body.classList.toggle("backdrop-effects-disabled", !enabled);
|
document.body.classList.toggle("backdrop-effects-disabled", !enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
#setRightToLeft(locale: string) {
|
#setLocaleAndDirection(locale: string) {
|
||||||
const correspondingLocale = LOCALES.find(l => l.id === locale);
|
const correspondingLocale = LOCALES.find(l => l.id === locale);
|
||||||
|
document.body.lang = locale;
|
||||||
document.body.dir = correspondingLocale?.rtl ? "rtl" : "ltr";
|
document.body.dir = correspondingLocale?.rtl ? "rtl" : "ltr";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user