MCPcopy Index your code
hub / github.com/gitify-app/gitify / resetApp

Function resetApp

src/main/lifecycle/reset.ts:15–36  ·  view source on GitHub ↗
(mb: Menubar)

Source from the content-addressed store, hash-verified

13 * @param mb - The menubar instance used for the dialog parent window and quit.
14 */
15export function resetApp(mb: Menubar): void {
16 if (!mb.window) {
17 return;
18 }
19
20 const cancelButtonId = 0;
21 const resetButtonId = 1;
22
23 const response = dialog.showMessageBoxSync(mb.window, {
24 type: 'warning',
25 title: `Reset ${APPLICATION.NAME}`,
26 message: `Are you sure you want to reset ${APPLICATION.NAME}? You will be logged out of all accounts`,
27 buttons: ['Cancel', 'Reset'],
28 defaultId: cancelButtonId,
29 cancelId: cancelButtonId,
30 });
31
32 if (response === resetButtonId) {
33 sendRendererEvent(mb, EVENTS.RESET_APP);
34 mb.app.quit();
35 }
36}

Callers 2

buildMenuMethod · 0.90
reset.test.tsFile · 0.90

Calls 1

sendRendererEventFunction · 0.90

Tested by

no test coverage detected