feat(rtl): align floating buttons properly

This commit is contained in:
Elian Doran
2025-03-05 17:12:14 +02:00
parent 25c9f52cf4
commit 8e2517459f
2 changed files with 22 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ import type BasicWidget from "./basic_widget.js";
import type { EventData } from "../components/app_context.js";
import type NoteContext from "../components/note_context.js";
import type FNote from "../entities/fnote.js";
import { getLocaleById } from "../services/i18n.js";
export default class NoteWrapperWidget extends FlexContainer<BasicWidget> {
@@ -56,6 +57,10 @@ export default class NoteWrapperWidget extends FlexContainer<BasicWidget> {
this.$widget.addClass(utils.getMimeTypeClass(note.mime));
this.$widget.toggleClass("protected", note.isProtected);
const noteLanguage = note?.getLabelValue("language");
const locale = getLocaleById(noteLanguage);
this.$widget.toggleClass("rtl", !!locale?.rtl);
}
#isFullWidthNote(note: FNote) {