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

Plugins: Added joplin.versionInfo method

This commit is contained in:
Laurent Cozic
2022-07-03 14:32:29 +01:00
parent 6744dc3a8a
commit 3b35ab6581
7 changed files with 90 additions and 25 deletions

View File

@ -10,6 +10,7 @@ import JoplinSettings from './JoplinSettings';
import JoplinContentScripts from './JoplinContentScripts';
import JoplinClipboard from './JoplinClipboard';
import JoplinWindow from './JoplinWindow';
import BasePlatformImplementation from '../BasePlatformImplementation';
/**
* This is the main entry point to the Joplin API. You can access various services using the provided accessors.
@ -36,8 +37,10 @@ export default class Joplin {
private contentScripts_: JoplinContentScripts = null;
private clipboard_: JoplinClipboard = null;
private window_: JoplinWindow = null;
private implementation_: BasePlatformImplementation = null;
public constructor(implementation: any, plugin: Plugin, store: any) {
public constructor(implementation: BasePlatformImplementation, plugin: Plugin, store: any) {
this.implementation_ = implementation;
this.data_ = new JoplinData();
this.plugins_ = new JoplinPlugins(plugin);
this.workspace_ = new JoplinWorkspace(store);
@ -117,4 +120,8 @@ export default class Joplin {
// Just a stub. Implementation has to be done within plugin process, in plugin_index.js
}
public async versionInfo() {
return this.implementation_.versionInfo;
}
}

View File

@ -221,6 +221,12 @@ export enum ModelType {
Command = 16,
}
export interface VersionInfo {
version: string;
profileVersion: number;
syncVersion: number;
}
// =================================================================
// Menu types
// =================================================================