You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-13 00:10:37 +02:00
Mobile: Add support for plugin panels and dialogs (#10121)
This commit is contained in:
18
packages/app-mobile/commands/openNote.ts
Normal file
18
packages/app-mobile/commands/openNote.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService';
|
||||
import Logger from '@joplin/utils/Logger';
|
||||
import goToNote from './util/goToNote';
|
||||
|
||||
const logger = Logger.create('openNoteCommand');
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
name: 'openNote',
|
||||
};
|
||||
|
||||
export const runtime = (): CommandRuntime => {
|
||||
return {
|
||||
execute: async (_context: CommandContext, noteId: string, hash: string = null) => {
|
||||
logger.info(`Navigating to note ${noteId}`);
|
||||
await goToNote(noteId, hash);
|
||||
},
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user