1274 Commits

Author SHA1 Message Date
Alexis Svinartchouk
26779ef1fb fix(sdk): Load usbboot adapter on start
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>
2018-08-07 04:01:13 +02:00
Jonas Hermsmeier
9eb3eea3f1
fix(writer): Set EVALIDATION on blockmap checksum errors
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>
2018-08-01 20:54:08 +02:00
Jonas Hermsmeier
872cd90dc6
fix(gui): Fix missing promisify in file picker model
Change-Type: patch
2018-07-05 18:52:04 +02:00
Jonas Hermsmeier
ed25dd931e
feat(gui): Enable device specific constraints for file selection
This adds the ability to restrict the file selection to a given device,
only making its mountpoints accessible.

Change-Type: patch
2018-07-03 15:39:49 +02:00
Jonas Hermsmeier
0da17de422
refactor(gui): Add separating borders to file selector
This adds thin gray borders to the control surfaces in
the file selector for better visual distinction

Change-Type: patch
2018-06-20 19:03:40 +02:00
Jonas Hermsmeier
d99fe944f3
feat(gui): Add full filename to file selector
This adds the display of the full filename to the file selector.

Change-Type: minor
2018-06-20 18:31:09 +02:00
Jonas Hermsmeier
fc22e9e28a
refactor(gui): Refactor file picker fs I/O
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
2018-06-12 18:51:58 +02:00
Jonas Hermsmeier
fffdeb1320
fix(gui): Fix an inifinite digest loop trigger
This fixes a guard against infinite digest loop triggering
that was erronously dropped during a rebase.

Change-Type: patch
2018-05-30 20:34:38 +02:00
Jonas Hermsmeier
dfdb92957e
Merge pull request #2362 from resin-io/file-picker-performance
fix(GUI): file-picker performance and design improvements
2018-05-30 14:18:17 +02:00
Benedict Aas
5863319c0b
fix(GUI): file-picker performance and design improvements
- 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
2018-05-30 12:39:59 +02:00
Jonas Hermsmeier
2986d85b26
fix(gui): Fix error with empty drive blacklist
This fixes an error occuring if the drive blacklist
is empty, and not split correctly

