From 86a8c98148447916915da99962d82ec5c5dd6cb7 Mon Sep 17 00:00:00 2001 From: brunobar79 Date: Mon, 2 Jul 2018 15:14:57 -0400 Subject: always open connect hardware in full screen mode --- ui/app/components/account-menu/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js index 629669dac..be6963ac4 100644 --- a/ui/app/components/account-menu/index.js +++ b/ui/app/components/account-menu/index.js @@ -9,6 +9,10 @@ const actions = require('../../actions') const { Menu, Item, Divider, CloseArea } = require('../dropdowns/components/menu') const Identicon = require('../identicon') const { formatBalance } = require('../../util') +const { ENVIRONMENT_TYPE_POPUP } = require('../../../../app/scripts/lib/enums') +const { getEnvironmentType } = require('../../../../app/scripts/lib/util') + + const { SETTINGS_ROUTE, INFO_ROUTE, @@ -110,7 +114,11 @@ AccountMenu.prototype.render = function () { h(Item, { onClick: () => { toggleAccountMenu() - history.push(CONNECT_HARDWARE_ROUTE) + if (getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_POPUP) { + global.platform.openExtensionInBrowser(CONNECT_HARDWARE_ROUTE) + } else { + history.push(CONNECT_HARDWARE_ROUTE) + } }, icon: h('img.account-menu__item-icon', { src: 'images/connect-icon.svg' }), text: this.context.t('connectHardware'), -- cgit v1.2.3