homebridge-melcloud-control 3.9.0-beta.15 → 3.9.0-beta.17
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.
- package/config.schema.json +1 -1
- package/homebridge-ui/public/index.html +37 -10
- package/package.json +1 -1
package/config.schema.json
CHANGED
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
<form id="configForm">
|
|
21
21
|
<div class="text-center">
|
|
22
22
|
<label id="accountName" class="fw-bold" style="font-size: 23px;">Account</label><br>
|
|
23
|
-
<label id="info" class="d-block" style="font-size:
|
|
24
|
-
<label id="info1" class="d-block" style="font-size:
|
|
25
|
-
<label id="info2" class="d-block" style="font-size:
|
|
23
|
+
<label id="info" class="d-block" style="font-size: 14px;"></label>
|
|
24
|
+
<label id="info1" class="d-block" style="font-size: 12px;"></label>
|
|
25
|
+
<label id="info2" class="d-block" style="font-size: 12px;"></label>
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
28
|
<div class="mb-3">
|
|
@@ -35,9 +35,13 @@
|
|
|
35
35
|
<input id="user" type="text" class="form-control" required>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
|
-
<div class="mb-3">
|
|
38
|
+
<div class="mb-3 position-relative">
|
|
39
39
|
<label for="passwd" class="form-label">Password</label>
|
|
40
40
|
<input id="passwd" type="password" class="form-control" autocomplete="off" required>
|
|
41
|
+
<span id="togglePassword"
|
|
42
|
+
style="position:absolute; top:50%; right:10px; cursor:pointer; transform:translateY(-50%)">
|
|
43
|
+
<i class="fas fa-eye"></i>
|
|
44
|
+
</span>
|
|
41
45
|
</div>
|
|
42
46
|
|
|
43
47
|
<div class="mb-3">
|
|
@@ -143,12 +147,35 @@
|
|
|
143
147
|
await homebridge.savePluginConfig(pluginConfig);
|
|
144
148
|
});
|
|
145
149
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
// Config button toggle cleanup
|
|
151
|
+
const configButton = document.getElementById('configButton');
|
|
152
|
+
let configButtonState = false;
|
|
153
|
+
configButton.addEventListener('click', () => {
|
|
154
|
+
configButtonState = !configButtonState;
|
|
155
|
+
homebridge[configButtonState ? 'showSchemaForm' : 'hideSchemaForm']();
|
|
156
|
+
configButton.className = configButtonState ? 'btn btn-primary' : 'btn btn-secondary';
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
// Password show/hide toggle
|
|
160
|
+
const passwdInput = document.getElementById('passwd');
|
|
161
|
+
const togglePassword = document.getElementById('togglePassword');
|
|
162
|
+
|
|
163
|
+
togglePassword.addEventListener('click', () => {
|
|
164
|
+
if (passwdInput.type === 'password') {
|
|
165
|
+
passwdInput.type = 'text';
|
|
166
|
+
togglePassword.innerHTML = '<i class="fas fa-eye-slash"></i>';
|
|
167
|
+
} else {
|
|
168
|
+
passwdInput.type = 'password';
|
|
169
|
+
togglePassword.innerHTML = '<i class="fas fa-eye"></i>';
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
// Optional: toggle password with Tab key (pressing Tab will show/hide)
|
|
174
|
+
passwdInput.addEventListener('keydown', (e) => {
|
|
175
|
+
if (e.key === 'Tab') {
|
|
176
|
+
e.preventDefault(); // prevent default tab behavior
|
|
177
|
+
togglePassword.click();
|
|
178
|
+
}
|
|
152
179
|
});
|
|
153
180
|
|
|
154
181
|
function removeStaleDevices(configDevices, melcloudDevices) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "3.9.0-beta.
|
|
4
|
+
"version": "3.9.0-beta.17",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|