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/translations/en/translation.json b/apps/client/src/translations/en/translation.json index 514301594..c1a509944 100644 --- a/apps/client/src/translations/en/translation.json +++ b/apps/client/src/translations/en/translation.json @@ -2107,5 +2107,8 @@ "clear-color": "Clear note color", "set-color": "Set note color", "set-custom-color": "Set custom note color" + }, + "popup-editor": { + "maximize": "Switch to full editor" } } diff --git a/apps/client/src/widgets/collections/calendar/index.tsx b/apps/client/src/widgets/collections/calendar/index.tsx index bac6862b2..8bf5ce7f9 100644 --- a/apps/client/src/widgets/collections/calendar/index.tsx +++ b/apps/client/src/widgets/collections/calendar/index.tsx @@ -77,6 +77,7 @@ export const LOCALE_MAPPINGS: Record Promise<{ de "pt_br": () => import("@fullcalendar/core/locales/pt-br"), uk: () => import("@fullcalendar/core/locales/uk"), en: null, + "en-GB": () => import("@fullcalendar/core/locales/en-gb"), "en_rtl": null, ar: () => import("@fullcalendar/core/locales/ar") }; diff --git a/apps/client/src/widgets/dialogs/PopupEditor.tsx b/apps/client/src/widgets/dialogs/PopupEditor.tsx index 0d158f828..c85dcd3b3 100644 --- a/apps/client/src/widgets/dialogs/PopupEditor.tsx +++ b/apps/client/src/widgets/dialogs/PopupEditor.tsx @@ -19,6 +19,8 @@ import tree from "../../services/tree"; import froca from "../../services/froca"; import ReadOnlyNoteInfoBar from "../ReadOnlyNoteInfoBar"; import MobileEditorToolbar from "../type_widgets/text/mobile_editor_toolbar"; +import { t } from "../../services/i18n"; +import appContext from "../../components/app_context"; export default function PopupEditor() { const [ shown, setShown ] = useState(false); @@ -62,8 +64,13 @@ export default function PopupEditor() { title={} customTitleBarButtons={[{ iconClassName: "bx-expand-alt", - title: "Switch to full editor", - onClick: () => {/* TO DO */} + title: t("popup-editor.maximize"), + onClick: async () => { + if (!noteContext.noteId) return; + const { noteId, hoistedNoteId } = noteContext; + await appContext.tabManager.openInNewTab(noteId, hoistedNoteId, true); + setShown(false); + } }]} className="popup-editor-dialog" size="lg" diff --git a/apps/client/src/widgets/dialogs/revisions.css b/apps/client/src/widgets/dialogs/revisions.css new file mode 100644 index 000000000..1a4d6f26d --- /dev/null +++ b/apps/client/src/widgets/dialogs/revisions.css @@ -0,0 +1,63 @@ +body.mobile .revisions-dialog { + .modal-dialog { + height: 95vh; + } + + .modal-header { + display: flex; + flex-wrap: wrap; + gap: 0.25em; + font-size: 0.9em; + } + + .modal-title { + flex-grow: 1; + width: 100%; + } + + .modal-body { + height: fit-content !important; + flex-direction: column; + padding: 0; + } + + .modal-footer { + font-size: 0.9em; + } + + .revision-list { + height: fit-content !important; + max-height: 20vh; + border-bottom: 1px solid var(--main-border-color) !important; + padding: 0 1em; + flex-shrink: 0; + } + + .modal-body > .revision-content-wrapper { + flex-grow: 1; + max-width: unset !important; + height: 100%; + margin: 0; + display: block !important; + } + + .modal-body > .revision-content-wrapper > div:first-of-type { + flex-direction: column; + } + + .revision-title { + font-size: 1rem; + } + + .revision-title-buttons { + text-align: center; + display: flex; + gap: 0.25em; + flex-wrap: wrap; + } + + .revision-content { + padding: 0.5em; + height: fit-content; + } +} \ 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..322abdd3b 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(); @@ -137,7 +138,7 @@ export default function RevisionsDialog() { function RevisionsList({ revisions, onSelect, currentRevision }: { revisions: RevisionItem[], onSelect: (val: string) => void, currentRevision?: RevisionItem }) { return ( - + {revisions.map((item) => void; style?: CSSProperties; + wrapperClassName?: string; fullHeight?: boolean; } -export default function FormList({ children, onSelect, style, fullHeight }: FormListOpts) { +export default function FormList({ children, onSelect, style, fullHeight, wrapperClassName }: FormListOpts) { const wrapperRef = useRef(null); const triggerRef = useRef(null); @@ -43,7 +45,7 @@ export default function FormList({ children, onSelect, style, fullHeight }: Form }, [ fullHeight ]); return ( -
+