MCPcopy
hub / github.com/CopyTranslator/CopyTranslator / getWindow

Method getWindow

src/main/views/update.ts:154–180  ·  view source on GitHub ↗
(title: string, file: string)

Source from the content-addressed store, hash-verified

152 }
153
154 getWindow(title: string, file: string) {
155 let win = this.win;
156 if (!win) {
157 win = new BrowserWindow({
158 icon,
159 title,
160 parent: this.controller.win.mainWindow,
161 modal: osType !== "Darwin",
162 width: 800,
163 height: 600,
164 minimizable: false,
165 autoHideMenuBar: true,
166 webPreferences: {
167 nodeIntegration: true,
168 webSecurity: false,
169 },
170 }) as BrowserWindow;
171 win.on("closed", (e: any) => {
172 this.win = undefined;
173 });
174 this.win = win;
175 }
176
177 win.loadFile(file);
178 if (process.env.NODE_ENV !== "production") win.webContents.openDevTools();
179 return win;
180 }
181
182 postUpdateInfo(updateInfo: any) {
183 const win = this.getWindow(

Callers 2

showCurrentChangelogMethod · 0.95
postUpdateInfoMethod · 0.95

Calls 1

onMethod · 0.80

Tested by

no test coverage detected