2020-11-07 15:59:37 +00:00
|
|
|
import { CommandRuntime, CommandDeclaration } from '@joplin/lib/services/CommandService';
|
|
|
|
import { _ } from '@joplin/lib/locale';
|
2020-10-21 22:10:21 +01:00
|
|
|
import bridge from '../services/bridge';
|
2020-11-07 15:59:37 +00:00
|
|
|
import Setting from '@joplin/lib/models/Setting';
|
2020-10-21 22:10:21 +01:00
|
|
|
|
2020-11-12 19:13:28 +00:00
|
|
|
export const declaration: CommandDeclaration = {
|
2020-10-21 22:10:21 +01:00
|
|
|
name: 'openProfileDirectory',
|
|
|
|
label: () => _('Open profile directory'),
|
|
|
|
};
|
|
|
|
|
2020-11-12 19:13:28 +00:00
|
|
|
export const runtime = (): CommandRuntime => {
|
2020-10-21 22:10:21 +01:00
|
|
|
return {
|
|
|
|
execute: async () => {
|
2020-11-25 14:40:25 +00:00
|
|
|
void bridge().openItem(Setting.value('profileDir'));
|
2020-10-21 22:10:21 +01:00
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|