cicy-desktop 2.1.63 → 2.1.64
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 +1 -1
- package/src/backends/homepage-window.js +7 -12
- package/src/main.js +3 -3
package/package.json
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
// Homepage window — primary CiCy Desktop window. Singleton; closing it
|
|
2
2
|
// does NOT quit the app.
|
|
3
3
|
//
|
|
4
|
-
// URL selection (HARDCODED — no env/dev-URL switch, no Vite): ALL
|
|
5
|
-
// load the bundled local file:// SPA — works offline, fast, no
|
|
6
|
-
// dependency, no mixed-content concerns when embedding the
|
|
7
|
-
// webview (the cicy-desktop preload's IPC bridge still
|
|
8
|
-
//
|
|
4
|
+
// URL selection (HARDCODED — no env/dev-URL switch, no Vite, no remote): ALL
|
|
5
|
+
// platforms load the bundled local file:// SPA — works offline, fast, no
|
|
6
|
+
// remote dependency, no mixed-content concerns when embedding the
|
|
7
|
+
// team-assistant webview (the cicy-desktop preload's IPC bridge still
|
|
8
|
+
// attaches).
|
|
9
9
|
|
|
10
10
|
const path = require("path");
|
|
11
11
|
const { BrowserWindow } = require("electron");
|
|
12
12
|
const log = require("electron-log");
|
|
13
13
|
|
|
14
|
-
const REMOTE_URL = "https://desktop.cicy-ai.com/"; // Cloudflare worker (fallback only)
|
|
15
14
|
const LOCAL_INDEX = path.join(__dirname, "homepage-react", "index.html");
|
|
16
15
|
|
|
17
16
|
function pickHomepageURL() {
|
|
@@ -76,14 +75,10 @@ async function openHomepage() {
|
|
|
76
75
|
homepage.webContents.on("console-message", (_e, level, msg, line, source) => {
|
|
77
76
|
if (level >= 1) console.log(`[homepage:console L${line}] ${msg} (${source})`);
|
|
78
77
|
});
|
|
79
|
-
//
|
|
80
|
-
//
|
|
78
|
+
// Log load failures (corrupt/missing install) — no remote fallback by
|
|
79
|
+
// design: the homepage is the bundled SPA, full stop.
|
|
81
80
|
homepage.webContents.on("did-fail-load", (_e, code, desc, url) => {
|
|
82
81
|
console.error(`[homepage] did-fail-load ${code} ${desc} ${url}`);
|
|
83
|
-
if (url && url.startsWith("file://")) {
|
|
84
|
-
log.warn(`[homepage] bundled homepage failed, falling back to ${REMOTE_URL}`);
|
|
85
|
-
homepage.loadURL(REMOTE_URL);
|
|
86
|
-
}
|
|
87
82
|
});
|
|
88
83
|
homepage.on("closed", () => { homepage = null; });
|
|
89
84
|
return homepage;
|
package/src/main.js
CHANGED
|
@@ -729,9 +729,9 @@ electronApp.whenReady().then(async () => {
|
|
|
729
729
|
// Persist the cloud login durably in the MAIN process (global.json),
|
|
730
730
|
// independent of the homepage renderer's origin. The renderer keeps the
|
|
731
731
|
// token in localStorage, which Chromium scopes to the homepage window's
|
|
732
|
-
// origin — and that origin
|
|
733
|
-
//
|
|
734
|
-
//
|
|
732
|
+
// origin — and that origin has drifted historically (file:// today; the
|
|
733
|
+
// remote worker / dev URLs in the past). A token saved under one origin
|
|
734
|
+
// is invisible after the URL changes,
|
|
735
735
|
// which forced the user to log in again and again. Storing it here and
|
|
736
736
|
// restoring it on every homepage load makes "logged in once" survive origin
|
|
737
737
|
// changes, restarts and public-URL switches. ONLY explicit logout clears it.
|