private static async initHelpMenu()

in packages/app/main/src/appMenuBuilder.ts [456:541]


  private static async initHelpMenu(): Promise<MenuOpts> {
    const appName = app.getName();
    const version = app.getVersion();
    const { Commands, Channels } = SharedConstants;
    // TODO - localization
    return {
      role: 'help',
      submenu: [
        {
          label: 'Welcome',
          click: () => AppMenuBuilder.commandService.remoteCall(Commands.UI.ShowWelcomePage),
        },
        { type: 'separator' },
        {
          label: 'Privacy',
          click: () => shell.openExternal('https://privacy.microsoft.com/privacystatement', { activate: true }),
        },
        {
          // TODO: Proper link for the license instead of third party credits
          label: 'License',
          click: () =>
            shell.openExternal('https://aka.ms/bot-framework-emulator-license', {
              activate: true,
            }),
        },
        {
          label: 'Credits',
          click: () =>
            shell.openExternal('https://aka.ms/bot-framework-emulator-credits', {
              activate: true,
            }),
        },
        { type: 'separator' },
        {
          label: 'Report an issue',
          click: () =>
            shell.openExternal('https://aka.ms/cy106f', {
              activate: true,
            }),
        },
        { type: 'separator' },

        // will toggle visibility of auto update menu item states as workaround to non-dynamic labels in Electron
        {
          id: 'auto-update-restart',
          label: 'Restart to update...',
          click: () => AppUpdater.quitAndInstall(),
          enabled: true,
          visible: AppUpdater.status === UpdateStatus.UpdateReadyToInstall,
        },
        {
          id: 'auto-update-downloading',
          label: `Update downloading...`,
          enabled: false,
          visible: AppUpdater.status === UpdateStatus.UpdateDownloading,
        },
        {
          id: 'auto-update-check',
          label: 'Check for update...',
          click: () => AppUpdater.checkForUpdates(true),
          enabled: true,
          visible: AppUpdater.status === UpdateStatus.Idle || AppUpdater.status === UpdateStatus.UpdateAvailable,
        },
        { type: 'separator' },
        {
          label: Channels.HelpLabel,
          click: () =>
            AppMenuBuilder.commandService.remoteCall(
              Commands.UI.ShowMarkdownPage,
              Channels.ReadmeUrl,
              Channels.HelpLabel
            ),
        },
        {
          label: 'About',
          click: () =>
            this.commandService.call(SharedConstants.Commands.Electron.ShowMessageBox, true, {
              type: 'info',
              title: appName,
              message: appName + '\r\nversion: ' + version,
              buttons: ['Dismiss'],
            }),
        },
      ],
    };
  }