2020-07-03 23:32:39 +02:00
|
|
|
import { utils, CommandRuntime, CommandDeclaration } from '../services/CommandService';
|
2020-10-09 19:35:46 +02:00
|
|
|
import { _ } from 'lib/locale';
|
2020-07-03 23:32:39 +02:00
|
|
|
|
|
|
|
export const declaration:CommandDeclaration = {
|
|
|
|
name: 'historyBackward',
|
|
|
|
label: () => _('Back'),
|
2020-09-15 15:01:07 +02:00
|
|
|
iconName: 'icon-back',
|
2020-07-03 23:32:39 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export const runtime = ():CommandRuntime => {
|
|
|
|
return {
|
2020-10-18 22:52:10 +02:00
|
|
|
execute: async () => {
|
2020-07-03 23:32:39 +02:00
|
|
|
utils.store.dispatch({
|
|
|
|
type: 'HISTORY_BACKWARD',
|
|
|
|
});
|
|
|
|
},
|
2020-10-18 22:52:10 +02:00
|
|
|
enabledCondition: 'historyhasBackwardNotes',
|
2020-07-03 23:32:39 +02:00
|
|
|
};
|
|
|
|
};
|