From d51cb7c7a97fe2d640006cb2ff6d67f0dbfacaf4 Mon Sep 17 00:00:00 2001 From: Austin Mroz Date: Sat, 28 Oct 2023 15:24:59 -0500 Subject: [PATCH] Fix preview on node-add, consistent naming When a Load Video node is added, the default video selection is now properly displayed with a preview. Context menu options now consistently use preview instead of video as the actions apply to animated images as well. --- web/js/VHS.core.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/js/VHS.core.js b/web/js/VHS.core.js index 0fbda72..ad98c26 100644 --- a/web/js/VHS.core.js +++ b/web/js/VHS.core.js @@ -443,13 +443,13 @@ function addPreviewOptions(nodeType) { //url.searchParams.delete('preview') optNew.push( { - content: "Open Video", + content: "Open preview", callback: () => { window.open(url, "_blank") }, }, { - content: "Save Video", + content: "Save preview", callback: () => { const a = document.createElement("a"); a.href = url; @@ -539,6 +539,8 @@ app.registerExtension({ return pathWidget._value; } }); + //Set value to ensure preview displays on initial add. + pathWidget.value = pathWidget._value; }); } else if (nodeData?.name == "VHS_VideoCombine") { addDateFormatting(nodeType, "filename_prefix");