From 35fbfabc84b63c1f2d00051515cf63c68fc78f6c Mon Sep 17 00:00:00 2001 From: Lord-Grey Date: Mon, 1 Nov 2021 17:29:02 +0100 Subject: [PATCH] Set default config for Razer --- assets/webconfig/js/content_leds.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/assets/webconfig/js/content_leds.js b/assets/webconfig/js/content_leds.js index aa69fbca..ad27c41d 100755 --- a/assets/webconfig/js/content_leds.js +++ b/assets/webconfig/js/content_leds.js @@ -777,6 +777,12 @@ $(document).ready(function () { colorOrderDefault = "rgb"; break; + case "razer": + conf_editor.getEditor("root.generalOptions").disable(); + hwLedCountDefault = 1; + colorOrderDefault = "bgr"; + break; + default: } @@ -1289,6 +1295,7 @@ function saveLedConfig(genDefLayout = false) { case "sk9822": case "ws2812spi": case "piblaster": + case "razer": default: if (genDefLayout === true) { ledConfig = { @@ -1612,7 +1619,7 @@ function updateElements(ledType, key) { var maxLedCount = ledProperties.maxLedCount if (hardwareLedCount > maxLedCount) { - showInfoDialog('warning', $.i18n("conf_leds_config_warning"), $.i18n('conf_leds_error_hwled_gt_maxled', hardwareLedCount, maxLedCount, maxLedCount)); + showInfoDialog('warning', $.i18n("conf_leds_config_warning"), $.i18n('conf_leds_error_hwled_gt_maxled', hardwareLedCount, maxLedCount, maxLedCount)); hardwareLedCount = maxLedCount; } }