cicy-desktop 2.1.74 → 2.1.76
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/.github/workflows/npm-publish.yml +14 -0
- package/package.json +6 -6
- package/src/backends/homepage-react/assets/{index-C9AZlTew.css → index-CPH-S8uU.css} +1 -1
- package/src/backends/homepage-react/assets/index-DuWX0iug.js +365 -0
- package/src/backends/homepage-react/index.html +2 -2
- package/src/backends/homepage-window.js +2 -0
- package/src/main.js +8 -0
- package/src/utils/app-icon.js +22 -0
- package/src/utils/window-utils.js +2 -0
- package/workers/render/package-lock.json +1132 -321
- package/workers/render/src/App.jsx +11 -3
- package/src/backends/homepage-react/assets/index-BpljolQs.js +0 -365
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<title>CiCy Desktop</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/index-
|
|
8
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
7
|
+
<script type="module" crossorigin src="./assets/index-DuWX0iug.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="./assets/index-CPH-S8uU.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
|
@@ -32,6 +32,8 @@ async function openHomepage() {
|
|
|
32
32
|
minWidth: 360,
|
|
33
33
|
minHeight: 480,
|
|
34
34
|
title: "CiCy Desktop",
|
|
35
|
+
icon: require("../utils/app-icon").appIconPath(), // npx/unpackaged → set the
|
|
36
|
+
// window+taskbar icon ourselves (no .exe to embed it on Windows).
|
|
35
37
|
backgroundColor: "#0d1117",
|
|
36
38
|
titleBarStyle: process.platform === "darwin" ? "hiddenInset" : "default",
|
|
37
39
|
// Auto-hide the native menu bar on win/linux. The bar reappears when
|
package/src/main.js
CHANGED
|
@@ -117,6 +117,14 @@ if (!__singleLock) {
|
|
|
117
117
|
electronApp.exit(0);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
// Windows groups taskbar buttons + picks the taskbar icon by AppUserModelId.
|
|
121
|
+
// Unpackaged (npx / npm i -g) there's no installer to register one, so without
|
|
122
|
+
// this the taskbar shows the stock Electron icon even when each BrowserWindow
|
|
123
|
+
// sets its own. Must be set before any window is created. (No-op off Windows.)
|
|
124
|
+
if (process.platform === "win32") {
|
|
125
|
+
try { electronApp.setAppUserModelId("com.cicy.desktop"); } catch {}
|
|
126
|
+
}
|
|
127
|
+
|
|
120
128
|
// Register cicy-desktop:// as the desktop's URL protocol. We MOVED off the bare
|
|
121
129
|
// `cicy://` scheme because it collides: the CiCy mobile/Expo app (com.cicy-ai
|
|
122
130
|
// .mobile) and a generic com.github.Electron both claim `cicy:`, so a browser
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Resolve the bundled app icon for BrowserWindow({ icon }).
|
|
2
|
+
//
|
|
3
|
+
// When cicy-desktop runs UNPACKAGED (npx / npm i -g — the mac/win/linux default,
|
|
4
|
+
// 主人令), there is no electron-builder .exe to embed the icon, so every window
|
|
5
|
+
// falls back to the stock Electron icon unless we point BrowserWindow at our own
|
|
6
|
+
// icon file explicitly. The icons ship in build/ (published — no files[]/.npmignore
|
|
7
|
+
// excludes it). Windows wants a .ico; linux a .png; macOS takes the dock icon
|
|
8
|
+
// from elsewhere but a .png here is harmless.
|
|
9
|
+
const path = require("path");
|
|
10
|
+
|
|
11
|
+
const ROOT = path.join(__dirname, "..", ".."); // src/utils → package root
|
|
12
|
+
const ICON = {
|
|
13
|
+
win32: path.join(ROOT, "build", "icon.ico"),
|
|
14
|
+
linux: path.join(ROOT, "build", "icon.png"),
|
|
15
|
+
darwin: path.join(ROOT, "build", "icon.png"),
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
function appIconPath() {
|
|
19
|
+
return ICON[process.platform] || ICON.linux;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
module.exports = { appIconPath };
|
|
@@ -284,6 +284,8 @@ function createWindow(options = {}, accountIdx = 0, forceNew = false) {
|
|
|
284
284
|
height: winHeight,
|
|
285
285
|
x: posX,
|
|
286
286
|
y: posY,
|
|
287
|
+
icon: require("./app-icon").appIconPath(), // npx/unpackaged → set our own icon
|
|
288
|
+
// (Windows has no built .exe to embed it; default electron icon otherwise).
|
|
287
289
|
// Native menu bar collapses by default on win/linux; press Alt to
|
|
288
290
|
// peek. Same UX as the homepage window — keeps the chrome out of
|
|
289
291
|
// the way for backend pages.
|