santech-galaxy-component 2.5.20 → 2.5.22

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.
@@ -114345,8 +114345,11 @@ function WebServer(mgr) {
114345
114345
  };
114346
114346
  this.connect = function () {
114347
114347
  if (!_this.tryConnect) return;
114348
- var con = new WebSocket('ws://127.0.0.1:' + mgr.Config.edge.port);
114349
- console.log("开始连接服务:" + 'ws://127.0.0.1:' + mgr.Config.edge.port);
114348
+ const isSecure = window.location.protocol === 'https:';
114349
+ const wsProtocol = isSecure ? 'wss://' : 'ws://';
114350
+ const host = window.location.hostname; // 包含域名和端口
114351
+ var con = new WebSocket(wsProtocol + host + ':' + mgr.Config.edge.port);
114352
+ console.log("开始连接服务:" + wsProtocol + host + ':' + mgr.Config.edge.port);
114350
114353
 
114351
114354
  // 打开Socket
114352
114355
  con.onopen = function (event) {
@@ -114766,6 +114769,7 @@ function WordPasterManager() {
114766
114769
  this.app.postMessage = this.app.postMessageEdge;
114767
114770
  }
114768
114771
  this.pluginLoad = function () {
114772
+ console.log("########this.pluginInited#############", this.pluginInited);
114769
114773
  if (!this.pluginInited) {
114770
114774
  if (this.data.browser.edge) {
114771
114775
  this.edgeApp.connect();
@@ -114773,6 +114777,7 @@ function WordPasterManager() {
114773
114777
  }
114774
114778
  };
114775
114779
  this.pluginCheck = function () {
114780
+ console.log("########this.pluginCheck#############", this.pluginInited);
114776
114781
  if (!this.pluginInited) {
114777
114782
  this.setup_tip();
114778
114783
  this.pluginLoad();
@@ -114796,8 +114801,8 @@ function WordPasterManager() {
114796
114801
  dom.find('span[name="setupOk"]').click(function () {
114797
114802
  _this.pluginLoad();
114798
114803
  });
114799
- dom.find("img[name='ok']").attr("src", "../../public/WordPaster/css/ok.png");
114800
- dom.find("img[name='setup']").attr("src", "../../public/WordPaster/css/setup.png");
114804
+ dom.find("img[name='ok']").attr("src", "../../WordPaster/ok.png");
114805
+ dom.find("img[name='setup']").attr("src", "../../WordPaster/setup.png");
114801
114806
  this.ui.dialog.paste = layer.open({
114802
114807
  type: 1,
114803
114808
  title: "安装提示",
package/lib/index.umd.js CHANGED
@@ -114354,8 +114354,11 @@ function WebServer(mgr) {
114354
114354
  };
114355
114355
  this.connect = function () {
114356
114356
  if (!_this.tryConnect) return;
114357
- var con = new WebSocket('ws://127.0.0.1:' + mgr.Config.edge.port);
114358
- console.log("开始连接服务:" + 'ws://127.0.0.1:' + mgr.Config.edge.port);
114357
+ const isSecure = window.location.protocol === 'https:';
114358
+ const wsProtocol = isSecure ? 'wss://' : 'ws://';
114359
+ const host = window.location.hostname; // 包含域名和端口
114360
+ var con = new WebSocket(wsProtocol + host + ':' + mgr.Config.edge.port);
114361
+ console.log("开始连接服务:" + wsProtocol + host + ':' + mgr.Config.edge.port);
114359
114362
 
114360
114363
  // 打开Socket
114361
114364
  con.onopen = function (event) {
@@ -114775,6 +114778,7 @@ function WordPasterManager() {
114775
114778
  this.app.postMessage = this.app.postMessageEdge;
114776
114779
  }
114777
114780
  this.pluginLoad = function () {
114781
+ console.log("########this.pluginInited#############", this.pluginInited);
114778
114782
  if (!this.pluginInited) {
114779
114783
  if (this.data.browser.edge) {
114780
114784
  this.edgeApp.connect();
@@ -114782,6 +114786,7 @@ function WordPasterManager() {
114782
114786
  }
114783
114787
  };
114784
114788
  this.pluginCheck = function () {
114789
+ console.log("########this.pluginCheck#############", this.pluginInited);
114785
114790
  if (!this.pluginInited) {
114786
114791
  this.setup_tip();
114787
114792
  this.pluginLoad();
@@ -114805,8 +114810,8 @@ function WordPasterManager() {
114805
114810
  dom.find('span[name="setupOk"]').click(function () {
114806
114811
  _this.pluginLoad();
114807
114812
  });
114808
- dom.find("img[name='ok']").attr("src", "../../public/WordPaster/css/ok.png");
114809
- dom.find("img[name='setup']").attr("src", "../../public/WordPaster/css/setup.png");
114813
+ dom.find("img[name='ok']").attr("src", "../../WordPaster/ok.png");
114814
+ dom.find("img[name='setup']").attr("src", "../../WordPaster/setup.png");
114810
114815
  this.ui.dialog.paste = layer.open({
114811
114816
  type: 1,
114812
114817
  title: "安装提示",