From aacd92eee38b68128fa82c44d96258096bf3412a Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 30 Nov 2025 19:47:17 +0200 Subject: [PATCH] chore(popup-editor): implement switch to full editor button --- apps/client/src/translations/en/translation.json | 3 +++ apps/client/src/widgets/dialogs/PopupEditor.tsx | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) 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/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"