Change-type: patch
Changelog-entry: Load usbboot adapter on start on GNU/Linux if running as root.
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
This patches validation errors coming form the `blockmap` module to have
the `EVALIDATION` error code, in order to trigger the appropriate code
paths and analytics.
Change-type: patch
Signed-off-by: Jonas Hermsmeier <jhermsmeier@gmail.com>
This refactors the experimental file picker to avoid fs i/o
in as many places as possible to improve performance.
Further, rendering performance is improved by avoiding unnecessary
element state changes invalidating components.
Also, recent files & favorites have been temporarily disabled
due to lack of need for Etcher Pro.
Change-Type: patch
- Replace onClick arrow functions in all components that use them for
efficiency reasons: 300-500% speed-up
- Sort by folders and ignore case for better UX
- Remove use of `rendition.Button` in files, leading to a 10-20%
performance increase when browsing files
- Proper sidebar width and spacing
- Recents and favorites are now filtered by existence async for a tiny
performance improvement
- Make Breadcrumbs and Icon pure components to stop frequent re-rendering
- Initial support for array constraints
- Use first constraint as initial path instead of homedir if a
constraint is set
- Use correct design height on modal, `calc(100vh - 20px)`
- Reset scroll position when browsing a new folder
- Fuse Bluebird `.map()` and `.reduce()` in
`files.getAllFilesMetadataAsync`.
- Use `localeCompare`'s own case-insensitive option instead of calling
`.toLowerCase()` twice on `n-2` files compared.
- Use 16px font sizes in sidebar and files to match design.
- Disable `$locationProvider.html5Mode.rewriteLinks`, which seemed to
take 50ms of the directory changing time.
- Leave file extension as-is in `files.getFileMetadataSync` and the
async counterpart for a very minor performance improvement.
Change-Type: patch
We ensure that the `-webkit-app-region` attribute is only set to `drag`
on the header element and we explicitly disable it on modals, as this
has unintended behaviour on a non-draggable window with touch-screens.
Change-Type: patch
This adds true change observability to the store,
as the `.subscribe()` callback triggers with every dispatch,
even if the data didn't change.
Now `store.observe(onChange)` can be used to only be notified
once the state data actually changes
Change-Type: minor
We pave way for different sizes of Etcher windows by dynamically
centering the content with flexbox.
Connects-To: #2263Closes: #2241
Change-Type: patch
Changelog-Entry: Center content independent to window resolution.
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.