mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Add spinner + fix typos
This commit is contained in:
		| @@ -1534,21 +1534,18 @@ RED.palette.editor = (function() { | ||||
|         const installModule = function (module) { | ||||
|             const [moduleName, moduleVersion] = module; | ||||
|  | ||||
|             const msg = RED.notify(RED._("palette.editor.installing", { module: moduleName })); | ||||
|             const spinner = '<div style="text-align: center; height: 100%; padding-top: 20px;"><img src="red/images/spin.svg" style="width: 60px;"/></div>'; | ||||
|             const msg = "<p>" + RED._("palette.editor.installing", { module: moduleName }) + "</p>" + spinner; | ||||
|  | ||||
|             if (!notification) { | ||||
|                 notification = RED.notify(msg, notificationOptions); | ||||
|             } else { | ||||
|                 notification.update(msg); | ||||
|                 notification.update(msg, notificationOptions); | ||||
|             } | ||||
|  | ||||
|             // TODO: add spinner to a div below the title | ||||
|             //const spinner = RED.utils.addSpinnerOverlay(container, true); | ||||
|  | ||||
|             RED.eventLog.startEvent(RED._("palette.editor.confirm.button.install") + " : " + moduleName + " " + moduleVersion); | ||||
|  | ||||
|             installNodeModule(moduleName, moduleVersion, undefined, function(xhr, textStatus, err) { | ||||
|                 //spinner.close(); | ||||
|                 if (err && xhr.status === 504) { | ||||
|                     notification.update(RED._("palette.editor.errors.installTimeout"), { | ||||
|                         modal: true, | ||||
| @@ -1568,7 +1565,7 @@ RED.palette.editor = (function() { | ||||
|                     if (moduleArray.length) { | ||||
|                         installModule(moduleArray.shift()); | ||||
|                     } else { | ||||
|                         notification.update(RED._("palette.editor.successfulInstall"), { ...notificationOptions, type: "success", timeout: 1000 }); | ||||
|                         notification.update(RED._("palette.editor.successfulInstall"), { ...notificationOptions, type: "success", timeout: 10000 }); | ||||
|                     } | ||||
|                 } | ||||
|             }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user