From 70c9252f60962b782b6b89f1e4b2b07f83a05a33 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 9 Mar 2021 13:04:59 -0800 Subject: [PATCH] Added background color to device filter box when active. --- db.js | 1 + views/default-mobile.handlebars | 3 ++- views/default.handlebars | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/db.js b/db.js index 5ab0c18f..34922dfc 100644 --- a/db.js +++ b/db.js @@ -1555,6 +1555,7 @@ module.exports.CreateDB = function (parent, func) { // Check that we have access to MongoDump var backupPath = parent.backuppath; if (parent.config.settings.autobackup && parent.config.settings.autobackup.backuppath) { backupPath = parent.config.settings.autobackup.backuppath; } + try { parent.fs.mkdirSync(backupPath); } catch (e) { } var mongoDumpPath = 'mongodump'; if (parent.config.settings.autobackup && parent.config.settings.autobackup.mongodumppath) { mongoDumpPath = parent.config.settings.autobackup.mongodumppath; } const child_process = require('child_process'); diff --git a/views/default-mobile.handlebars b/views/default-mobile.handlebars index 53d4f9d2..693897f9 100644 --- a/views/default-mobile.handlebars +++ b/views/default-mobile.handlebars @@ -662,7 +662,7 @@
X -   +  
@@ -2544,6 +2544,7 @@ function onSearchInputChanged() { var x = Q('SearchInput').value.toLowerCase().trim(); putstore('_search', Q('SearchInput').value); + QS('SearchInput')['background-color'] = (x == '') ? '#FFFFFF' : '#FDFFBE'; var userSearch = null, ipSearch = null, groupSearch = null, tagSearch = null, agentTagSearch = null, wscSearch = null, osSearch = null, amtSearch = null; if (x.startsWith("user:".toLowerCase())) { userSearch = x.substring("user:".length); } else if (x.startsWith("u:".toLowerCase())) { userSearch = x.substring("u:".length); } diff --git a/views/default.handlebars b/views/default.handlebars index 384f9e80..2ca95879 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -270,6 +270,7 @@     +    @@ -4855,7 +4856,9 @@ function onSearchInputChanged() { var x = Q('SearchInput').value.toLowerCase().trim(); putstore('_search', Q('SearchInput').value); + QS('SearchInput')['background-color'] = QS('KvmSearchInput')['background-color'] = (x == '')?null:'#FDFFBE'; QV('SearchInputClearButton', (x != '') && (navigator.userAgent.indexOf('Firefox') >= 0)); + QV('KvmSearchInputClearButton', (x != '') && (navigator.userAgent.indexOf('Firefox') >= 0)); var userSearch = null, ipSearch = null, groupSearch = null, tagSearch = null, agentTagSearch = null, wscSearch = null, osSearch = null, amtSearch = null; if (x.startsWith("user:".toLowerCase())) { userSearch = x.substring("user:".length); } else if (x.startsWith("u:".toLowerCase())) { userSearch = x.substring("u:".length); }