clickgo-native 0.0.15 → 0.0.17

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.
Files changed (3) hide show
  1. package/README.md +0 -1
  2. package/dist/index.js +17 -10
  3. package/package.json +2 -4
package/README.md CHANGED
@@ -4,7 +4,6 @@
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/clickgo-native.svg?colorB=brightgreen)](https://www.npmjs.com/package/clickgo-native "Stable Version")
6
6
  [![npm version](https://img.shields.io/npm/v/clickgo-native/dev.svg)](https://www.npmjs.com/package/clickgo-native "Development Version")
7
- [![npm version](https://img.shields.io/npm/v/clickgo-native/beta.svg)](https://www.npmjs.com/package/clickgo-native "Beta Version")
8
7
  [![License](https://img.shields.io/github/license/maiyun/clickgo-native.svg)](https://github.com/maiyun/clickgo-native/blob/master/LICENSE)
9
8
  [![GitHub issues](https://img.shields.io/github/issues/maiyun/clickgo-native.svg)](https://github.com/maiyun/clickgo-native/issues)
10
9
  [![GitHub Releases](https://img.shields.io/github/release/maiyun/clickgo-native.svg)](https://github.com/maiyun/clickgo-native/releases "Stable Release")
package/dist/index.js CHANGED
@@ -96,7 +96,7 @@ const methods = {
96
96
  'cg-set-state': {
97
97
  'once': false,
98
98
  handler: function (t, state) {
99
- if (!hasFrame || !form || !state) {
99
+ if (!form || !state) {
100
100
  return;
101
101
  }
102
102
  if (!verifyToken(t)) {
@@ -554,16 +554,23 @@ function createForm(p) {
554
554
  }
555
555
  form.show();
556
556
  });
557
- const lio = p.indexOf('?');
558
- const search = lio === -1 ? '' : p.slice(lio + 1);
559
- if (lio !== -1) {
560
- p = p.slice(0, lio);
557
+ if (p.startsWith('https://') || p.startsWith('http://')) {
558
+ form.loadURL(p).catch(function (e) {
559
+ throw e;
560
+ });
561
+ }
562
+ else {
563
+ const lio = p.indexOf('?');
564
+ const search = lio === -1 ? '' : p.slice(lio + 1);
565
+ if (lio !== -1) {
566
+ p = p.slice(0, lio);
567
+ }
568
+ form.loadFile(p, {
569
+ 'search': search
570
+ }).catch(function (e) {
571
+ throw e;
572
+ });
561
573
  }
562
- form.loadFile(p, {
563
- 'search': search
564
- }).catch(function (e) {
565
- throw e;
566
- });
567
574
  form.on('close', function () {
568
575
  form = undefined;
569
576
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clickgo-native",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "description": "The software developed with ClickGo will run in Windows, Mac OS, Linux.",
5
5
  "keywords": [
6
6
  "clickgo",
@@ -18,10 +18,8 @@
18
18
  "@litert/loader": "^3.5.9",
19
19
  "@types/node": "^24.0.14",
20
20
  "clickgo": "^3.16.20",
21
+ "electron": "^37.2.2",
21
22
  "jszip": "^3.10.1",
22
23
  "typescript": "^5.8.3"
23
- },
24
- "dependencies": {
25
- "electron": "^37.2.2"
26
24
  }
27
25
  }