We add a file-picker written with Rendition/React. It is activated with
the `ETCHER_EXPERIMENTAL_FILE_PICKER` environment variable. Further
customisation can be done with the `ETCHER_FILE_BROWSER_CONSTRAIN_FOLDER`
variable that takes a path and allows one to constrain the file-picker to
a folder.
Related: https://github.com/resin-io/etcher/issues/2238
Related: https://github.com/resin-io/etcher/issues/2285
Change-Type: patch
Changelog-Entry: Add electron-native file-picker component.
* feat(GUI): add convenience localstorage class
We add a class `Storage` and accompanying helper methods that makes
localStorage usage easier.
Change-Type: patch
Changelog-Entry: Add a convenience Storage class on top of localStorage.
We ensure that drive-image pairs with warnings don't get deselected when
there is only one drive available. This happenened because there was no
check for any previous selected devices. Comes with a test case.
Fixes: https://github.com/resin-io/etcher/issues/2267
Change-Type: patch
Changelog-Entry: Keep single warning-drive-image pairs selected.
We make the finish notification message print the device name as usual
when there's one target, and instead list quantity of successful and
failed devices when there are multiple. Previously it would list all
device names, and wouldn't specify how many were successful or failures.
Change-Type: patch
We fallback to `'Untitled Device'` when the device lacks a
`.description` field.
Change-Type: patch
Changelog-Entry: Display Untitled Device when the device lacks a
description field.
We display the quantity of succeeded and failed devices using status
dots on the finish screen.
Change-Type: patch
Changelog-Entry: Display succeeded and failed device quantities on the
finish screen.
This fixes transmission of user errors over IPC, as the `report`
property was previously missing. Further it also adds more properties
to `errors.toJSON`, like `syscall`, `errno`, etc. and re-uses the method
for failure signalling.
Change-Type: patch
We replace the `_.identity` predicate with `_.isFinite` to ensure
the flash quantity fields are numbers.
Change-Type: patch
Changelog-Entry: Ensure flash quantity fields are finite.
We expose all the flash state fields to the store, and mirror
`speed`'s format with `totalSpeed` with MB as the size unit.
We also format the progress state messages to use information
available with multiwrites.
Change-Type: patch
Changelog-Entry: Expose all flash state fields to the store.
This changes the image-stream tests to use a local directory,
instead of the OS's tmpdir to avoid issues with sandboxing on Concourse CI.
Change-Type: patch
We remove our dependency on the `middle-ellipses` package and include
and expose the function in `lib/shared/utils`, alongside the regular
Angular filter it exposes. This allows use of the middle ellipsis
method in React.
Change-Type: patch
Changelog-Entry: Inline middle-ellipsis package as util.
We add some preparatory changes including new utility functions, as well
as changes throughout the codebase that reflect the change from single
drives to a list of drives, given multi-writes is coming.
Change-Type: patch
Changelog-Entry: Various preparatory changes to account for
multi-writes.
This adds a display of the determined image size to the
drive label when the drive has been determined to be too small.
Change-Type: patch
Changelog-Entry: Display image size for comparison if drive is too small
Implement writing to multiple destinations simultaneously
Change-Type: minor
Changelog-Entry: Implement writing to multiple destinations simultaneously
We add colorised progress status dots with quantities of `flashing`,
`validating`, `succeeded`, and `failed` devices.
Change-Type: patch
Changelog-Entry: Add colorised multi-writes progress status dots.
We move the memoize function to `lib/shared/utils.js` and expose it to
modules across the project.
Change-Type: patch
Changelog-Entry: Move memoize function to shared utils.
We lay the foundation for multi-selecting drives by implementing it into
the `store` and relevant modules interacting with the `store`.
Change-Type: patch
Changelog-Entry: Add drive multi-selection to the store.
We refactor and simplify the selection-state `.clear()` by removing the
options argument.
Change-Type: patch
Changelog-Entry: Remove `selectionState.clear()` options argument to
simplify.
We make the nil-checking of store state fields generic through a
`verifyNoNilFields` function that throws an error if any fields are
nil.
Change-Type: patch
Changelog-Entry: Consolidate store state nil-checking with helper
function.
We separate the SVG component path and content into attributes
`paths` and `contents` which take lists of strings that are
tried until one succeeds. `contents` takes precedence over `paths`,
i.e. it is tried first.
Change-Type: patch
Changelog-Entry: Separate SVG component's path and content attributes.
We warn the user when they select a large drive to confirm they want to
flash in case the device is important.
Fixes: https://github.com/resin-io/etcher/issues/1916
Change-Type: patch
Changelog-Entry: Warn the user on selection of large drives.
We replace the `templateUrl` fields with `template` fields and thus
switch from template paths to template contents in preparation for the
Webpack PR.
Changelog-Entry: Replace template paths with template contents.
Change-Type: patch
This removes the remnants of the unused "robot protocol",
which was previously used by the CLI, but has been superseded by IPC.
Change-Type: minor
Changelog-Entry: Remove unused robot protocol
This removes the dependence on `tmp`, as this module has been known
to cause problems, while also being unnecessary for what it's being used for.
Change-Type: minor
* feat(GUI): add app to gui folder structure
We add a `lib/gui/app/` folder to help transition to Webpack usage.
Change-Type: patch
Changelog-Entry: Add `lib/gui/app` folder to ease into Webpack usage.
feat: test that ipc verbosity is off
We test that `ipc.config.silent` is set to `true` so that it doesn't
spam `stdout` for users.
Changelog-Entry: Test that IPC verbosity is off
Change-Type: patch