mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-29 14:16:36 +00:00
Restore image file selection LED-drive pathing
Change-type: patch Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
This commit is contained in:
parent
b97f4e0031
commit
f46963b6b3
@ -17,9 +17,12 @@
|
|||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
import { Animator, AnimationFunction, Color, RGBLed } from 'sys-class-rgb-led';
|
import { Animator, AnimationFunction, Color, RGBLed } from 'sys-class-rgb-led';
|
||||||
|
|
||||||
import { DrivelistDrive } from '../../../shared/drive-constraints';
|
import {
|
||||||
|
DrivelistDrive,
|
||||||
|
isSourceDrive,
|
||||||
|
} from '../../../shared/drive-constraints';
|
||||||
import { getDrives } from './available-drives';
|
import { getDrives } from './available-drives';
|
||||||
import { getImage, getSelectedDrives } from './selection-state';
|
import { getSelectedDrives } from './selection-state';
|
||||||
import * as settings from './settings';
|
import * as settings from './settings';
|
||||||
import { observe, store } from './store';
|
import { observe, store } from './store';
|
||||||
|
|
||||||
@ -172,7 +175,9 @@ function stateObserver() {
|
|||||||
const availableDrives = getDrives().filter(
|
const availableDrives = getDrives().filter(
|
||||||
(d: DrivelistDrive) => d.devicePath,
|
(d: DrivelistDrive) => d.devicePath,
|
||||||
);
|
);
|
||||||
const sourceDrivePath = getImage()?.drive?.devicePath;
|
const sourceDrivePath = availableDrives.filter((d: DrivelistDrive) =>
|
||||||
|
isSourceDrive(d, s.selection.image),
|
||||||
|
)[0]?.devicePath;
|
||||||
const availableDrivesPaths = availableDrives.map(
|
const availableDrivesPaths = availableDrives.map(
|
||||||
(d: DrivelistDrive) => d.devicePath,
|
(d: DrivelistDrive) => d.devicePath,
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user