mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 23:29:02 +02:00
feat(client/rtl): improve alignment of the attribute editor
This commit is contained in:
parent
74d7191222
commit
f4df7c1eec
@ -4,7 +4,7 @@ import { t } from "../../../services/i18n";
|
|||||||
import server from "../../../services/server";
|
import server from "../../../services/server";
|
||||||
import note_autocomplete, { Suggestion } from "../../../services/note_autocomplete";
|
import note_autocomplete, { Suggestion } from "../../../services/note_autocomplete";
|
||||||
import CKEditor, { CKEditorApi } from "../../react/CKEditor";
|
import CKEditor, { CKEditorApi } from "../../react/CKEditor";
|
||||||
import { useLegacyImperativeHandlers, useLegacyWidget, useTooltip, useTriliumEvent } from "../../react/hooks";
|
import { useLegacyImperativeHandlers, useLegacyWidget, useTooltip, useTriliumEvent, useTriliumOption } from "../../react/hooks";
|
||||||
import FAttribute from "../../../entities/fattribute";
|
import FAttribute from "../../../entities/fattribute";
|
||||||
import attribute_renderer from "../../../services/attribute_renderer";
|
import attribute_renderer from "../../../services/attribute_renderer";
|
||||||
import FNote from "../../../entities/fnote";
|
import FNote from "../../../entities/fnote";
|
||||||
@ -100,6 +100,7 @@ export default function AttributeEditor({ api, note, componentId, notePath, ntxI
|
|||||||
const currentValueRef = useRef(currentValue);
|
const currentValueRef = useRef(currentValue);
|
||||||
const wrapperRef = useRef<HTMLDivElement>(null);
|
const wrapperRef = useRef<HTMLDivElement>(null);
|
||||||
const editorRef = useRef<CKEditorApi>();
|
const editorRef = useRef<CKEditorApi>();
|
||||||
|
const [ locale ] = useTriliumOption("locale");
|
||||||
|
|
||||||
const { showTooltip, hideTooltip } = useTooltip(wrapperRef, {
|
const { showTooltip, hideTooltip } = useTooltip(wrapperRef, {
|
||||||
trigger: "focus",
|
trigger: "focus",
|
||||||
@ -308,7 +309,8 @@ export default function AttributeEditor({ api, note, componentId, notePath, ntxI
|
|||||||
toolbar: { items: [] },
|
toolbar: { items: [] },
|
||||||
placeholder: t("attribute_editor.placeholder"),
|
placeholder: t("attribute_editor.placeholder"),
|
||||||
mention: { feeds: mentionSetup },
|
mention: { feeds: mentionSetup },
|
||||||
licenseKey: "GPL"
|
licenseKey: "GPL",
|
||||||
|
language: "en"
|
||||||
}}
|
}}
|
||||||
onChange={(currentValue) => {
|
onChange={(currentValue) => {
|
||||||
currentValueRef.current = currentValue ?? "";
|
currentValueRef.current = currentValue ?? "";
|
||||||
|
@ -285,6 +285,11 @@
|
|||||||
transition: opacity .1s linear;
|
transition: opacity .1s linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body[dir=rtl] .attribute-list-editor {
|
||||||
|
padding: 0 5px 0 100px !important;
|
||||||
|
text-align: right !important;
|
||||||
|
}
|
||||||
|
|
||||||
.attribute-list-editor.ck-content .mention {
|
.attribute-list-editor.ck-content .mention {
|
||||||
color: var(--muted-text-color) !important;
|
color: var(--muted-text-color) !important;
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user