 
   if AppStore.get_current_user()
     template.push menus.account
+
+  template.push menus.help
 
   # gotcha: buildFromTemplate mutates its argument - calling it
   # twice with the same argument throws 'Invalid menu template'


refresh_menu = ->
  mac = (process.platform == "darwin")

  menus = {
    file: {
      label: "File"
      submenu: [
        {
          label: "itch.io version #{require("app").getVersion()}"
          click: ->
            require("shell").openExternal "https://github.com/itchio/itchio-app"
        }
        {
          label: "Close Window"
          accelerator: if mac then "Command+W" else "Alt+F4"
          click: ->
            require("app").main_window?.hide()
        }
        {
          label: "Quit"
          accelerator: if mac then "Command+Q" else "Ctrl+Q"
          click: ->
            AppActions.quit()
        }
      ]
    }

      submenu: [
        {
          label: "Log out"
          click: -> AppActions.logout()
        }
      ]
    }

    help: {
      label: "Help"
      submenu: [
        {
          label: "View itch.io Terms"
          click: -> open_url "https://itch.io/docs/legal/terms"
        }
        {
          label: "View License"
          click: -> open_url "#{repo_url}/blob/master/LICENSE"
        }
        {
          label: "Version #{require("app").getVersion()}"
          enabled: false
        }
        {
          label: "Check for Update"
          click: -> console.log "check for update: stub"
        }
        {
          type: "separator"
        }
        {
          label: "Report Issue"
          click: -> open_url "#{repo_url}/issues/new"
        }
        {
          label: "Search Issue"
          click: -> open_url "#{repo_url}/search?type=Issues"
        }
        {
          type: "separator"
        }
        {
          label: "Release Notes"
          click: -> open_url "#{repo_url}/releases"
        }
      ]
    }
