From e5307f6604d2ca3c7bf979ad2e65983e5c1d53e3 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 1 Nov 2023 14:39:51 +0100 Subject: [PATCH] Add a close button to the restart-required notification Fixes #4392 --- .../node_modules/@node-red/editor-client/src/js/red.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/node_modules/@node-red/editor-client/src/js/red.js b/packages/node_modules/@node-red/editor-client/src/js/red.js index 353c2effd..3c92a90ca 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/red.js +++ b/packages/node_modules/@node-red/editor-client/src/js/red.js @@ -498,6 +498,15 @@ var RED = (function() { ] } } + } else if (notificationId === 'restart-required') { + options.buttons = [ + { + text: RED._("common.label.close"), + click: function() { + persistentNotifications[notificationId].hideNotification(); + } + } + ] } if (!persistentNotifications.hasOwnProperty(notificationId)) { persistentNotifications[notificationId] = RED.notify(text,options);