This escapes the diskpart script filename when shelling out,
to avoid failure when the username and thus the `os.tmpdir()` path
contains spaces.
Change-Type: patch
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.
We hide the unsafe mode option toggle with an env var
`ETCHER_HIDE_UNSAFE_MODE` that also enables unsafe mode.
Closes: https://github.com/resin-io/etcher/issues/2243
Change-Type: patch
Changelog-Entry: Hide unsafe mode option toggle with an env var.
We use `devicePath` instead of `device` to blacklist drives using the
`ETCHER_BLACKLISTED_DRIVES` environment variable.
Closes: https://github.com/resin-io/etcher/issues/2264
Change-Type: patch
We use the new design background color, and order the drive step size in
accordance with the new design as well.
Related: https://github.com/resin-io/etcher/issues/2310
Change-Type: patch
Changelog-Entry: Use new design background color and drive step size
ordering.
* 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 introduce an environment variable
`ETCHER_DISABLE_EXPLICIT_DRIVE_SELECTION` that both enables
autoselection of drives and disables explicit drive selection by hiding
the buttons allowing this. All valid drives are autoselected, i.e. any
drive-image pair that does not result in an error, however warnings are
accepted.
Closes: https://github.com/resin-io/etcher/issues/2262
Change-Type: patch
Changelog-Entry: Introduce env var to toggle autoselection of all
drives.
This adds functionality to acquire & release the update lock
when running under resinOS, re-using the `ELECTRON_RESIN_UPDATE_LOCK`
environment variable from `resin-electronjs`.
Further this adds the `ETCHER_INTERACTION_TIMEOUT_MS` env var, to
facilitate adjusting the inactivity period required to release the lock.
Change-Type: minor
This adds the capability to configure settings via a `.etcher.json` file,
either in the user's home directory, or the current working directory.
In the case of the home directory, the config file is `$HOME/.config/etcher/config.json`,
while on Windows `$HOME/.etcher.json` is used.
The defined settings are merged with localStorage settings, and preceding
configuration files.
If both are present, the current working directory takes precedence.
Change-Type: minor
Changelog-Entry: Add support for configuration files
We enable the `darkTheme` mode for GTK-3 applications (mainly Linux)
that suits Etcher's dark theme better, making the window title bar dark.
Change-Type: patch
Changelog-Entry: Use GTK-3 darkTheme mode.
We add an environment variable to toggle Etcher in fullscreen.
Closes: https://github.com/resin-io/etcher/issues/2307
Change-Type: patch
Changelog-Entry: Add environment variable to toggle fullscreen.
We add an environment variable `ETCHER_BLACKLISTED_DRIVES` that allows
us to filter certain drives from ever showing up in Etcher with comma
separated device paths, e.g. `/dev/sda,/dev/sdb,/dev/mmcblk0`.
Closes: https://github.com/resin-io/etcher/issues/2264
Change-Type: patch
Changelog-Entry: Allow blacklisting of drives through and environment
variable ETCHER_BLACKLISTED_DRIVES.
We add a list of selected drives below the drive selection step, able to
accommodate four lines of drives before scrolling occurs.
Closes: https://github.com/resin-io/etcher/issues/2263
Change-Type: patch
Changelog-Entry: Show selected drives below drive selection step.
We make the analytics block into a function `handleErrorLogging` and
use it in the fail event that happens during multi-writes. Previously
error events would be handled when single drives were flashed on Promise
rejection, instead we now only handle the Promise rejection when all
devices fail as a special event.
Change-Type: patch
Changelog-Entry: Fix multi-writes analytics by reusing existing logic in
multi-write events.
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 remove success screen dots that are zero, which mainly means that the
error dot disappears as it shouldn't currently be possible to end up
with zero successful devices on that screen.
Change-Type: patch
This fixes a state where the success screen would display
zero succeeded and zero failed devices if verification was
turned off. This could occur due to the "done" event being
emitted before the next progress event could set the relevant data.
Change-Type: patch
This moves the usbboot blob handling into the SDK to avoid
root dirname conflicts through shimmed __dirname in bundled UI
and different contexts of execution.
Change-Type: patch
This reverts commit 47fc1b7357bdb9e9aa8e2d7476690435087d984e
in order to prevent a possible regression, until properly investigated
and fixed.
Change-Type: patch
Changelog-Entry: Revert using native binding to clean disks on Windows