mirror of
https://github.com/zadam/trilium.git
synced 2026-05-07 07:26:36 +02:00
fix(revisions): context menu on mobile + regression in tab switcher
This commit is contained in:
@@ -152,6 +152,8 @@ function RevisionsMenu({ note, onRevisionSaved, onAllDeleted, hasRevisions }: {
|
||||
buttonClassName="custom-title-bar-button"
|
||||
noSelectButtonStyle
|
||||
buttonProps={{ title: t("revisions.menu_tooltip") }}
|
||||
dropdownContainerClassName="mobile-bottom-menu"
|
||||
dropdownOptions={{ popperConfig: { strategy: "fixed" } }}
|
||||
>
|
||||
<FormListItem
|
||||
icon="bx bx-save"
|
||||
|
||||
@@ -157,7 +157,7 @@ export default function Modal({ children, className, size, title, customTitleBar
|
||||
</div>}
|
||||
{sidebar}
|
||||
</div>}
|
||||
<div className="modal-main">
|
||||
<ModalMain sidebar={!!sidebar}>
|
||||
<div className="modal-header">
|
||||
{!title || typeof title === "string" ? (
|
||||
<h5 className="modal-title">{title ?? <> </>}</h5>
|
||||
@@ -192,13 +192,20 @@ export default function Modal({ children, className, size, title, customTitleBar
|
||||
{children}
|
||||
</ModalInner>
|
||||
)}
|
||||
</div>
|
||||
</ModalMain>
|
||||
</div>
|
||||
</div>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function ModalMain({ sidebar, children }: { sidebar: boolean; children: ComponentChildren }) {
|
||||
if (sidebar) {
|
||||
return <div className="modal-main">{children}</div>;
|
||||
}
|
||||
return <>{children}</>;
|
||||
}
|
||||
|
||||
function ModalInner({ children, footer, footerAlignment, bodyStyle, footerStyle: _footerStyle }: Pick<ModalProps, "children" | "footer" | "footerAlignment" | "bodyStyle" | "footerStyle">) {
|
||||
// Memoize footer style
|
||||
const footerStyle = useMemo<CSSProperties>(() => {
|
||||
|
||||
Reference in New Issue
Block a user