@clawlabz/clawskin 1.0.0 → 1.0.1
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/package.json +1 -1
- package/public/js/app/ClawSkinApp.js +3 -2
- package/serve.cjs +3 -3
package/package.json
CHANGED
|
@@ -177,8 +177,9 @@ class ClawSkinApp {
|
|
|
177
177
|
if (window._connPanel) {
|
|
178
178
|
window._connPanel.render(this.settings.load());
|
|
179
179
|
}
|
|
180
|
-
// Use
|
|
181
|
-
|
|
180
|
+
// Use token from local config, fall back to previously saved token
|
|
181
|
+
const token = config.token || saved.token || '';
|
|
182
|
+
this.gateway.connect(config.gatewayUrl, token);
|
|
182
183
|
return;
|
|
183
184
|
}
|
|
184
185
|
}
|
package/serve.cjs
CHANGED
|
@@ -46,9 +46,9 @@ function getLocalGatewayConfig() {
|
|
|
46
46
|
const port = gw.port || 18789;
|
|
47
47
|
return {
|
|
48
48
|
gatewayUrl: `ws://localhost:${port}`,
|
|
49
|
-
//
|
|
50
|
-
// The
|
|
51
|
-
|
|
49
|
+
// Safe to expose token on localhost — serve.cjs binds to 127.0.0.1 by default.
|
|
50
|
+
// The token never leaves the local machine.
|
|
51
|
+
token: (gw.auth && gw.auth.token) || '',
|
|
52
52
|
};
|
|
53
53
|
} catch { continue; }
|
|
54
54
|
}
|