mirror of
https://github.com/zadam/trilium.git
synced 2025-12-12 10:24:23 +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,18 +349,27 @@ export function NoteLanguageSelector({ note }: { note?: FNote | null }) {
|
||||
>{t("note_language.configure-languages")}</FormListItem>
|
||||
)}
|
||||
/>
|
||||
<Modal
|
||||
className="content-languages-modal"
|
||||
title={t("content_language.title")}
|
||||
show={modalShown} onHidden={() => setModalShown(false)}
|
||||
size="lg" scrollable
|
||||
>
|
||||
<ContentLanguagesList />
|
||||
</Modal>
|
||||
{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")}
|
||||
show={modalShown} onHidden={() => setModalShown(false)}
|
||||
size="lg" scrollable
|
||||
>
|
||||
<ContentLanguagesList />
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
function findTypeTitle(type?: NoteType, mime?: string | null) {
|
||||
if (type === "code") {
|
||||
const mimeTypes = mime_types.getMimeTypes();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user