()
| 159 | .then(() => { isInitDone = true; }); |
| 160 | |
| 161 | function 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 | } |
no test coverage detected