You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
Mobile: Plugin API: Implement the toggleVisiblePanes
command (#11496)
This commit is contained in:
@ -60,7 +60,7 @@ import getImageDimensions from '../../../utils/image/getImageDimensions';
|
||||
import resizeImage from '../../../utils/image/resizeImage';
|
||||
import { CameraResult } from '../../CameraView/types';
|
||||
import { DialogContext, DialogControl } from '../../DialogManager';
|
||||
import { CommandRuntimeProps, PickerResponse } from './types';
|
||||
import { CommandRuntimeProps, EditorMode, PickerResponse } from './types';
|
||||
import commands from './commands';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
@ -91,7 +91,7 @@ interface ComponentProps extends Props {
|
||||
|
||||
interface State {
|
||||
note: NoteEntity;
|
||||
mode: 'view'|'edit';
|
||||
mode: EditorMode;
|
||||
readOnly: boolean;
|
||||
folder: FolderEntity|null;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
@ -340,6 +340,10 @@ class NoteScreenComponent extends BaseScreenComponent<ComponentProps, State> imp
|
||||
|
||||
this.setState({ noteTagDialogShown: visible });
|
||||
},
|
||||
getMode: () => this.state.mode,
|
||||
setMode: (mode: 'view'|'edit') => {
|
||||
this.setState({ mode });
|
||||
},
|
||||
},
|
||||
commands,
|
||||
true,
|
||||
|
Reference in New Issue
Block a user