Merge pull request #4407 from node-red/4392-add-close-button-to-restart-notification

Add a close button to the restart-required notification
pull/4411/head
Nick O'Leary 2023-11-01 15:20:48 +01:00 committed by GitHub
commit 6ac905f264
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -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);