1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Mobile: Support building for web (#10650)

This commit is contained in:
Henry Heino
2024-08-02 06:51:49 -07:00
committed by GitHub
parent 88271bf1a7
commit f69dffcf23
157 changed files with 6251 additions and 1325 deletions

View File

@ -51,7 +51,7 @@ export default class Joplin {
this.imaging_ = new JoplinImaging(implementation.imaging);
this.workspace_ = new JoplinWorkspace(plugin, store);
this.filters_ = new JoplinFilters();
this.commands_ = new JoplinCommands();
this.commands_ = new JoplinCommands(plugin);
this.views_ = new JoplinViews(implementation.joplin.views, plugin, store);
this.interop_ = new JoplinInterop();
this.settings_ = new JoplinSettings(plugin);

View File

@ -2,6 +2,7 @@
import CommandService, { CommandContext, CommandDeclaration, CommandRuntime } from '../../CommandService';
import { Command } from './types';
import Plugin from '../Plugin';
/**
* This class allows executing or registering new Joplin commands. Commands
@ -59,6 +60,7 @@ import { Command } from './types';
*
*/
export default class JoplinCommands {
public constructor(private plugin_: Plugin) { }
/**
* Executes the given command.
@ -118,6 +120,9 @@ export default class JoplinCommands {
CommandService.instance().registerDeclaration(declaration);
CommandService.instance().registerRuntime(declaration.name, runtime);
this.plugin_.addOnUnloadListener(() => {
CommandService.instance().unregisterRuntime(declaration.name);
});
}
}