cdp-tunnel 2.8.1 → 2.8.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.
|
@@ -812,8 +812,8 @@
|
|
|
812
812
|
</div>
|
|
813
813
|
</div>
|
|
814
814
|
<div class="add-conn-form">
|
|
815
|
-
<input type="text" class="input-tag" id="newConnTag" placeholder="名称">
|
|
816
|
-
<input type="text" class="input-url" id="newConnUrl" placeholder="ws://localhost:
|
|
815
|
+
<input type="text" class="input-tag" id="newConnTag" placeholder="名称" value="local">
|
|
816
|
+
<input type="text" class="input-url" id="newConnUrl" placeholder="ws://localhost:9221/plugin" value="ws://localhost:9221/plugin">
|
|
817
817
|
<button class="btn btn-primary btn-sm" id="addConnBtn">添加连接</button>
|
|
818
818
|
</div>
|
|
819
819
|
</div>
|
|
@@ -271,6 +271,14 @@
|
|
|
271
271
|
function loadAndRenderConnections() {
|
|
272
272
|
if (typeof Config !== 'undefined' && Config.getConnections) {
|
|
273
273
|
Config.getConnections(function(connections) {
|
|
274
|
+
if ((!connections || connections.length === 0) && Config.addConnection) {
|
|
275
|
+
Config.addConnection({ tag: 'local', url: 'ws://localhost:9221/plugin' }, function() {
|
|
276
|
+
Config.getConnections(function(updated) {
|
|
277
|
+
renderConnections(updated);
|
|
278
|
+
});
|
|
279
|
+
});
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
274
282
|
renderConnections(connections);
|
|
275
283
|
});
|
|
276
284
|
}
|
package/package.json
CHANGED