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
We ensure that paths inside node_modules files are kept untouched, as
currently the RegExp can match 'shared' folders inside those and rewrite
paths, breaking them.
Change-Type: patch
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.