mirror of
https://github.com/zadam/trilium.git
synced 2025-12-12 18:34:24 +01:00
fix(ribbon): content languages modal hidden behind backdrop
This commit is contained in:
parent
ab1b4b37f4
commit
0f867e02c4
@ -22,6 +22,7 @@ import { CodeMimeTypesList } from "../type_widgets/options/code_notes";
|
||||
import { ContentLanguagesList } from "../type_widgets/options/i18n";
|
||||
import { LocaleSelector } from "../type_widgets/options/components/LocaleSelector";
|
||||
import { isExperimentalFeatureEnabled } from "../../services/experimental_features";
|
||||
import { createPortal } from "preact/compat";
|
||||
|
||||
const isNewLayout = isExperimentalFeatureEnabled("new-layout");
|
||||
|
||||
@ -348,6 +349,16 @@ export function NoteLanguageSelector({ note }: { note?: FNote | null }) {
|
||||
>{t("note_language.configure-languages")}</FormListItem>
|
||||
)}
|
||||
/>
|
||||
{createPortal(
|
||||
<ContentLanguagesModal modalShown={modalShown} setModalShown={setModalShown} />,
|
||||
document.body
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function ContentLanguagesModal({ modalShown, setModalShown }: { modalShown: boolean, setModalShown: (shown: boolean) => void }) {
|
||||
return (
|
||||
<Modal
|
||||
className="content-languages-modal"
|
||||
title={t("content_language.title")}
|
||||
@ -356,7 +367,6 @@ export function NoteLanguageSelector({ note }: { note?: FNote | null }) {
|
||||
>
|
||||
<ContentLanguagesList />
|
||||
</Modal>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user