#180 - Filename placeholder added

This commit is contained in:
Elio Struyf
2021-11-18 16:42:34 +01:00
parent 61b80795a4
commit b9cb0ea16d
3 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -21,13 +21,13 @@ import { decodeBase64Image } from '../helpers/decodeBase64Image';
import { DashboardData } from '../models/DashboardData';
import { ExplorerView } from '../explorerView/ExplorerView';
import { MediaLibrary } from '../helpers/MediaLibrary';
import imageSize from 'image-size';
import { parseWinPath } from '../helpers/parseWinPath';
import { DateHelper } from '../helpers/DateHelper';
import { FrameworkDetector } from '../helpers/FrameworkDetector';
import { ContentType } from '../helpers/ContentType';
import { SortingOption } from '../dashboardWebView/models';
import { Sorting } from '../helpers/Sorting';
import imageSize from 'image-size';
export class Dashboard {
private static webview: WebviewPanel | null = null;
@@ -78,9 +78,11 @@ export const Item: React.FunctionComponent<IItemProps> = ({media}: React.PropsWi
const insertSnippet = () => {
const relPath = getRelPath();
let snippet = settings?.mediaSnippet.join("\n");
snippet = snippet?.replace("{mediaUrl}", parseWinPath(relPath) || "");
snippet = snippet?.replace("{alt}", alt || "");
snippet = snippet?.replace("{caption}", caption || "");
snippet = snippet?.replace("{filename}", basename(relPath || ""));
Messenger.send(DashboardMessage.insertPreviewImage, {
image: parseWinPath(relPath) || "",