mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-21 09:38:01 +02:00
16 lines
405 B
TypeScript
16 lines
405 B
TypeScript
|
import { CommandRuntime, CommandDeclaration } from '../../../lib/services/CommandService';
|
||
|
const { _ } = require('lib/locale');
|
||
|
|
||
|
export const declaration:CommandDeclaration = {
|
||
|
name: 'focusSearch',
|
||
|
label: () => _('Search in all the notes'),
|
||
|
};
|
||
|
|
||
|
export const runtime = (comp:any):CommandRuntime => {
|
||
|
return {
|
||
|
execute: async () => {
|
||
|
if (comp.searchElement_) comp.searchElement_.focus();
|
||
|
},
|
||
|
};
|
||
|
};
|