clickgo-native 2.0.0 → 2.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.
Files changed (2) hide show
  1. package/dist/index.js +4 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -537,8 +537,6 @@ export function verifyToken(t) {
537
537
  function createForm(p, opt = {}) {
538
538
  const url = decodeURIComponent(import.meta.url).replace('file://', '').replace(/^\/(\w:)/, '$1');
539
539
  let pre = nodePath.join(url.slice(0, url.lastIndexOf('/') + 1), './pre.js');
540
- /** --- Linux 新版 Electron 无框窗口需要透明背景,避免 CSD 外边距显示为黑框 --- */
541
- const transparent = opt.transparent ?? ((platform === 'linux') && !hasFrame);
542
540
  const op = {
543
541
  'webPreferences': {
544
542
  'nodeIntegration': false,
@@ -546,17 +544,14 @@ function createForm(p, opt = {}) {
546
544
  'preload': pre,
547
545
  },
548
546
  'width': opt.width ?? (hasFrame ? 800 : 600),
549
- 'height': opt.height ?? (hasFrame ? 700 : 350),
547
+ 'height': opt.height ?? (hasFrame ? 700 : 400),
550
548
  'frame': hasFrame,
551
- 'thickFrame': platform === 'win32' ? hasFrame : undefined,
552
- 'roundedCorners': platform === 'linux' ? hasFrame : undefined,
553
- 'hasShadow': platform === 'linux' ? hasFrame : undefined,
554
549
  'resizable': false,
555
550
  'show': false,
556
551
  'center': true,
557
552
  'maximizable': opt.max ?? true,
558
- 'backgroundColor': transparent ? 'rgba(0, 0, 0, 0)' : (opt.background ?? 'rgba(0, 0, 0, 1)'),
559
- 'transparent': transparent,
553
+ 'backgroundColor': opt.background ?? 'rgba(0, 0, 0, 1)',
554
+ 'transparent': opt.transparent,
560
555
  };
561
556
  form = new electron.BrowserWindow(op);
562
557
  form.webContents.userAgent = 'electron/' + electron.app.getVersion() + ' ' + platform + '/' + process.arch + ' frame/' + (hasFrame ? '1' : '0') + ' chrome/' + process.versions.chrome;
@@ -565,7 +560,7 @@ function createForm(p, opt = {}) {
565
560
  return;
566
561
  }
567
562
  if (opt.background) {
568
- form.setBackgroundColor(transparent ? 'rgba(0, 0, 0, 0)' : 'rgba(0, 0, 0, 1)');
563
+ form.setBackgroundColor(opt.transparent ? 'rgba(0, 0, 0, 0)' : 'rgba(0, 0, 0, 1)');
569
564
  }
570
565
  form.show();
571
566
  if (opt.stateMax) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clickgo-native",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "The software developed with ClickGo will run in Windows, Mac OS, Linux.",
5
5
  "type": "module",
6
6
  "keywords": [