clickgo-native 0.0.17 → 0.0.19
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/dist/index.d.ts +1 -0
- package/dist/index.js +9 -3
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare abstract class AbstractBoot {
|
|
|
12
12
|
run(path: string, opt?: {
|
|
13
13
|
'frame'?: boolean;
|
|
14
14
|
'quit'?: boolean;
|
|
15
|
+
'dev'?: boolean;
|
|
15
16
|
}): void;
|
|
16
17
|
on(name: string, handler: (...param: any[]) => any | Promise<any>, once?: boolean): void;
|
|
17
18
|
once(name: string, handler: (...param: any[]) => any | Promise<any>): void;
|
package/dist/index.js
CHANGED
|
@@ -438,6 +438,9 @@ class AbstractBoot {
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
createForm(path);
|
|
441
|
+
if (form && opt.dev) {
|
|
442
|
+
form.webContents.openDevTools();
|
|
443
|
+
}
|
|
441
444
|
electron.app.on('window-all-closed', function () {
|
|
442
445
|
if (isNoFormQuit) {
|
|
443
446
|
electron.app.quit();
|
|
@@ -448,6 +451,9 @@ class AbstractBoot {
|
|
|
448
451
|
return;
|
|
449
452
|
}
|
|
450
453
|
createForm(path);
|
|
454
|
+
if (form && opt.dev) {
|
|
455
|
+
form.webContents.openDevTools();
|
|
456
|
+
}
|
|
451
457
|
methods['cg-init'] = {
|
|
452
458
|
'once': true,
|
|
453
459
|
handler: function (t) {
|
|
@@ -530,7 +536,7 @@ function createForm(p) {
|
|
|
530
536
|
'webPreferences': {
|
|
531
537
|
'nodeIntegration': false,
|
|
532
538
|
'contextIsolation': true,
|
|
533
|
-
'preload': path.join(__dirname, '/pre.js')
|
|
539
|
+
'preload': path.join(__dirname, '/pre.js'),
|
|
534
540
|
},
|
|
535
541
|
'width': hasFrame ? 800 : 500,
|
|
536
542
|
'height': hasFrame ? 700 : 300,
|
|
@@ -538,10 +544,10 @@ function createForm(p) {
|
|
|
538
544
|
'resizable': false,
|
|
539
545
|
'show': false,
|
|
540
546
|
'center': true,
|
|
541
|
-
'transparent': isImmersion ? true : false
|
|
547
|
+
'transparent': isImmersion ? true : false,
|
|
542
548
|
};
|
|
543
549
|
form = new electron.BrowserWindow(op);
|
|
544
|
-
form.webContents.userAgent = 'electron/' + electron.app.getVersion() + ' ' + platform + '/' + process.arch + ' immersion/' + (isImmersion ? '1' : '0') + ' frame/' + (hasFrame ? '1' : '0');
|
|
550
|
+
form.webContents.userAgent = 'electron/' + electron.app.getVersion() + ' ' + platform + '/' + process.arch + ' immersion/' + (isImmersion ? '1' : '0') + ' frame/' + (hasFrame ? '1' : '0') + ' chrome/' + process.versions.chrome;
|
|
545
551
|
form.once('ready-to-show', function () {
|
|
546
552
|
if (!form) {
|
|
547
553
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clickgo-native",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"description": "The software developed with ClickGo will run in Windows, Mac OS, Linux.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"clickgo",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@litert/eslint-plugin-rules": "^0.3.1",
|
|
18
18
|
"@litert/loader": "^3.5.9",
|
|
19
19
|
"@types/node": "^24.0.14",
|
|
20
|
-
"clickgo": "^3.16.
|
|
20
|
+
"clickgo": "^3.16.21",
|
|
21
21
|
"electron": "^37.2.2",
|
|
22
22
|
"jszip": "^3.10.1",
|
|
23
23
|
"typescript": "^5.8.3"
|