From dc31ebb1ef4e8b3dc50c1346c5b47c6ddfa09124 Mon Sep 17 00:00:00 2001 From: Allen Benny Date: Thu, 17 Oct 2024 17:12:31 +0530 Subject: [PATCH] some changes --- src/Installer/components/Modal/index.jsx | 2 +- src/Scripts/dataAttrListener.js | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Installer/components/Modal/index.jsx b/src/Installer/components/Modal/index.jsx index 77b701c..8b2fdfe 100644 --- a/src/Installer/components/Modal/index.jsx +++ b/src/Installer/components/Modal/index.jsx @@ -75,11 +75,11 @@ const Modal = ( { pluginName, pluginSlug, pluginURL, pluginActivate } ) => { 'X-NFD-INSTALLER': pluginInstallHash, }, data: { - activate: pluginActivate === 'true' ? true : false, queue: false, priority: 0, premium: true, plugin: pluginSlug, + activate: pluginActivate, }, } ); setPluginStatus( 'completed' ); diff --git a/src/Scripts/dataAttrListener.js b/src/Scripts/dataAttrListener.js index c2f610b..4d7f42a 100644 --- a/src/Scripts/dataAttrListener.js +++ b/src/Scripts/dataAttrListener.js @@ -38,7 +38,7 @@ domReady( () => { document .getElementById( INSTALLER_DIV ) .setAttribute( - 'nfd-installer-ap__plugin--activate', + 'nfd-installer-app__plugin--activate', activate === 'true' ? true : false ); window.dispatchEvent( new Event( 'installerParamsSet' ) ); @@ -54,13 +54,15 @@ domReady( () => { ) { addedNode .querySelectorAll( - '[data-nfd-installer-plugin-provider]' + '[data-nfd-installer-pls-provider]' ) .forEach( ( ele ) => { + console.log("hereee"); + ele.addEventListener( 'click', function ( e ) { if ( e.target.getAttribute( - 'data-nfd-installer-plugin-slug' + 'data-nfd-installer-pls-slug' ) !== null ) { renderModal( @@ -68,7 +70,7 @@ domReady( () => { 'data-nfd-installer-plugin-name' ), this.getAttribute( - 'data-nfd-installer-plugin-slug' + 'data-nfd-installer-pls-slug' ), this.getAttribute( 'data-nfd-installer-plugin-url'