531 Commits

Author SHA1 Message Date
Juan Cruz Viotti
fd00a4ae0e Add a Mixpanel event when the application starts (#311)
Fixes: https://github.com/resin-io/etcher/issues/310
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 10:05:53 -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
e3bac8dc64 Connect DriveSelector with SelectionStateModel (#305)
Previously, `DriveSelector` kept a temporary selection state until the
modal was closed, which caused the selected drives to be passed to
`SelectionStateModel`.

This proves to be problematic when attempting to pass changes to
`SelectionStateModel` to `DriveSelector`. For example, consider the case
where the `DriveSelector` modal is opened with two drives, and one is
ejected. The remaining drive will be auto-selected by Etcher in the
background, but `DriveSelector` will not update itself with such change.

Fixes: https://github.com/resin-io/etcher/issues/304
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-12 14:42:51 -04:00
Juan Cruz Viotti
aba6e946e3 Hide drive selector modal if no available drives (#303)
If you have the drive selector modal opened, but you eject all the
available drives, the modal will be closed automatically.

Fixes: https://github.com/resin-io/etcher/issues/295
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-12 13:02:10 -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
3efea5b308 Replace all occurrences of "burn" with "flash" (#300)
Technically, a removable drive is flashed, not burned.

Fixes: https://github.com/resin-io/etcher/issues/297
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-12 12:00:43 -04:00
Juan Cruz Viotti
8417f94649 Allow to drag and drop an image to the first step (#288)
See https://github.com/electron/electron/blob/master/docs/api/file-object.md
Fixes: https://github.com/resin-io/etcher/issues/279
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-11 15:40:13 -04:00
Juan Cruz Viotti
ec7ad1304f Compress Linux executables and Windows DLLs with UPX (#286)
Before:

    118M   Etcher-linux-x64
    122M   Etcher-linux-x86
    142M   Etcher-win32-x64
    116M   Etcher-win32-x86

After:

    74M    Etcher-linux-x64
    74M    Etcher-linux-x86
    124M   Etcher-win32-x64
    102M   Etcher-win32-x86

Fixes: https://github.com/resin-io/etcher/issues/281
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-11 13:31:10 -04:00
Juan Cruz Viotti
2b1ef3d980 Move package ignore list computation to a separate script (#285)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-11 12:30:00 -04:00
Juan Cruz Viotti
2f65bd512f Implement OS notifications on burn completion (#283)
Its helpful to have an auditive/visual cue when a burn operation
completed.

Instead of adding a setting entry to enable/disable notifications, you
can use the standard way to control notifications from your operating
system. For example, in OS X, you might go to "System Preferences" ->
"Notifications" and disable notifications for "Etcher".

Fixes: https://github.com/resin-io/etcher/issues/280
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-11 11:49:55 -04:00
Juan Cruz Viotti
e1742859e1 Rename Linux binary to "etcher" (#282)
The capital letter is not very user friendly for command line people.

Fixes: https://github.com/resin-io/etcher/issues/278
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-11 10:56:07 -04:00
Juan Cruz Viotti
2e75b7f2bb Upgrade Electron to v0.36.11 (#275)
This version contains a fix for `resizable: false` not working on
GNU/Linux.

See: https://github.com/electron/electron/releases/tag/v0.36.11
Fixes: https://github.com/resin-io/etcher/issues/272
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-10 23:22:51 -04:00
Juan Cruz Viotti
c2265c6561 Prevent dialog.showErrorBox() throwing if wrong parameters (#274)
If the function lacks a message or a title, the following error is
thrown:

    Error: Could not call remote function ``.
    Check that the function signature is correct.
    Underlying error: Error processing argument at index 0,
    conversion failure from undefined

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-10 23:11:29 -04:00
Juan Cruz Viotti
5ccc6b6aa4 Upgrade drivelist to v2.0.13 (#270)
This version contains the following changes:

- Detect Macbook SDCard readers in OS X.
- Detect removable drives better in Windows.
- Keep one decimal in Windows drive size.

Fixes: https://github.com/resin-io/etcher/issues/255
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-10 23:11:12 -04:00
Juan Cruz Viotti
4fb7a138a4 Remove OS X minimum version notice from README
This was better explained in the downloads page.
2016-04-08 16:21:09 -04:00
Juan Cruz Viotti
d3fdca12b0 Make clear that Etcher supports OS X >= 10.9 (#269)
Electron no longer supports 10.8.

See http://electron.atom.io/docs/v0.37.5/tutorial/supported-platforms/#os-x

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-08 15:21:20 -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
67daf086a2 Detect removal of selected drive (#264)
Suppose you plug a device, select it in Etcher, but then eject it from
your computer. Etcher will keep the selection thinking the drive is
still there.

With this PR, the selected drive, if any, is ensured its still inside
the array of available drives, otherwise the selected is cleared.

Fixes: https://github.com/resin-io/etcher/issues/254
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-08 12:17:36 -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
a23fa60b5c Watch sass files in modules/ (#262)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-08 10:30:33 -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
1bfe88f2f4 Show drive name in drive selector modal (#259)
The `name` property equals the drive letter in Windows, and the mount
point in UNIX based operating systems.

Fixes: https://github.com/resin-io/etcher/issues/258
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-08 09:49:11 -04:00
Juan Cruz Viotti
d53bc1ecdf Fix v1.0.0-beta.2 release date in CHANGELOG
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-07 05:35:57 -04:00
Juan Cruz Viotti
69a6674309 v1.0.0-beta.2
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
v1.0.0-beta.2
2016-04-07 05:28:37 -04:00
Juan Cruz Viotti
77d9fadc83 Codesign OS X app inside the DMG package
This PR fixes a frequent issue users were having where opening

`Etcher.app` would result in:



    "Etcher.app" is damaged and can't be opened. You should move it to

    the trash.



Checking the code-signature of the application returned the following

error message:



    $ spctl -a -v Etcher.app

    Etcher.app: invalid signature (code or signature have been modified)



The solution is based on the following paragraphs from Apple's "OS X

Code Signing in Depth" technical note:



https://developer.apple.com/library/mac/technotes/tn2206/_index.html



> Code signing uses extended attributes to store signatures in non-Mach-O

> executables such as script files. If the extended attributes are lost

> then the program's identity will be broken. Thus, when you ship your

> script, you must use a mechanism that preserves extended attributes.

>

> One way to guarantee preservation of extended attributes is by packing

> up your signed code in a read-write disk image (DMG) file before signing

> and then, after signing, converting to read-only. You probably don't

> need to use a disk image until the final package stage so another less

> heavy-handed method would be to use ZIP or XIP files.



In summary, what we now do is:



- Create a temporal read-write DMG image.

- Perform the code-signing *inside* the DMG image.

- Convert the temporal DMG image into a compressed read-only image.



Sadly, this custom workflow doesn't fit in `electron-packager` nor

`electron-builder`, so we had to re-implement the features those

packages provide us in a nice encapsulated way ourselves.



Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-07 05:20:52 -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
e8516b1727 Fix shell.openExternal() freezing GNU/Linux
Electron's `shell.openExternal()` fails on GNU/Linux when Electron is

ran with `sudo`.  The issue was reported, and this is a workaround until

its fixed on the Electron side.



`node-open` is smart enough to check the `$SUDO_USER` environment

variable and to prepend `sudo -u <user>` if needed.



We keep `shell.openExternal()` for OSes other than Linux since we intend

to fully rely on it when the issue is fixed, and since its closer

integration with the operating system might lead to more accurate

results than a third party NPM module.



See https://github.com/electron/electron/issues/5039

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-06 11:12:46 -04:00
Juan Cruz Viotti
912373a389 Log Etcher version in Mixpanel and TrackJS
Its hard to attempt to debug or reproduce an issue if we don't know the

version the user is running.



Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-05 13:10:22 -04:00
Juan Cruz Viotti
bdd541e90e Fix uncaught exception if no file was selected from a dialog
The following error is thrown if the open file dialog is cancelled

without any selection:



  Unhandled rejection TypeError: Cannot read property '0' of undefined

    at Number.indexedGetter (/home/parallels/Projects/etcher/node_modules/bluebird/js/release/call_get.js:106:15)

    at Number.tryCatcher (/home/parallels/Projects/etcher/node_modules/bluebird/js/release/util.js:16:23)

    at Promise._settlePromiseFromHandler (/home/parallels/Projects/etcher/node_modules/bluebird/js/release/promise.js:503:31)

    at Promise._settlePromise (/home/parallels/Projects/etcher/node_modules/bluebird/js/release/promise.js:560:18)

    at Promise._settlePromise0 (/home/parallels/Projects/etcher/node_modules/bluebird/js/release/promise.js:605:10)

    at Promise._settlePromises (/home/parallels/Projects/etcher/node_modules/bluebird/js/release/promise.js:684:18)

    at Async._drainQueue (/home/parallels/Projects/etcher/node_modules/bluebird/js/release/async.js:126:16)

    at Async._drainQueues (/home/parallels/Projects/etcher/node_modules/bluebird/js/release/async.js:136:10)

    at Immediate.Async.drainQueues [as _onImmediate] (/home/parallels/Projects/etcher/node_modules/bluebird/js/release/async.js:16:14)

    at processImmediate [as _immediateCallback] (timers.js:383:17)



Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-05 12:38:34 -04:00
Juan Cruz Viotti
f7b22467ee Enable useContentSize BrowserWindow option
From the documentation:



> `useContentSize` Boolean - The `width` and `height` would be used as web

> page’s size, which means the actual window’s size will include window

> frame’s size and be slightly larger. Default is `false`.



The original issue is that when you specify a width/height, the actual

size that you get is slighly smaller, since the OS title bar is included

in the size you provide.



By using the `useContentSize` option, we ensure the `WebView` gets the

intended size, no matter the title bar.



This PR invalidates: https://github.com/resin-io/etcher/pull/244



Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-05 09:26:46 -04:00
Juan Cruz Viotti
b1bd064cac Merge pull request #243 from resin-io/fix/button-focus-state
Undo `:focus` styles from Bootstrap.
2016-04-05 09:02:59 -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
1bec7e7409 Merge pull request #240 from resin-io/misc/images-assets
Move application images to assets/
2016-04-01 13:34:41 -04:00
Juan Cruz Viotti
dca6c783d2 Move application images to assets/ 2016-04-01 13:09:50 -04:00
Juan Cruz Viotti
ea19c771d5 Merge pull request #239 from resin-io/refactor/drive-selector
Split DriveSelector components into separate files
2016-04-01 13:06:55 -04:00
Juan Cruz Viotti
06f74d140b Merge pull request #237 from resin-io/refactor/if-state-directive
Implement `showIfState` and `hideIfState` directives
2016-04-01 13:06:47 -04:00
Juan Cruz Viotti
abc843cada Merge pull request #238 from resin-io/doc/drive-scanner-set-drives-private
Mark DriveScannerService.setDrives() as private
2016-04-01 13:06:38 -04:00
Juan Cruz Viotti
a14e5235ff Split DriveSelector components into separate files 2016-04-01 12:30:42 -04:00
Juan Cruz Viotti
5001d84e9a Mark DriveScannerService.setDrives() as private 2016-04-01 12:13:12 -04:00
Juan Cruz Viotti
53b3daa335 Implement showIfState and hideIfState directives
This directives will be used in the header navigation instead of
re-using this logic from the `NavigationController`.

A consequence of this change is that `NavigationController` is no longer
needed, and therefore is removed.
2016-04-01 12:09:00 -04:00
Juan Cruz Viotti
321dca0b25 Merge pull request #236 from resin-io/refactor/open-external-directive
Implement an `openExternal` attribute directive.
2016-04-01 11:15:26 -04:00
Juan Cruz Viotti
a4ebe8af50 Implement an openExternal attribute directive.
This directive will be used in the header and footer instead of having
to rely on `NavigationController` to expose `shell.openExternal`.
2016-04-01 11:03:10 -04:00
Juan Cruz Viotti
5642eb2e0a Merge pull request #235 from resin-io/refactor/decouple-drive-scanner-from-dialog
Decouple DriveScannerService from Dialog
2016-04-01 10:51:58 -04:00
Juan Cruz Viotti
3bdaadcfb8 Decouple DriveScannerService from Dialog 2016-04-01 10:32:34 -04:00
Juan Cruz Viotti
f879245fce Merge pull request #234 from resin-io/refactor/selection-state-model
Convert SelectionStateService into a model
2016-04-01 10:31:51 -04:00
Juan Cruz Viotti
70034afc61 Merge pull request #233 from resin-io/refactor/window-progress
Extract browser window progress into WindowProgressService
2016-04-01 10:31:33 -04:00
Juan Cruz Viotti
244d5ca727 Convert SelectionStateService into a model 2016-04-01 10:18:59 -04:00
Juan Cruz Viotti
832d6843df Extract browser window progress into WindowProgressService 2016-04-01 10:08:14 -04:00
Juan Cruz Viotti
d418139def Merge pull request #232 from resin-io/refactor/settings-model
Transform SettingsService into the SettingsModel module
2016-04-01 10:07:59 -04:00