mirror of
https://github.com/zadam/trilium.git
synced 2025-12-24 00:59:55 +01:00
chore(popup-editor): implement switch to full editor button
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user