2020-07-03 23:32:39 +02:00
|
|
|
import { utils, CommandRuntime, CommandDeclaration } from '../services/CommandService';
|
2020-11-05 18:58:23 +02:00
|
|
|
import { _ } from '../locale';
|
2020-07-03 23:32:39 +02:00
|
|
|
|
2020-11-12 21:13:28 +02:00
|
|
|
export const declaration: CommandDeclaration = {
|
2020-07-03 23:32:39 +02:00
|
|
|
name: 'historyBackward',
|
|
|
|
label: () => _('Back'),
|
2020-09-15 15:01:07 +02:00
|
|
|
iconName: 'icon-back',
|
2020-07-03 23:32:39 +02:00
|
|
|
};
|
|
|
|
|
2020-11-12 21:13:28 +02:00
|
|
|
export const runtime = (): CommandRuntime => {
|
2020-07-03 23:32:39 +02:00
|
|
|
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
|
|
|
};
|
|
|
|
};
|