MCPcopy Create free account
hub / github.com/Kong/insomnia / aboutMenuClickHandler

Function aboutMenuClickHandler

packages/insomnia/src/main/window-utils.ts:577–606  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

575 };
576
577 const aboutMenuClickHandler = async () => {
578 const copy = 'Copy';
579 const ok = 'OK';
580 const buttons = isLinux ? [copy, ok] : [ok, copy];
581 const detail = [
582 `Version: ${getProductName()} ${getAppVersion()}`,
583 `Build date: ${getAppBuildDate()}`,
584 `OS: ${os.type()} ${os.arch()} ${os.release()}`,
585 `Electron: ${process.versions.electron}`,
586 `Node: ${process.versions.node}`,
587 `Node ABI: ${process.versions.modules}`,
588 `V8: ${process.versions.v8}`,
589 `Architecture: ${process.arch}`,
590 ].join('\n');
591
592 const msgBox = await dialog.showMessageBox({
593 type: 'info',
594 title: getProductName(),
595 message: getProductName(),
596 detail,
597 buttons,
598 defaultId: buttons.indexOf(ok),
599 cancelId: buttons.indexOf(ok),
600 noLink: true,
601 });
602
603 if (msgBox.response === buttons.indexOf(copy)) {
604 clipboard.writeText(detail);
605 }
606 };
607
608 if (isMac) {
609 // @ts-expect-error -- TSCONVERSION type splitting

Callers

nothing calls this directly

Calls 4

getProductNameFunction · 0.90
getAppVersionFunction · 0.90
getAppBuildDateFunction · 0.90
indexOfMethod · 0.80

Tested by

no test coverage detected