MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / registerHandlers

Function registerHandlers

src/main/MainWindowPreload.ts:161–184  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

159.then(() => { isInitDone = true; });
160
161function registerHandlers(): void {
162 window.Shared.back.register(BackOut.UPDATE_PREFERENCES_RESPONSE, (event, data) => {
163 window.Shared.preferences.data = data;
164 });
165
166 window.Shared.back.register(BackOut.OPEN_MESSAGE_BOX, async (event, data) => {
167 const result = await ipcRenderer.invoke(CustomIPC.SHOW_MESSAGE_BOX, data);
168 return result.response;
169 });
170
171 window.Shared.back.register(BackOut.OPEN_SAVE_DIALOG, async (event, data) => {
172 const result = await ipcRenderer.invoke(CustomIPC.SHOW_SAVE_DIALOG, data);
173 return result.filePath;
174 });
175
176 window.Shared.back.register(BackOut.OPEN_OPEN_DIALOG, async (event, data) => {
177 const result = await ipcRenderer.invoke(CustomIPC.SHOW_OPEN_DIALOG, data);
178 return result.filePaths;
179 });
180
181 window.Shared.back.register(BackOut.OPEN_EXTERNAL, async (event, url, options) => {
182 await remote.shell.openExternal(url, options);
183 });
184}

Callers 1

Calls 2

openExternalMethod · 0.80
registerMethod · 0.45

Tested by

no test coverage detected