diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.css index 71f0f7fd68..1babd999fe 100644 --- a/apps/client/src/stylesheets/style.css +++ b/apps/client/src/stylesheets/style.css @@ -1158,6 +1158,33 @@ a.external:not(.no-arrow):after, a[href^="http://"]:not(.no-arrow):after, a[href margin: 0 12px; } +.modal-content-with-sidebar { + flex-direction: row !important; +} + +.modal-content-with-sidebar > .modal-sidebar { + display: flex; + flex-direction: column; + border-right: 1px solid var(--main-border-color); + overflow: auto; + flex-shrink: 0; +} + +.modal-content-with-sidebar > .modal-main { + display: flex; + flex-direction: column; + flex-grow: 1; + min-width: 0; + min-height: 0; + overflow: hidden; +} + +.modal-content-with-sidebar > .modal-main > .modal-body { + overflow: auto; + flex-grow: 1; + min-height: 0; +} + .ck-mentions .ck-button { font-size: var(--detail-font-size) !important; padding: 5px; diff --git a/apps/client/src/widgets/dialogs/revisions.css b/apps/client/src/widgets/dialogs/revisions.css index ba5cd3f869..2a7eb8137a 100644 --- a/apps/client/src/widgets/dialogs/revisions.css +++ b/apps/client/src/widgets/dialogs/revisions.css @@ -103,12 +103,17 @@ body.desktop .revisions-dialog { opacity: 0.6; } + .modal-content { + height: 80vh; + } + .revision-content-wrapper { flex-grow: 1; - margin-inline: 20px; + padding-inline: 20px; display: flex; flex-direction: column; min-width: 0; + overflow: auto; } .revision-toolbar-separator { diff --git a/apps/client/src/widgets/dialogs/revisions.tsx b/apps/client/src/widgets/dialogs/revisions.tsx index 4807ee6269..9af385a589 100644 --- a/apps/client/src/widgets/dialogs/revisions.tsx +++ b/apps/client/src/widgets/dialogs/revisions.tsx @@ -67,7 +67,6 @@ export default function RevisionsDialog() { size="xl" title={t("revisions.note_revisions")} helpPageId="vZWERwf8U3nx" - bodyStyle={{ display: "flex", height: "80vh" }} header={note && ( )} + sidebar={ + { + const correspondingRevision = (revisions ?? []).find((r) => r.revisionId === revisionId); + if (correspondingRevision) { + setCurrentRevision(correspondingRevision); + } + }} + currentRevision={currentRevision} + /> + } onHidden={() => { setShown(false); setShowDiff(false); @@ -91,17 +102,6 @@ export default function RevisionsDialog() { }} show={shown} > - { - const correspondingRevision = (revisions ?? []).find((r) => r.revisionId === revisionId); - if (correspondingRevision) { - setCurrentRevision(correspondingRevision); - } - }} - currentRevision={currentRevision} - /> -
(externalModalRef); const modalInstanceRef = useRef(); const elementToFocus = useRef(); @@ -144,41 +150,44 @@ export default function Modal({ children, className, size, title, customTitleBar return (
{(show || keepInDom) &&
-
-
- {!title || typeof title === "string" ? ( -
{title ?? <> }
+
+ {sidebar &&
{sidebar}
} +
+
+ {!title || typeof title === "string" ? ( +
{title ?? <> }
+ ) : ( + title + )} + {header} + {helpPageId && ( + + )} + + {titleBarButtons?.filter((b) => b !== null).map((titleBarButton) => ( +
+ + {onSubmit ? ( +
{ + e.preventDefault(); + onSubmit(); + }}> + {children} +
) : ( - title + + {children} + )} - {header} - {helpPageId && ( - - )} - - {titleBarButtons?.filter((b) => b !== null).map((titleBarButton) => ( -
- - {onSubmit ? ( -
{ - e.preventDefault(); - onSubmit(); - }}> - {children} -
- ) : ( - - {children} - - )}
}