Make sure to show only one external address warning notification at once
This commit is contained in:
1 parent
b77380a8ac
commit
087a9ece2c
1 file changed
+9
-2
@@ -20,6 +20,8 @@ $(function() {
|
||||
self.elementPasswordInput = undefined;
|
||||
self.elementLoginButton = undefined;
|
||||
|
||||
self.externalAddressNotification = undefined;
|
||||
|
||||
self.userMenuText = ko.pureComputed(function() {
|
||||
if (self.loggedIn()) {
|
||||
return self.username();
|
||||
@@ -80,10 +82,15 @@ $(function() {
|
||||
"everyone with an internet connection.</p><p><strong>Please see " +
|
||||
"<a href=\"%(url)s\" target=\"_blank\" rel=\"noreferrer noopener\">this blog post</a> for " +
|
||||
"ways to safely access your OctoPrint instance from remote.</strong></p>" +
|
||||
"<p><small>If you know what you are doing or you are sure this message is" +
|
||||
"<p><small>If you know what you are doing or you are sure this message is " +
|
||||
"mistaken since you are in an isolated LAN, feel free to ignore it.</small></p>");
|
||||
text = _.sprintf(text, {url: "https://octoprint.org/blog/2018/09/03/safe-remote-access/"});
|
||||
new PNotify({
|
||||
|
||||
if (self.externalAddressNotification !== undefined) {
|
||||
self.externalAddressNotification.remove();
|
||||
}
|
||||
|
||||
self.externalAddressNotification = new PNotify({
|
||||
title: gettext("Possible external access detected"),
|
||||
text: text,
|
||||
hide: false,
|
||||
|
||||
Reference in new issue
Block a user