For some reason, when using `windosu`, the app is elevated three times.
However this only happens when the application is packaged for
distribution.
After a couple of days debugging this issue, we have no clue about
what's going on, but `elevator` seems to work fine.
Fixes: https://github.com/resin-io/herostratus/issues/29
ngCloak is removed by angular when parsing the template, however this
doesn't seem to be enough to keep the content hidden until the
application is completely ready.
We accomplish this by setting `display: none` to the `body` element and
maing it display again when our main controller starts, at which point
we know everything is up and running.
This screen informs the user that the burn has completed and that the
drive can be ejected directly.
It also provides a button to burn another image without exitting the
application.
Fixes: https://github.com/resin-io/herostratus/issues/41
Currently we say "done" as soon as the progress is equal to 100, however
we don't wait for the drive to be ejected/unmounted.
This commit introduces a new state, called "Finishing..." which is shown
when the progress is 100, but the drive has not been unmounted.
Currently we only pass the drive device. By passing all the object
(containing the mountpoint, size, etc) we allow more control to the
writer in how to treat the device before/during/after the burning
process.
Currently we fire and forget `sudoPrompt.exec()` and run a timeout for
`process.exit(0)` right away, however this means that the timeout will
start as soon as the elevation dialog is shown when no sudo cache exists
and therefore the timeout will finish before the user can type his
password and submit.
The fix is to keep the parent alive until the children dies, but call
`app.dock.hide()` to make the parent completely invisible to the
operating system.
Fixes: https://github.com/resin-io/herostratus/issues/31
Currently, the parent application will not be closed until the children
process is closed, leading to two Herostratus applications running at
the same time on OS X.