Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(popup-editor): implement switch to full editor button
Elian Doranaacd92eee38b
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex 5143015943..c1a5099447 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.tsxindex 0d158f8282..c85dcd3b37 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={<TitleRow />}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"