From 7779acc7bcde4aebade6db670d306a1bc1c77711 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 30 Nov 2025 19:55:40 +0200 Subject: [PATCH] refactor(client): split revisions CSS into file --- apps/client/src/stylesheets/style.css | 40 ------------------ apps/client/src/widgets/dialogs/revisions.css | 41 +++++++++++++++++++ apps/client/src/widgets/dialogs/revisions.tsx | 1 + 3 files changed, 42 insertions(+), 40 deletions(-) create mode 100644 apps/client/src/widgets/dialogs/revisions.css diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.css index ea55db041..5db4b1582 100644 --- a/apps/client/src/stylesheets/style.css +++ b/apps/client/src/stylesheets/style.css @@ -1686,46 +1686,6 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu { body.mobile .modal-dialog.modal-dialog-scrollable { height: unset; } - - body.mobile .revisions-dialog .modal-dialog { - height: 95vh; - } - - body.mobile .revisions-dialog .modal-body { - height: 100% !important; - flex-direction: column; - padding: 0; - } - - body.mobile .revisions-dialog .revision-list { - height: unset; - max-height: 20vh; - border-bottom: 1px solid var(--main-border-color) !important; - padding: 0 1em; - } - - body.mobile .revisions-dialog .modal-body > .revision-content-wrapper { - flex-grow: 1; - height: 100%; - overflow: auto; - margin: 0; - } - - body.mobile .revisions-dialog .modal-body > .revision-content-wrapper > div:first-of-type { - flex-direction: column; - } - - body.mobile .revisions-dialog .revision-title { - font-size: 1rem; - } - - body.mobile .revisions-dialog .revision-title-buttons { - text-align: center; - } - - body.mobile .revisions-dialog .revision-content { - padding: 0.5em; - } } /* Mobile, tablet mode */ diff --git a/apps/client/src/widgets/dialogs/revisions.css b/apps/client/src/widgets/dialogs/revisions.css new file mode 100644 index 000000000..91c3af11c --- /dev/null +++ b/apps/client/src/widgets/dialogs/revisions.css @@ -0,0 +1,41 @@ +body.mobile .revisions-dialog { + .modal-dialog { + height: 95vh; + } + + .modal-body { + height: 100% !important; + flex-direction: column; + padding: 0; + } + + .revision-list { + height: unset; + max-height: 20vh; + border-bottom: 1px solid var(--main-border-color) !important; + padding: 0 1em; + } + + .modal-body > .revision-content-wrapper { + flex-grow: 1; + height: 100%; + overflow: auto; + margin: 0; + } + + .modal-body > .revision-content-wrapper > div:first-of-type { + flex-direction: column; + } + + .revision-title { + font-size: 1rem; + } + + .revision-title-buttons { + text-align: center; + } + + .revision-content { + padding: 0.5em; + } +} \ No newline at end of file diff --git a/apps/client/src/widgets/dialogs/revisions.tsx b/apps/client/src/widgets/dialogs/revisions.tsx index e20c4c978..fd2dd9a16 100644 --- a/apps/client/src/widgets/dialogs/revisions.tsx +++ b/apps/client/src/widgets/dialogs/revisions.tsx @@ -20,6 +20,7 @@ import ActionButton from "../react/ActionButton"; import options from "../../services/options"; import { useTriliumEvent } from "../react/hooks"; import { diffWords } from "diff"; +import "./revisions.css"; export default function RevisionsDialog() { const [ note, setNote ] = useState();