Remove unused methods from drive selector component

Signed-off-by: Lucian <lucian.buzzo@gmail.com>
This commit is contained in:
Lucian 2019-12-04 14:11:54 +00:00 committed by Lorenzo Alberto Maria Ambrosi
parent fc597abbc9
commit ffb26ba67f

View File

@ -33,54 +33,6 @@ const store = require('../../models/store')
const analytics = require('../../modules/analytics')
const exceptionReporter = require('../../modules/exception-reporter')
/**
* @summary Get drive title based on device quantity
* @function
* @public
*
* @returns {String} - drives title
*
* @example
* console.log(getDrivesTitle())
* > 'Multiple Drives (4)'
*/
const getDrivesTitle = () => {
const drives = selectionState.getSelectedDrives()
// eslint-disable-next-line no-magic-numbers
if (drives.length === 1) {
return _.head(drives).description || 'Untitled Device'
}
// eslint-disable-next-line no-magic-numbers
if (drives.length === 0) {
return 'No targets found'
}
return `${drives.length} Devices`
}
/**
* @summary Get drive subtitle
* @function
* @public
*
* @returns {String} - drives subtitle
*
* @example
* console.log(getDrivesSubtitle())
* > '32 GB'
*/
const getDrivesSubtitle = () => {
const drive = selectionState.getCurrentDrive()
if (drive) {
return prettyBytes(drive.size)
}
return 'Please insert at least one target device'
}
/**
* @summary Get drive list label
* @function