@jgrimard/homebridge-vivint 2.0.2-beta.0 → 2.0.2

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.
@@ -87,9 +87,16 @@
87
87
  const saveToken = async (refreshToken) => {
88
88
  pluginConfig[0].refreshToken = refreshToken;
89
89
  await homebridge.updatePluginConfig(pluginConfig);
90
- await homebridge.savePluginConfig();
91
- homebridge.toast.success('Vivint account linked. Restart Homebridge (or the child bridge) to apply.', 'Success');
90
+ // Deliberately NOT calling homebridge.savePluginConfig() here: on
91
+ // config-ui-x v5 the parent passes its save promise straight into
92
+ // postMessage, which throws DataCloneError and never answers, leaving
93
+ // the spinner up forever. The modal's own Save button uses the working
94
+ // code path (and offers the restart prompt), so send the user there.
92
95
  refreshView();
96
+ const status = $('tokenStatus');
97
+ status.className = 'alert alert-success';
98
+ status.textContent = 'Vivint account linked! Now click Save below, then restart Homebridge to apply.';
99
+ homebridge.toast.success('Click Save below, then restart Homebridge.', 'Vivint Account Linked');
93
100
  };
94
101
 
95
102
  $('loginForm').addEventListener('submit', async (event) => {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@jgrimard/homebridge-vivint",
3
3
  "displayName": "Homebridge Vivint",
4
4
  "type": "module",
5
- "version": "2.0.2-beta.0",
5
+ "version": "2.0.2",
6
6
  "description": "Homebridge plugin for Vivint Smart Home security systems and devices.",
7
7
  "license": "Apache-2.0",
8
8
  "author": "Jason Grimard",