mirror of
https://github.com/zadam/trilium.git
synced 2025-12-01 04:54:25 +01:00
chore(popup-editor): implement switch to full editor button
This commit is contained in:
parent
030582b2d5
commit
aacd92eee3
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user