@kitkat-vn/kitcode 0.2.0-staging.7 → 0.2.0-staging.8
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitkat-vn/kitcode",
|
|
3
|
-
"version": "0.2.0-staging.
|
|
3
|
+
"version": "0.2.0-staging.8",
|
|
4
4
|
"description": "Local aggregate activity server for KitCode.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"optionalDependencies": {
|
|
38
38
|
"electron": "^43.0.0"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "e4f9856bb72b43f301e811337cefbbe19f3eacd1"
|
|
41
41
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {app, BrowserWindow, ipcMain, nativeTheme, screen, shell} from 'electron';
|
|
2
|
-
import {
|
|
2
|
+
import {nameApp, showAppIcon} from './app-identity.mjs';
|
|
3
|
+
import {miniWindowOptions} from './companion-window-options.mjs';
|
|
3
4
|
import path from 'node:path';
|
|
4
5
|
import {fileURLToPath} from 'node:url';
|
|
5
6
|
import {reachableAddress} from './api-access.mjs';
|
|
@@ -39,15 +40,7 @@ async function trackerReady() {
|
|
|
39
40
|
|
|
40
41
|
function createMiniWindow(url) {
|
|
41
42
|
const position = miniPosition();
|
|
42
|
-
miniWindow = new BrowserWindow({
|
|
43
|
-
icon: ICON_PATH,
|
|
44
|
-
width: miniWidth, height: miniHeight,
|
|
45
|
-
minWidth: miniWidth, minHeight: miniHeight, maxWidth: miniWidth, maxHeight: miniHeight,
|
|
46
|
-
x: position.x, y: position.y, frame: false, transparent: true, hasShadow: false,
|
|
47
|
-
backgroundColor: '#00000000', resizable: false,
|
|
48
|
-
movable: true, alwaysOnTop: true, skipTaskbar: true, show: false,
|
|
49
|
-
webPreferences: {preload: companionPreload, contextIsolation: true, nodeIntegration: false, sandbox: true},
|
|
50
|
-
});
|
|
43
|
+
miniWindow = new BrowserWindow(miniWindowOptions({width: miniWidth, height: miniHeight, position, preload: companionPreload}));
|
|
51
44
|
keepWindowOnItsPage(miniWindow);
|
|
52
45
|
miniWindow.setAlwaysOnTop(true, 'floating');
|
|
53
46
|
miniWindow.setVisibleOnAllWorkspaces(true, {visibleOnFullScreen: true});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {ICON_PATH} from './app-identity.mjs';
|
|
2
|
+
|
|
3
|
+
// The Mini's window options for Electron (src/companion-electron.mjs), kept apart from Electron so a test can read them.
|
|
4
|
+
// `roundedCorners: false`: macOS rounds a frameless window's corners itself, over whatever the page draws, so the Mini's
|
|
5
|
+
// square red frame (companion-window.mjs) needs it too (the operator, 2026-10-03). Other platforms ignore it.
|
|
6
|
+
export function miniWindowOptions({width, height, position, preload}) {
|
|
7
|
+
return {
|
|
8
|
+
icon: ICON_PATH,
|
|
9
|
+
width, height,
|
|
10
|
+
minWidth: width, minHeight: height, maxWidth: width, maxHeight: height,
|
|
11
|
+
x: position.x, y: position.y, frame: false, transparent: true, hasShadow: false, roundedCorners: false,
|
|
12
|
+
backgroundColor: '#00000000', resizable: false,
|
|
13
|
+
movable: true, alwaysOnTop: true, skipTaskbar: true, show: false,
|
|
14
|
+
webPreferences: {preload, contextIsolation: true, nodeIntegration: false, sandbox: true},
|
|
15
|
+
};
|
|
16
|
+
}
|