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
|
|
|
|
2020-11-12 19:13:28 +00: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
|
|
|
};
|
|
|
|
|
2020-11-12 19:13:28 +00:00
|
|
|
export const runtime = (): CommandRuntime => {
|
2020-07-03 22:32:39 +01:00
|
|
|
return {
|
2020-10-18 21:52:10 +01:00
|
|
|
execute: async () => {
|
2020-07-03 22:32:39 +01:00
|
|
|
utils.store.dispatch({
|
|
|
|
type: 'HISTORY_BACKWARD',
|
|
|
|
});
|
|
|
|
},
|
2020-10-18 21:52:10 +01:00
|
|
|
enabledCondition: 'historyhasBackwardNotes',
|
2020-07-03 22:32:39 +01:00
|
|
|
};
|
|
|
|
};
|