mirror of
https://github.com/zadam/trilium.git
synced 2025-12-12 10:24:23 +01:00
fix(ribbon): content code modal hidden behind backdrop
This commit is contained in:
parent
0f867e02c4
commit
a4b79a2dc9
@ -58,14 +58,10 @@ function NoteTypeWidget({ note }: { note?: FNote | null }) {
|
|||||||
<NoteTypeDropdownContent currentNoteType={currentNoteType} currentNoteMime={currentNoteMime} note={note} setModalShown={setModalShown} />
|
<NoteTypeDropdownContent currentNoteType={currentNoteType} currentNoteMime={currentNoteMime} note={note} setModalShown={setModalShown} />
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|
||||||
<Modal
|
{createPortal(
|
||||||
className="code-mime-types-modal"
|
<NoteTypeOptionsModal modalShown={modalShown} setModalShown={setModalShown} />,
|
||||||
title={t("code_mime_types.title")}
|
document.body
|
||||||
show={modalShown} onHidden={() => setModalShown(false)}
|
)}
|
||||||
size="xl" scrollable
|
|
||||||
>
|
|
||||||
<CodeMimeTypesList />
|
|
||||||
</Modal>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -144,7 +140,20 @@ export function NoteTypeDropdownContent({ currentNoteType, currentNoteMime, note
|
|||||||
<FormDropdownDivider />
|
<FormDropdownDivider />
|
||||||
<FormListItem icon="bx bx-cog" onClick={() => setModalShown(true)}>{t("basic_properties.configure_code_notes")}</FormListItem>
|
<FormListItem icon="bx bx-cog" onClick={() => setModalShown(true)}>{t("basic_properties.configure_code_notes")}</FormListItem>
|
||||||
</>
|
</>
|
||||||
)
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function NoteTypeOptionsModal({ modalShown, setModalShown }: { modalShown: boolean, setModalShown: (shown: boolean) => void }) {
|
||||||
|
return (
|
||||||
|
<Modal
|
||||||
|
className="code-mime-types-modal"
|
||||||
|
title={t("code_mime_types.title")}
|
||||||
|
show={modalShown} onHidden={() => setModalShown(false)}
|
||||||
|
size="xl" scrollable
|
||||||
|
>
|
||||||
|
<CodeMimeTypesList />
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ProtectedNoteSwitch({ note }: { note?: FNote | null }) {
|
function ProtectedNoteSwitch({ note }: { note?: FNote | null }) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user