We load localStorage settings into the Redux store in an asynchronous
way. This means that user settings might not be loaded by the time the
application starts, resulting in Mixpanel sending a few tracking events
before Etcher realises that the user opted out from anonoymous analytics
and error reporting.
In order to fix that, we remove `ng-app` and we manually bootstrap the
Angular.js application *after* the local settings are loaded.
Change-Type: patch
Changelog-Entry: Don't send initial Mixpanel events before "Anonymous Tracking" settings are loaded.
Fixes: https://github.com/resin-io/etcher/issues/1772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
We fix the DEBUG environment variable by setting it on the `electron.remote`
instead, and we also move the code to `lib/gui/app.js` and away from
`lib/gui/index.html`.
Changelog-Entry: Set the DEBUG environment variable on the remote
electron process.
Change-Type: patch
* use debug.enabled, fix drivelist env setting
* fix: set debug env variable on remote electron process
* feat(GUI): use tabindex and focus to navigate
We make navigating with the tab key easier by highlighting focused
elements more visibly, adding `tabindex` attributes to elements, and
making `open-external` links respond to keyboard events.
Change-Type: minor
Changelog-Entry: Improve tab-key navigation through tabindex and visual improvements.
Connects-To: https://github.com/resin-io/etcher/issues/1734
* outline with 10s timeout
* use orange "warning colour" as outline
* smaller outline on settings buttons, fix order on settings page
* allow selection in drive-selector
* fix typo, better tabindexes
This disables full wildcard debug output by default now,
leave the possibility to manually enable selective debug output
via the `DEBUG` environment variable.
Change-Type: patch
We reload and reset the webview to its original URL when the user
navigates away from the success screen.
Changelog-Entry: Reset webview after navigating away from the success screen.
* feat(GUI): dynamic finish page
We implement an externally loaded dynamic finish page in React with
`react2angular`. If the Internet connection is unreliable or unavailable, or a
non-200 HTTP response is returned we display a fallback default finish banner.
Change-Type: minor
Changelog-Entry: Implement a dynamic finish page.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
I've noticed that errors reported to TrackJS appear twice. Turns out
that TrackJS pipes output of `console.error()` as errors, rather than as
extra logging.
The `AnalyticsService.logException()` function reports the exception to
TrackJS using `$window.trackJS.track()`, but then prints it to `stderr`
as well (so it appears on DevTools), causing TrackJS to report that one
too.
The solution is to disable the `console.error` boolean property of the
`_trackJs` object. From the TrackJS documentation:
```
// By default any calls to console.error() will automatically trigger an
// error. Set this to false if you don't want console.error() to
// trigger errors.
error: true,
```
See: http://docs.trackjs.com/tracker/configuration
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
We match the main page design to its updated style.
* Remove help icon text.
* 'Change' image/drive buttons are now violet blue.
* Remove step number icons and accompanying descriptions.
* Flash progress button now turns into a striking orange, from blue.
Changelog-Entry: Update main page design to its new style.
This version doesn't throw an error if there is `stderr` output from the
scripts but the scripts exit with code zero.
Instead, the module prints the `stderr` output to a `debug` channel, so
we enable debug information by setting a `localStorage` value in order
to see what's going on.
Fixes: https://github.com/resin-io/etcher/issues/1034
Change-Type: patch
Changelog-Entry: Ignore `stderr` output from drive detection scripts if they exit with code zero.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Fixes: https://github.com/resin-io/etcher/issues/881
Change-Type: patch
Changelog-Entry: Capitalize every text throughout the application.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
We currently compile CSS into `build/css`, however we plan to use
node-gyp in this project, which can't be configured to build to a
directory other than `build`, therefore, the compiled CSS must move
somewhere else.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
We've recently added support for a `supportUrl` property in an archive
image `_info/manifest.json`, which the publisher can use to define the
URL where it would like to redirect users facing problems.
This PR makes the "Need help?" link at the top right corner open the
configured `supportUrl` url, and fallback to the original Etcher's help
page if no `supportUrl` is found.
In order to accomplish this, we made the following changes:
- Implement `SelectionStateModel.getImageSupportUrl()`
- Implement `HeaderController` controller
Change-Type: minor
Changelog-Entry: Make the "Need help?" link dynamically open the image support url.
Fixes: https://github.com/resin-io/etcher/issues/662
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This is a big PR that extracts out a sensible set of SCSS color
variables that can be used to customise Etcher's look.
To achieve such goal, the following changes were introduced:
- Create a separate `lib/gui/scss/modules/_theme.scss` to conveniently
hold all SCSS color variables.
- Decouple button styles from Bootstrap's `.btn`.
- Stop configuring Bootstrap colors as a whole using the SCSS variables
it exposes and instead declare them directly in the modules that make
use of them.
- Normalize all modal layouts into one. We had like 3 different modal
layouts, each with their own title/body colors, etc. To simplify the
color palette, we make use of a single modal layout everywhere.
- Remove `.progress-button--primary`. `.progress-button` is now
"primary" by default.
- Be precise about `tick` foreground colors.
- Rename `.label-default` to `.label-inset`.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
In older versions of Electron, the application would display a quick
flash of white before running caused by the WebView loading up.
This workaround doesn't seem necessary anymore.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This refactoring will be useful on future changes, where there will be
a single application entry point that will execute the CLI or the GUI
version depending on the environment.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>