2020-11-05 18:58:23 +02:00
|
|
|
import { CommandDeclaration, CommandRuntime } from '@joplinapp/lib/services/CommandService';
|
|
|
|
import { _ } from '@joplinapp/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',
|
|
|
|
});
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|