1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-30 23:44:55 +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

@ -0,0 +1,50 @@
// PlatformImplementation provides access to platform specific dependencies,
// such as the clipboard, message dialog, etc. It allows having the same plugin
import { VersionInfo } from './api/types';
import { Implementation as WindowImplementation } from './api/JoplinWindow';
export interface JoplinViewsDialogs {
showMessageBox(message: string): Promise<number>;
}
export interface JoplinViews {
dialogs: JoplinViewsDialogs;
}
export interface Joplin {
views: JoplinViews;
}
// API for all platforms, but with different implementations.
export default class BasePlatformImplementation {
public get versionInfo(): VersionInfo {
throw new Error('Not implemented');
}
public get clipboard(): any {
throw new Error('Not implemented');
}
public get nativeImage(): any {
throw new Error('Not implemented');
}
public get window(): WindowImplementation {
throw new Error('Not implemented');
}
public registerComponent(_name: string, _component: any) {
throw new Error('Not implemented');
}
public unregisterComponent(_name: string) {
throw new Error('Not implemented');
}
public get joplin(): Joplin {
throw new Error('Not implemented');
}
}