Files
joplin/packages/lib/commands/historyBackward.ts
T

20 lines
452 B
TypeScript
Raw Normal View History

2020-07-03 22:32:39 +01:00
import { utils, CommandRuntime, CommandDeclaration } from '../services/CommandService';
2020-11-05 16:58:23 +00:00
import { _ } from '../locale';
2020-07-03 22:32:39 +01:00
export const declaration: CommandDeclaration = {
2020-07-03 22:32:39 +01:00
name: 'historyBackward',
label: () => _('Back'),
2020-09-15 14:01:07 +01:00
iconName: 'icon-back',
2020-07-03 22:32:39 +01:00
};
export const runtime = (): CommandRuntime => {
2020-07-03 22:32:39 +01:00
return {
execute: async () => {
2020-07-03 22:32:39 +01:00
utils.store.dispatch({
type: 'HISTORY_BACKWARD',
});
},
enabledCondition: 'historyhasBackwardNotes',
2020-07-03 22:32:39 +01:00
};
};