31 Commits

Author SHA1 Message Date
Alexis Svinartchouk
a3322e9fd7 Set module: es2015 in tsconfig.json
Changelog-entry: Set module: es2015 in tsconfig.json
Change-type: patch
2020-08-18 14:05:18 +02:00
Alexis Svinartchouk
34349f64d5 Update progress bar style
Changelog-entry: Update progress bar style
Change-type: patch
2020-06-02 12:46:57 +02:00
Alexis Svinartchouk
9bf58c89d4 Update resin-lint -> @balena/lint
Change-type: patch
2020-04-30 11:35:25 +02:00
Alexis Svinartchouk
ee62b9a4c7 Decompress images before flashing, remove trim setting, trim ext partitions
Changelog-entry: Decompress images before flashing, remove trim setting, trim ext partitions
Change-type: patch
2020-04-30 11:35:23 +02:00
Alexis Svinartchouk
f4eb1af8d0 Convert windows-network-drives.spec.js to typescript
Change-type: patch
2020-01-27 12:35:19 +01:00
Alexis Svinartchouk
c01fc332d2 Convert window-progress.spec.js to typescript
Change-type: patch
2020-01-27 12:35:19 +01:00
Alexis Svinartchouk
ddd1ff0101 Convert progress-status.js and window-progress.js to typescript
Change-type: patch
2020-01-21 17:53:39 +01:00
Alexis Svinartchouk
b266a72726 Convert window-network-drives.js to typescript
Change-type: patch
2020-01-21 17:53:37 +01:00
Alexis Svinartchouk
4c931278b8 Remove angular os-open-external directive
Change-type: patch
2019-12-12 18:25:55 +01:00
Alexis Svinartchouk
fe230e7d30 Rename resin -> balena
Change-type: patch
2019-12-12 18:25:54 +01:00
Lucian
5cd3c5fcc0 Refactor image-selection
Change-type: patch
Changelog-entry: Use React instead of Angular for image selection
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-12-10 12:35:42 +01:00
Alexis Svinartchouk
1be1a2b8f7 Require angular-mocks only when needed
Changelog-entry: Require angular-mocks only when needed
Change-type: patch
2019-12-03 13:23:45 +01:00
Alexis Svinartchouk
6e72c07190 Fix reading images from network drives containing non ascii characters
Changelog-entry: (Windows): Fix reading images from network drives containing non ascii characters
Change-type: patch
2019-04-12 18:56:12 +02:00
Alexis Svinartchouk
db771bc2cc Use full path to wmic as some systems don't have it in their PATH
Changelog-entry: (Windows): Use full path to wmic as some systems don't have it in their PATH
Change-type: patch
2019-04-02 17:32:49 +02:00
Alexis Svinartchouk
b61109a269 Fix reading images from network drives on windows
Change-type: patch
2019-04-01 15:40:30 +02:00
Benedict Aas
ee831da52d
minifix: replace succeeded with successful in messages (#2273)
Change-Type: patch
2018-04-25 15:08:46 +01:00
Benedict Aas
4140d49db3
refactor: multi-writes preparatory changes (#2124)
We add some preparatory changes including new utility functions, as well
as changes throughout the codebase that reflect the change from single
drives to a list of drives, given multi-writes is coming.

Change-Type: patch
Changelog-Entry: Various preparatory changes to account for
multi-writes.
2018-03-23 14:36:39 +00:00
Benedict Aas
835f2cf769
feat(GUI): add colorised multi-writes progress status dots (#2115)
We add colorised progress status dots with quantities of `flashing`,
`validating`, `succeeded`, and `failed` devices.

Change-Type: patch
Changelog-Entry: Add colorised multi-writes progress status dots.
2018-03-14 17:05:01 +00:00
Benedict Aas
4dc64ee15b
feat(GUI): add app to gui folder structure (#2002)
* feat(GUI): add app to gui folder structure

We add a `lib/gui/app/` folder to help transition to Webpack usage.

Change-Type: patch
Changelog-Entry: Add `lib/gui/app` folder to ease into Webpack usage.
2018-01-29 18:34:21 +00:00
Benedict Aas
0058919a8e
feat(GUI): add progress and status to window title (#1438)
* feat(GUI): add progress and status to window title

We add the progress percentage to the window alongside the status
(validating, flashing).

Closes: https://github.com/resin-io/etcher/issues/1427
Fixes: https://github.com/resin-io/etcher/issues/1439
Changelog-Entry: Add the progress and status to the window title.
2017-11-14 09:23:41 +00:00
Juan Cruz Viotti
d8e31665a0 chore: follow standardjs guidelines (#1664)
- Extend the `standard` ESLint configuration
- Remove ESLint rules that are defined in the `standard` configuration
- Get rid of semi-colons

See: https://github.com/resin-io/etcher/pull/1657
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-03 09:01:54 -04:00
Juan Cruz Viotti
5c19b70e83 refactor: adhere mostly to StandardJS guidelines (#1657)
This commit changes the whole codebase to adhere to all StandardJS
guidelines rules except semicolons, since the removal of semicolons
affect pretty much all lines, and the final diff is very hard to follow
(and to assess other more involved changes).

In a nutshell:

- When using `function`, we now require a space before the opening
  parenthesis
- If a line with operators is broken into multiple lines, the operator
  should now go after the line break
- Unnecessary padding lines are now forbidden

There were also some minor things that the `standard` CLI caught that I
updated here.

See: https://standardjs.com
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-03 06:59:02 -04:00
Juan Cruz Viotti
64c8eb594b refactor(GUI): make OSWindowProgress a simple CommonJS module (#1253)
There is no need to tie this module to Angular by using an Angular
service.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-13 14:38:22 -04:00
Juan Cruz Viotti
802d9abb1d refactor: unify image objects across GUI and image-stream (#1229)
`image-stream` returns image objects that look like this:

```js
{
  stream: <readable stream>,
  transform: <transform stream>,
  size: {
    original: <number>,
    final: {
      value: <number>,
      estimation: <boolean>
    }
  },
  ...
}
```

While the GUI handles image objects that look like this:

```sh
{
  path: <string>,
  size: <number>,
  ...
}
```

It looks like we should share a common structure between both, so we can
use `image-stream` images in `drive-constraints`, for example.

Turns out that we actually transform `image-stream` image objects to GUI
image objects when the user selects an image using the image selector
dialog, which is another indicator that we should normalise this
situation.

As a solution, this commit does the following:

- Add `path` to `image-stream` image object
- Reuse `image-stream` image objects in the GUI, given they are a
  superset of GUI image objects

See: https://github.com/resin-io/etcher/pull/1223#discussion_r108165110
Fixes: https://github.com/resin-io/etcher/issues/1232
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-06 09:41:08 -04:00
Juan Cruz Viotti
5ac486d941 style: refer to Resin.io as resin.io, according to the style manual (#823)
> For all, lower-case capitalization unless beginning a sentence (Ex. I
> like resin.io. Resin.io is great.)

See: https://github.com/resin-io/docs#style-manual
See: https://github.com/resin-io/etcher/issues/797
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-03 10:57:29 -04:00
Juan Cruz Viotti
7fa4178161 minifix(GUI): don't call shell.openExternal if resource is undefined (#622)
This PR fixes an uncaught error being thrown when
`OSOpenExternalService.open()` is called with an undefined value.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-08-04 11:02:20 -04:00
Juan Cruz Viotti
7e0f54e7d6 feat(GUI): rich image extensions (#597)
The following PRs add support for a custom `_info` directory containing
metadata such an image URL, display name, logo, etc in
`etcher-image-stream`:

- https://github.com/resin-io-modules/etcher-image-stream/pull/16
- https://github.com/resin-io-modules/etcher-image-stream/pull/14
- https://github.com/resin-io-modules/etcher-image-stream/pull/13

Now that this module supports such metadata, we make use of it in the
GUI as follows:

- The file name is replaced with the display name.
- The file name links to the image URL.
- The "Select Image" logo is replaced with the image logo.

Some miscellaneous changes introduces in this PR to support the changes
described above:

- Implement `SelectionStateModel.getImageUrl()`.
- Implement `SelectionStateModel.getImageLogo()`.
- Implement `SelectionStateModel.getImageName()`.
- Ignore the "logo" image property when displaying the "Select image"
  event, in order to not fill the console with SVG contents.
- Make `svg-icon` understand SVG strings as paths.
- Make `svg-icon` react to changes to the `path` attribute.
- Extract the core functionality of `openExternal` into
  `OSOpenExternalService`.
- Upgrade `etcher-image-stream` to v3.0.1.

Change-Type: minor
Changelog-Entry: Support rich image extensions.
Fixes: https://github.com/resin-io/etcher/issues/470
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-26 08:47:20 -04:00
Juan Cruz Viotti
7d0ea21567 Run linter as part of npm test (#436)
* Fix lint warnings

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

* Run linter as part of `npm test`

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-24 15:35:51 -04:00
Juan Cruz Viotti
2948d13075 Fix image drag and drop not working anymore (#432)
There has been changes in the model regarding with how the image
information was stored, and the dropzone directive was never modified to
comply with those changes.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-24 11:52:50 -04:00
Juan Cruz Viotti
c1074de198 Upgrade electron to v1.1.1 (#427)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-24 10:37:31 -04:00
Juan Cruz Viotti
afeba11424 Move GUI code into lib/gui (#358)
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>
2016-04-25 12:08:19 -04:00