Reviewed By: nikoant Differential Revision: D28064540 fbshipit-source-id: 43f05c4348a33e9633751bb9f69cd8d17ddd13c4
51 lines
1.4 KiB
TypeScript
51 lines
1.4 KiB
TypeScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
import BaseDevice from './BaseDevice';
|
|
import type {DeviceType} from 'flipper-plugin';
|
|
import {OS, DeviceShell} from './BaseDevice';
|
|
import {SupportFormRequestDetailsState} from '../reducers/supportForm';
|
|
|
|
export default class ArchivedDevice extends BaseDevice {
|
|
isArchived = true;
|
|
|
|
constructor(options: {
|
|
serial: string;
|
|
deviceType: DeviceType;
|
|
title: string;
|
|
os: OS;
|
|
screenshotHandle?: string | null;
|
|
source?: string;
|
|
supportRequestDetails?: SupportFormRequestDetailsState;
|
|
}) {
|
|
super(options.serial, options.deviceType, options.title, options.os);
|
|
this.icon = 'box';
|
|
this.connected.set(false);
|
|
this.source = options.source || '';
|
|
this.supportRequestDetails = options.supportRequestDetails;
|
|
this.archivedScreenshotHandle = options.screenshotHandle ?? null;
|
|
}
|
|
|
|
archivedScreenshotHandle: string | null;
|
|
|
|
displayTitle(): string {
|
|
return `${this.title} ${this.source ? '(Imported)' : '(Offline)'}`;
|
|
}
|
|
|
|
supportRequestDetails?: SupportFormRequestDetailsState;
|
|
|
|
spawnShell(): DeviceShell | undefined | null {
|
|
return null;
|
|
}
|
|
|
|
getArchivedScreenshotHandle(): string | null {
|
|
return this.archivedScreenshotHandle;
|
|
}
|
|
}
|