From b24cce5f0a83f6e4d3f1c53642a0feda7916beb2 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 19 Jun 2024 17:51:17 +0200 Subject: [PATCH] Fix restoring default color --- lib/commands/admin-rpc.js | 2 +- www/install/onboardscreen.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/commands/admin-rpc.js b/lib/commands/admin-rpc.js index 080073caf..30415dd17 100644 --- a/lib/commands/admin-rpc.js +++ b/lib/commands/admin-rpc.js @@ -1012,7 +1012,7 @@ var uploadLogo = (Env, Server, cb, data, unsafeKey) => { var changeColor = (Env, Server, cb, data, unsafeKey) => { const args = Array.isArray(data) && data[1]; if (!args || typeof(args) !== 'object') { return void cb("EINVAL"); } - let color = args.color || args.selectedColor; + let color = args.color; adminDecree(Env, null, function (err) { if (err) { return void cb(err); } Env.flushCache(); diff --git a/www/install/onboardscreen.js b/www/install/onboardscreen.js index 16dbc8f48..29663ff4a 100644 --- a/www/install/onboardscreen.js +++ b/www/install/onboardscreen.js @@ -168,7 +168,7 @@ define([ let hex = Util.rgbToHex(rgb); selectorColor = hex; // XXX Save only at the end - sendAdminRpc('CHANGE_COLOR', {selectedColor}, function (e, response) { + sendAdminRpc('CHANGE_COLOR', {color:selectedColor}, function (e, response) { if (e || response.error) { UI.warn(Messages.error); console.error(e, response);