homebridge-melcloud-control 3.7.3-beta.1 → 3.7.3-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
</div>
|
|
73
73
|
|
|
74
74
|
<div class="text-center">
|
|
75
|
-
<button id="logIn" type="button" class="btn btn-
|
|
75
|
+
<button id="logIn" type="button" class="btn btn-secondary">Connect to MELCloud</button>
|
|
76
76
|
<button id="configButton" type="button" class="btn btn-secondary"><i class="fas fa-gear"></i></button>
|
|
77
77
|
</div>
|
|
78
78
|
</form>
|
|
@@ -158,6 +158,8 @@
|
|
|
158
158
|
//watch for click on the login button
|
|
159
159
|
document.getElementById('logIn').addEventListener('click', async () => {
|
|
160
160
|
homebridge.showSpinner();
|
|
161
|
+
|
|
162
|
+
document.getElementById(`logIn`).setAttribute("class", "btn btn-primary");
|
|
161
163
|
document.getElementById('info').innerHTML = 'Connecting...';
|
|
162
164
|
document.getElementById('info').style.color = 'yellow';
|
|
163
165
|
|
|
@@ -402,12 +404,17 @@
|
|
|
402
404
|
//update ans save plugin config
|
|
403
405
|
await homebridge.updatePluginConfig(pluginConfig);
|
|
404
406
|
await homebridge.savePluginConfig(pluginConfig);
|
|
407
|
+
|
|
408
|
+
//update button state
|
|
409
|
+
document.getElementById(`logIn`).setAttribute("class", "btn btn-secondary");
|
|
410
|
+
|
|
405
411
|
homebridge.hideSpinner();
|
|
406
412
|
} catch (error) {
|
|
407
413
|
document.getElementById('info').innerHTML = 'Check Your credentials data and try again.';
|
|
408
414
|
document.getElementById('info').style.color = 'yellow';
|
|
409
415
|
document.getElementById('info1').innerHTML = `Error: ${error}`;
|
|
410
416
|
document.getElementById('info1').style.color = 'red';
|
|
417
|
+
document.getElementById(`logIn`).setAttribute("class", "btn btn-secondary");
|
|
411
418
|
} finally {
|
|
412
419
|
homebridge.hideSpinner();
|
|
413
420
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "3.7.3-beta.
|
|
4
|
+
"version": "3.7.3-beta.3",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|