MCPcopy Create free account
hub / github.com/AICoderTudou/claude-code-tudou / createWindow

Function createWindow

desktop/main.cjs:52–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50}
51
52function createWindow() {
53 mainWindow = new BrowserWindow({
54 width: 1260,
55 height: 860,
56 minWidth: 980,
57 minHeight: 680,
58 backgroundColor: "#140f12",
59 autoHideMenuBar: true,
60 webPreferences: {
61 preload: path.join(__dirname, "preload.cjs"),
62 contextIsolation: true,
63 nodeIntegration: false,
64 sandbox: true,
65 },
66 });
67
68 const devServerUrl = process.env.VITE_DEV_SERVER_URL;
69 if (devServerUrl) {
70 mainWindow.loadURL(devServerUrl);
71 return;
72 }
73 mainWindow.loadFile(path.join(__dirname, "dist", "index.html"));
74}
75
76function sendEvent(channel, payload) {
77 if (!mainWindow || mainWindow.isDestroyed()) return;

Callers 1

main.cjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected