homebridge-xbox-tv 2.7.11-beta.21 → 2.7.11-beta.24

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.
@@ -17,7 +17,7 @@
17
17
  <label for="deviceTokenInput">Web Api Token</label>
18
18
  <input type="text" class="form-control" id="deviceTokenInput"><br>
19
19
  <label for="deviceWebApiControl">Web Api Control</label>
20
- <input type="checkbox" class="btn btn-primary" id="deviceWebApiControl">
20
+ <input type="checkbox" class="form-control" id="deviceWebApiControl">
21
21
  </div>
22
22
  <div class="text-center">
23
23
  <button id="startAuthorizationButton" type="button" class="btn btn-primary">Start authorization</button>
@@ -88,15 +88,12 @@
88
88
  pluginConfig[0].devices[this.deviceIndex].xboxWebApiToken = document.querySelector('#deviceTokenInput').value;
89
89
  pluginConfig[0].devices[this.deviceIndex].webApiControl = document.querySelector('#deviceWebApiControl').checked;
90
90
 
91
- const tokenLength = (document.querySelector('#deviceTokenInput').value).length;
91
+ const tokenLength = (pluginConfig[0].devices[this.deviceIndex].xboxWebApiToken).length;
92
92
  if (tokenLength <= 10) {
93
93
  document.getElementById('startAuthorizationButton').innerText = "Start authorization";
94
94
  document.getElementById('startAuthorizationButton').removeAttribute('disabled');
95
- document.getElementById('deviceWebApiControl').checked = false;
96
- document.getElementById('deviceWebApiControl').disabled = true;
97
95
  } else {
98
96
  document.getElementById('authorizeConsoleButton').setAttribute('disabled', 'disabled');
99
- document.getElementById('deviceWebApiControl').disabled = false;
100
97
  }
101
98
 
102
99
  await homebridge.savePluginConfig(pluginConfig);
@@ -145,7 +142,7 @@
145
142
  };
146
143
  });
147
144
 
148
- // watch for click events on the startAuthorizationButton
145
+ //watch for click on the Start authorization button
149
146
  document.getElementById('startAuthorizationButton').addEventListener('click', async () => {
150
147
  await homebridge.updatePluginConfig(pluginConfig);
151
148
  homebridge.showSpinner();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Xbox TV",
3
3
  "name": "homebridge-xbox-tv",
4
- "version": "2.7.11-beta.21",
4
+ "version": "2.7.11-beta.24",
5
5
  "description": "Homebridge plugin (https://github.com/homebridge/homebridge) to control Xbox game consoles.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",