Bug 1405235 - Part 2: Show USB devices using SidebarItem. r=jdescottes

Depends on D5647

Differential Revision: https://phabricator.services.mozilla.com/D5648

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Daisuke Akatsuka 2018-09-20 03:27:05 +00:00
Родитель 9d7105adee
Коммит 2b352eba33
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -18,6 +18,7 @@ const SidebarItem = createFactory(require("./SidebarItem"));
const FIREFOX_ICON = "chrome://devtools/skin/images/aboutdebugging-firefox-logo.svg";
const CONNECT_ICON = "chrome://devtools/skin/images/aboutdebugging-connect-icon.svg";
const GLOBE_ICON = "chrome://devtools/skin/images/aboutdebugging-globe-icon.svg";
const USB_ICON = "chrome://devtools/skin/images/aboutdebugging-connect-icon.svg";
class Sidebar extends PureComponent {
static get propTypes() {
@ -65,7 +66,15 @@ class Sidebar extends PureComponent {
selectable: runtimeHasClient,
});
}),
...runtimes.usbRuntimes.map(runtime => dom.li({}, runtime.name)),
...runtimes.usbRuntimes.map(runtime =>
SidebarItem({
id: `usb-${ runtime.id }`,
dispatch,
icon: USB_ICON,
isSelected: false,
name: runtime.name,
selectable: false,
})),
];
}