2020-10-18 22:52:10 +02:00
|
|
|
import { CommandDeclaration, CommandRuntime } from 'lib/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 = {
|
2020-10-18 22:52:10 +02:00
|
|
|
name: 'toggleSideBar',
|
2020-07-03 23:32:39 +02:00
|
|
|
label: () => _('Toggle sidebar'),
|
2020-10-13 14:01:02 +02:00
|
|
|
iconName: 'fas fa-bars',
|
2020-07-03 23:32:39 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export const runtime = (comp:any):CommandRuntime => {
|
|
|
|
return {
|
|
|
|
execute: async () => {
|
|
|
|
comp.props.dispatch({
|
|
|
|
type: 'SIDEBAR_VISIBILITY_TOGGLE',
|
|
|
|
});
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|