Restore device icons [3/n]
Summary: Restored support for device icons which was disabled in previous diff Reviewed By: passy Differential Revision: D31054802 fbshipit-source-id: 107a53f06159211534cb9a2316340af7a7ca530a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2d838efd4d
commit
3428ce2968
@@ -44,9 +44,9 @@ export default class ArchivedDevice extends BaseDevice {
|
||||
title: options.title,
|
||||
os: options.os,
|
||||
serial: options.serial,
|
||||
icon: 'box',
|
||||
},
|
||||
);
|
||||
this.icon = 'box';
|
||||
this.connected.set(false);
|
||||
this.source = options.source || '';
|
||||
this.supportRequestDetails = options.supportRequestDetails;
|
||||
|
||||
@@ -79,7 +79,9 @@ export default class BaseDevice {
|
||||
}
|
||||
|
||||
// possible src of icon to display next to the device title
|
||||
icon: string | null | undefined;
|
||||
get icon() {
|
||||
return this.description.icon;
|
||||
}
|
||||
|
||||
logListeners: Map<Symbol, DeviceLogListener> = new Map();
|
||||
|
||||
|
||||
@@ -41,12 +41,12 @@ export default class AndroidDevice extends ServerDevice {
|
||||
deviceType,
|
||||
title,
|
||||
os: 'Android',
|
||||
icon: 'mobile',
|
||||
specs,
|
||||
abiList,
|
||||
sdkVersion,
|
||||
});
|
||||
this.adb = adb;
|
||||
// TODO: this.icon = 'mobile';
|
||||
}
|
||||
|
||||
startLogging() {
|
||||
|
||||
@@ -17,7 +17,7 @@ export default class MacDevice extends ServerDevice {
|
||||
deviceType: 'physical',
|
||||
title: 'Mac',
|
||||
os: 'MacOS',
|
||||
icon: 'app-apple',
|
||||
});
|
||||
// TODO: this.icon = 'app-apple';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ export default class WindowsDevice extends ServerDevice {
|
||||
deviceType: 'physical',
|
||||
title: 'Windows',
|
||||
os: 'Windows',
|
||||
icon: 'app-microsoft-windows',
|
||||
});
|
||||
// TODO: this.icon = 'app-microsoft-windows';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,8 +53,13 @@ export default class IOSDevice extends ServerDevice {
|
||||
deviceType: DeviceType,
|
||||
title: string,
|
||||
) {
|
||||
super(flipperServer, {serial, deviceType, title, os: 'iOS'});
|
||||
// TODO: this.icon = 'mobile';
|
||||
super(flipperServer, {
|
||||
serial,
|
||||
deviceType,
|
||||
title,
|
||||
os: 'iOS',
|
||||
icon: 'mobile',
|
||||
});
|
||||
this.buffer = '';
|
||||
this.iOSBridge = iOSBridge;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ export type DeviceDescription = {
|
||||
readonly title: string;
|
||||
readonly deviceType: DeviceType;
|
||||
readonly serial: string;
|
||||
readonly icon?: string;
|
||||
// Android specific information
|
||||
readonly specs?: DeviceSpec[];
|
||||
readonly abiList?: string[];
|
||||
|
||||
Reference in New Issue
Block a user