95 Commits

Author SHA1 Message Date
Juan Cruz Viotti
c6ef5edda3 fix(progressButton): spiky diagonal lines (#533)
The progress button exhibits spiky diagonals when used it with the
"striped" modifier. This can be seen better when drastically reducing the animation
speed.

Turns out its a Webkit rendering bug. I've stumbled into dozens of
"workarounds" on the internet (mainly Stack Overflow), however none of
them fixed the issue.

After some crazy amount of experimentation, the issue is gone if we add
1% to certain stop positions. Weird stuff.

Fixes: https://github.com/resin-io/etcher/issues/472
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-27 14:18:54 -04:00
Juan Cruz Viotti
df24388c3d Move update notifier modal style to the component (#486)
Currently, the modal style style used in this component was declared in
`components/_modal.scss`, however since this srule is very specific to
the update notifier component, its better declared in
`update-notifier/styles`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-15 11:26:38 -04:00
Juan Cruz Viotti
a5fbe40b2d Move drive selector warning labels below the drive (#483)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-15 11:25:50 -04:00
Juan Cruz Viotti
8aa7bcd952 Prevent a very long image name from breaking the UI (#479)
This PR introduces two changes to mitigate this problem and overall
provide a better UX:

- Show ellipses in the middle of the image name in the first step if
needed.

- Add a tooltip below the image selection label in the first step to
show a little modal displaying the full path to the image.

Fixes: https://github.com/resin-io/etcher/issues/418
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-15 10:31:07 -04:00
Juan Cruz Viotti
51b6de4634 Show an informative label if a drive is not large enough (#474)
This is a huge improvement over our current approach, which was simply
to cross out the drive without further explanation.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-11 13:52:38 -04:00
Juan Cruz Viotti
dc7b31f061 Apply checksum label padding as a custom modifier (#473)
We want to re-use the `label` component without big paddings in other
areas of the application, therefore we move the custom padding to a
separate label modifier.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-11 13:44:02 -04:00
Juan Cruz Viotti
608cb5d74a Cleanup CSS (#471)
This is by no means a complete CSS refactoring. There still a lot to be
done. This encompasses mostly:

- Move "Finish page" specific styles to that module.
- Remove unused CSS rules.
- Move generic Bootstrap rules to `_bootstrap.scss`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-11 13:21:22 -04:00
Juan Cruz Viotti
8de4be1897 Display ETA during flash and check (#460)
* Show speed during check

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Display ETA during flash and check

Fixes: https://github.com/resin-io/etcher/issues/256
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-08 13:35:44 -04:00
Juan Cruz Viotti
31728801f5 Don't show a progress bar in update notifier modal (#445)
Fixes: https://github.com/resin-io/etcher/issues/442
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-26 21:18:13 -04:00
Juan Cruz Viotti
abb7dc6469 Prevent pressing "space" to re-click the "Flash" button (#435)
Currently we disable pointer events on the "Flash" button once a flash
is in progress to prevent the user from clicking it, but we didn't
consider that if the user kept focus on the button, he can press the
"space" bar for the same effect.

Fixes: https://github.com/resin-io/etcher/issues/431
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-24 14:21:31 -04:00
Juan Cruz Viotti
e1a3c88b10 Display image checksum on success in the CLI (#417)
* Upgrade etcher-image-write to v5.0.0

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Display image CRC32 checksum on success

Fixes: http://github.com/resin-io/etcher/issues/357
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-19 10:13:10 -04:00
Juan Cruz Viotti
bf37ee72df Prevent selection of drives that are not large enough (#408)
* Make .selectImage() dialog return an object with a `path` property

This allows to return more than one value for the selected image,
like image size and other metadata for example.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Return image size from .selectImage() dialog

This property will be useful to perform some sanity checks, like
ensuring the selected drive is large enough to contain the image.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Store both the image path and the image size in the selection model

In order to simplify accessing such properties in an encapsulated
manner, `SelectionStateModel.getImage()` was replaced with the following
functions:

- `SelectionStateModel.getImagePath()`.
- `SelectionStateModel.getImageSize()`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Increase SelectionStateModel setter validation

The model not providing any kind of validation was the source of some
bugs I encountered while implementing the previous commits that would
not have happened otherwise.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Prevent selection of drives that are not large enough

- The drive selector modal was modified such that drives that are not
large enough are crossed out, and the user is not able to click them.

- In the case of drive auto-selection, not large enough drives won't
attempt to get autoselected.

This commit introduces:

- The `SelectionStateModel.isDriveLargeEnough()` function.

Fixes: https://github.com/resin-io/etcher/issues/344
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-12 15:38:19 -04:00
Juan Cruz Viotti
a4e2639c00 Implement update notifier modal (#406)
Auto-update functionality is not ready for usage. As a workaround to
prevent users staying with older versions, we now check for updates at
startup, and if the user is not running the latest version, we present a
modal informing the user of the availiblity of a new version, and
provide a call to action to open the Etcher website in his web browser.

Extra features:

- The user can skip the update, and tell the program to delay the
notification for 7 days.

Misc changes:

- Center modal with flexbox, to allow more flexibility on the modal height.
interacting with the S3 server.
- Implement `ManifestBindService`, which now serves as a backend for the
`manifest-bind` directive to allow the directive's functionality to be
re-used by other services.
- Namespace checkbox styles that are specific to the settings page.

Fixes: https://github.com/resin-io/etcher/issues/396
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-12 13:11:30 -04:00
Juan Cruz Viotti
369e38b310 Improve "Select Image" supported file types label with a tooltip (#392)
Fixes: https://github.com/resin-io/etcher/issues/378
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-04 01:30:54 -04:00
Juan Cruz Viotti
284f2a0ebb Add dashed underline to footer links (#340)
Fixes: https://github.com/resin-io/etcher/issues/338
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-18 13:16:26 -04:00
Juan Cruz Viotti
5baf8e5407 Improve UX when closing the drive selector modal (#339)
The current "Close" button makes it confusing to the user to know if
he's accepting his changes, or just discarding them.

The "Close" button in the top right corner was replaced with a standard
cross icon, and there is a new "Continue" block button fixed in the
bottom of the modal.

Fixes: https://github.com/resin-io/etcher/issues/294
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-18 13:16:17 -04:00
Juan Cruz Viotti
ed592f0597 Add application version to footer (#335)
* Implement ManifestBind directive

This directive is useful to bind the contents of an element to a
property in the `package.json` manifest.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Add application version to footer

Fixes: https://github.com/resin-io/etcher/issues/292
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-17 23:57:56 -04:00
Juan Cruz Viotti
0dcc7b22b8 Implement SVGIcon Angular directive (#324)
* Inherit current scope in osOpenExternal directive

This directive attempts to create a new isolated scope, which leads the
errors when using this directive on top of another directive in the same
element.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Implement SVGIcon Angular directive

This directive replaces part of `hero-icon`, the old Polymer component.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 16:14:46 -04:00
Juan Cruz Viotti
04efd16ca3 Misc changes (#322)
* Fix lint warnings about missing empty line above `module.exports`

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Re-build CSS

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 15:45:52 -04:00
Juan Cruz Viotti
dec10f618e Add "Change" button links below each step (#306)
Fixes: https://github.com/resin-io/etcher/issues/290
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-12 15:59:42 -04:00
Juan Cruz Viotti
77da54431a Add Etcher logo to application footer (#302)
Fixes: https://github.com/resin-io/etcher/issues/252
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-12 13:01:56 -04:00
Juan Cruz Viotti
7e83c378a2 Add subtle hover styling to footer links (#268)
Fixes: https://github.com/resin-io/etcher/issues/253
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-08 15:21:12 -04:00
Juan Cruz Viotti
3a04b5ccaa Fix window contents pushed below when a modal is open (#263)
UI Bootstrap adds the `.modal-open` class to the `<body>`
element and sets its right padding to the width of the
window, causing the window content to overflow and get
pushed to the bottom.
The `!important` flag is needed since UI Bootstrap inlines
the styles programatically to the element.

Fixes: https://github.com/resin-io/etcher/issues/257
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-08 10:37:10 -04:00
Juan Cruz Viotti
46629c5ef0 Rebuild pending SASS changes (#261)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-08 10:09:30 -04:00
Juan Cruz Viotti
2862663ca7 Invert progress bar stripes (#260)
Make the progress bar background striped, and the actual bar solid.

Fixes: https://github.com/resin-io/etcher/issues/251
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-08 10:06:56 -04:00
Juan Cruz Viotti
3392a5eca1 Implement write validation support
* Extend ProgressButton to support a striped progress bar

This feature will be used to implement the burn validation step.

* Implement alert-ribbon CSS component

This component will be used to inform an error situation to the user
during the burn/check processes.

* Add "Enable write validation on success" setting

* Implement write validation support

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
Fixes: https://github.com/resin-io/etcher/issues/45
2016-04-06 21:53:35 -04:00
Juan Cruz Viotti
c27c9c3a2f Undo :focus styles from Bootstrap.
On Electron, the user can click and press over a button,
then move the mouse away from the button and release,
and the button will erroneusly keep the `:focus` state style.

The current workaround consists of:

- Iterate through all the Bootstrap button styles.
- Set the default 'background', `color` and `border-color` to match the
style of the normal state.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-04 18:48:16 -04:00
Juan Cruz Viotti
797a253158 Group all parts of the progress-button component in a single directory 2016-03-31 15:14:10 -04:00
Juan Cruz Viotti
18a1606988 Implement a drive selector modal
This modal provides a more advanced way to select a drive. It prevents
certain issues the dropdown was having, like the contents overflowing
when there were many connected drives.

Fixes: https://github.com/resin-io/etcher/issues/202
2016-03-31 12:18:23 -04:00
Juan Cruz Viotti
c75b4b307a Style btn-sm 2016-03-31 10:01:33 -04:00
Juan Cruz Viotti
7b48eeb993 Make a CSS class for fixed-width step buttons 2016-03-31 10:01:24 -04:00
Juan Cruz Viotti
bac70c667f Fix step vertical bars slight misalignment 2016-03-31 08:52:57 -04:00
Juan Cruz Viotti
e3ed0af0f9 Move Boostrap style customisations to a boostrap.scss file 2016-03-30 16:11:08 -04:00
Juan Cruz Viotti
9bd0ccd550 Normalise step footers captions 2016-03-30 15:53:26 -04:00
Juan Cruz Viotti
79b16beaf0 Make caption's uppercase by default 2016-03-30 15:49:59 -04:00
Juan Cruz Viotti
6f7ea4e772 Convert hero-progress-button into an Angular directive 2016-03-30 15:46:48 -04:00
Juan Cruz Viotti
482b0a52ee Move title normalisation to desktop.css 2016-03-30 14:56:59 -04:00
Juan Cruz Viotti
abdee7fe10 Refactor tick as a scss component 2016-03-30 14:17:03 -04:00
Juan Cruz Viotti
5d52b19c2b Refactor hero-button as a scss component 2016-03-30 14:11:18 -04:00
Juan Cruz Viotti
01ec52f4d7 Refactor caption as a scss component 2016-03-30 14:02:03 -04:00
Juan Cruz Viotti
d47eaa8a2a Refactor badge as a scss component 2016-03-30 13:47:36 -04:00
Juan Cruz Viotti
334eebe9c9 Implement "Need Help?" button
This button guides the user to publish a new issue in the GitHub
repository.

Fixes: https://github.com/resin-io/etcher/issues/177
2016-03-02 12:32:01 -04:00
Juan Cruz Viotti
64c27235bf Make use of UI Router 2016-03-01 19:50:25 -04:00
Juan Cruz Viotti
f208d2e34d Make use of settings to prevent tracking in analytics module
`SettingsService` is injected manually using `$injector` to a void a
circular dependency over `$rootScope` by `$localStorage`.
2016-03-01 12:55:15 -04:00
Juan Cruz Viotti
61a1527c7e Implement settings screen 2016-03-01 12:22:03 -04:00
Juan Cruz Viotti
ff2a375179 Fix slighly checkbox vertical alignment issue 2016-03-01 11:33:21 -04:00
Juan Cruz Viotti
a871d19ef7 Only apply necessary margins in spacing module 2016-03-01 11:23:41 -04:00
Juan Cruz Viotti
ac2fb8b0a9 Merge pull request #143 from resin-io/feat/74/burn-another-design
Improve "Burn another" screen design
2016-02-05 12:57:49 -04:00
Juan Cruz Viotti
3caf9859b0 Improve "Burn another" screen design
Fixes: https://github.com/resin-io/etcher/issues/74
2016-02-05 12:48:42 -04:00
Juan Cruz Viotti
46307adef3 Set content spacing to 40px 2016-02-04 16:51:46 -04:00