mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-14 18:27:44 +02:00
This commit is contained in:
parent
5d9b43ee31
commit
be8001857e
@ -30,11 +30,11 @@ export interface ContextMenuItems {
|
||||
[key: string]: ContextMenuItem;
|
||||
}
|
||||
|
||||
export async function resourceInfo(options: ContextMenuOptions): Promise<any> {
|
||||
export async function resourceInfo(options: ContextMenuOptions) {
|
||||
const resource = options.resourceId ? await Resource.load(options.resourceId) : null;
|
||||
const filePath = resource ? Resource.fullPath(resource) : null;
|
||||
const resourcePath = resource ? Resource.fullPath(resource) : null;
|
||||
const filename = resource ? (resource.filename ? resource.filename : resource.title) : options.filename ? options.filename : '';
|
||||
return { resource, filePath, filename };
|
||||
return { resource, resourcePath, filename };
|
||||
}
|
||||
|
||||
export function textToDataUri(text: string, mime: string): string {
|
||||
|
Loading…
Reference in New Issue
Block a user