From 759a358cd46a52202c2cbd6124fd1c137062033c Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Fri, 10 Jan 2020 16:25:02 -0800 Subject: [PATCH] Added plug-in tab back button, Bad user login limitor is now per-public IPv4 subnet. --- meshuser.js | 6 +++++- translate/translate.json | 3 ++- views/default.handlebars | 15 +++++++++------ webserver.js | 4 ++++ 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/meshuser.js b/meshuser.js index 6dfdff15..7e4d34c0 100644 --- a/meshuser.js +++ b/meshuser.js @@ -699,7 +699,11 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use if (typeof parent.badLoginTable[i] == 'number') { r += "Cooloff for " + Math.floor((parent.badLoginTable[i] - Date.now()) / 60000) + " minute(s)\r\n"; } else { - r += (i + ' - ' + parent.badLoginTable[i].length + " entries\r\n"); + if (parent.badLoginTable[i].length > 1) { + r += (i + ' - ' + parent.badLoginTable[i].length + " records\r\n"); + } else { + r += (i + ' - ' + parent.badLoginTable[i].length + " record\r\n"); + } } } if (badLoginCount == 0) { r += 'No bad logins.'; } diff --git a/translate/translate.json b/translate/translate.json index 7eed871b..1277e4ac 100644 --- a/translate/translate.json +++ b/translate/translate.json @@ -2804,6 +2804,7 @@ "default.handlebars->container->column_l->p15->p15title->p15BackButton", "default.handlebars->container->column_l->p16->p16title->p16BackButton", "default.handlebars->container->column_l->p17->p17title->p17BackButton", + "default.handlebars->container->column_l->p19->p19title->p19BackButton", "default.handlebars->container->column_l->p20->p20title->3", "default.handlebars->container->column_l->p21->p21title->1", "default.handlebars->container->column_l->p30->1->1->0->1->p30title->1", @@ -12552,7 +12553,7 @@ "pt": "Plugins -", "ru": "Плагины - ", "xloc": [ - "default.handlebars->container->column_l->p19->1" + "default.handlebars->container->column_l->p19->p19title->3" ] }, { diff --git a/views/default.handlebars b/views/default.handlebars index 0dd0820e..262ccb5e 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -788,6 +788,14 @@
+ -