Change-Type: patch
2018-05-30 12:33:12 +02:00
Jonas Hermsmeier
f312457f35
Merge pull request #2372 from resin-io/file-picker-drag-fix
fix(GUI): restrict webkit drag to header
2018-05-30 12:12:45 +02:00
Jonas Hermsmeier
c5e5141b21
refactor(local-settings): Log JSON parse errors 2018-05-29 22:06:41 +02:00
Jonas Hermsmeier
c08cf61d0c
chore(app): Use settings instead of env vars
Change-Type: patch
2018-05-29 22:06:41 +02:00
Jonas Hermsmeier
6728382141
feat: Use settings for feature control
Change-Type: minor
2018-05-29 22:06:40 +02:00
Jonas Hermsmeier
7c3f104d1b
Merge pull request #2368 from resin-io/refactor-settings
feat(gui): Persist local settings to config file
2018-05-29 22:06:02 +02:00
Jonas Hermsmeier
ad6be11bbc
refactor(store): Return unsubscribe directly 2018-05-29 17:36:51 +02:00
Benedict Aas
f09faf6645
minifix(GUI): move success banner back down (#2367)
Change-Type: patch
2018-05-29 12:56:54 +01:00
Benedict Aas
117a7762e1 fix(GUI): restrict webkit drag to header
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
2018-05-29 11:23:54 +01:00
Jonas Hermsmeier
3d47f494a8
fix(app): Fix config path on Windows, typos 2018-05-28 17:25:22 +02:00
Jonas Hermsmeier
e0ebdc9045
fix(test): Fix lint errors & tests 2018-05-25 20:35:59 +02:00
Jonas Hermsmeier
53f8e9328d
feat(app): Make store change-observable
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
2018-05-25 20:35:59 +02:00
Jonas Hermsmeier
687e0b563b
refactor(gui): Move shared models to app/models 2018-05-25 20:35:59 +02:00
Jonas Hermsmeier
6232cc7d49
test(settings): Update test specs accordingly
Change-Type: patch
2018-05-25 20:35:59 +02:00
Jonas Hermsmeier
2a6670a404
refactor: Remove use of localStorage for local settings
Change-Type: minor
2018-05-23 21:20:51 +02:00
Jonas Hermsmeier
447efc7096
refactor: Move shared/store.js -> gui/app/models/store.js 2018-05-23 21:20:50 +02:00
Benedict Aas
c47878202d
feat(GUI): center content independent to window resolution (#2299)
We pave way for different sizes of Etcher windows by dynamically
centering the content with flexbox.

Connects-To: #2263
Closes: #2241
Change-Type: patch
Changelog-Entry: Center content independent to window resolution.
2018-05-23 20:10:02 +01:00
Benedict Aas
ce2534c5b7
minifix(GUI): resolve react missing key field warning (#2354)
We attach key fields where necessary to make the warnings go away.

Change-Type: patch
2018-05-21 11:23:20 +01:00
Jonas Hermsmeier
2045066b16
fix(diskpart): Fix diskpart argv when tmpdir contains spaces
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
2018-05-17 18:03:41 +02:00
Benedict Aas
c00b7b62d6 fix: add missing files module
We add a convenience module for file and path operations.
Tests included.

Change-Type: patch
2018-05-17 15:34:34 +01:00
Benedict Aas
93b772f197
fix: ensure file-picker is slicing arrays (#2350)
We ensure the file-picker is slicing arrays when the localStorage values
aren't available.

Change-Type: patch
2018-05-17 10:40:19 +01:00
Benedict Aas
7782f94daa
feat(GUI): add electron-native file-picker component (#2333)
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.
2018-05-16 20:34:04 +01:00
Benedict Aas
34ce00e2d5
feat(GUI): hide unsafe mode option with env var (#2347)
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.
2018-05-16 19:52:55 +01:00
Benedict Aas
e472fe0276
feat: blacklist devices by device path (#2345)
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
2018-05-16 15:28:10 +01:00
Jonas Hermsmeier
03c7998c11
feat(gui): Add desktop notification setting
This adds a setting to disable desktop notifications, to be controlled
via configuration file

Change-Type: feat
2018-05-15 18:58:10 +02:00
Benedict Aas
35729fc36b
feat(GUI): use design background and drive size ordering (#2341)
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.
2018-05-15 14:23:33 +01:00
Benedict Aas
f6ce603e45
feat(GUI): add convenience localstorage class (#2276)
* 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.
2018-05-15 11:59:36 +01:00
Benedict Aas
81a75ca955
feat(GUI): use new design blue and spacing (#2327)
We use the new design blue, spacing, and order of step buttons.

Closes: https://github.com/resin-io/etcher/issues/2310
Change-Type: patch
2018-05-14 15:58:45 +01:00
Jonas Hermsmeier
b57c9a51f8
Merge pull request #2331 from resin-io/env-analytics
feat(gui): Add ability to set analytics tokens via env
Close #2329
2018-05-11 20:04:21 +02:00
Jonas Hermsmeier
b8897e0193
minifix(gui): Don't check for updates when in resin
This disabled Etcher checking for updates & showing update notifications
if running under resinOS with update locks enabled

Change-Type: patch
2018-05-11 16:36:14 +02:00
Jonas Hermsmeier
150e8112ea
feat(gui): Add ability to set analytics tokens via env
This adds the ability to set the Sentry & Mixpanel API tokens
via environment variables.

Change-Type: patch
2018-05-11 16:25:11 +02:00
Jonas Hermsmeier
196f16b941
Merge pull request #2326 from resin-io/resin-update-lock
feat(gui): Add resin update lock based on inactivity
2018-05-10 21:07:01 +02:00
Benedict Aas
21cb7a4847
feat(GUI): env var toggle autoselecting all valid drives (#2306)
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.
2018-05-10 18:53:53 +01:00
Jonas Hermsmeier
bb2dac7504
feat(gui): Add resin update lock based on inactivity
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
2018-05-10 19:15:31 +02:00
Jonas Hermsmeier
40df4a94a7
minifix(gui): Only enable Kiosk Mode when FULLSCREEN is set
This fixes the `kiosk` setting always being true, and causing
the operating system's desktop to disappear.

Change-Type: patch
2018-05-09 17:04:38 +02:00
Jonas Hermsmeier
262d06f035
Merge pull request #2311 from resin-io/config-file
feat(gui): Add ability to read settings from a config file
Close #1356
2018-05-09 17:00:36 +02:00
Jonas Hermsmeier
408ab99774
Merge pull request #1921 from resin-io/link-to-windows-usbboot-drivers
feat(GUI): link to drivers when clicking a driverless usbboot device
2018-05-09 16:48:00 +02:00
Jonas Hermsmeier
28cb21db13
Merge pull request #2292 from resin-io/bench-verify
feat(writer): Use xxHash instead of SHA512 for verification
2018-05-09 16:46:02 +02:00
Jonas Hermsmeier
5f85258e84
feat(gui): Add ability to read settings from a config file
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
2018-05-09 16:22:07 +02:00
Benedict Aas
cde1776a2d
feat(GUI): use gtk3 dark theme mode (#2314)
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.
2018-05-09 11:13:14 +01:00