From 0d67b512a21340250fdd6870430c357f20b0e413 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 11 May 2021 15:39:59 -0400 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20add=20prettier=202.3=20?= =?UTF-8?q?and=20apply=20hbs=20formatting=20and=20linting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/desktop/.template-lintrc.js | 3 +- .../app/components/branded-card/index.hbs | 8 +- ui/desktop/app/components/copyable/index.hbs | 12 +-- ui/desktop/app/templates/application.hbs | 99 ++++++++++--------- ui/desktop/app/templates/error.hbs | 8 +- ui/desktop/app/templates/index.hbs | 2 +- ui/desktop/app/templates/origin.hbs | 21 ++-- ui/desktop/app/templates/scopes.hbs | 2 +- ui/desktop/app/templates/scopes/index.hbs | 2 +- .../templates/scopes/scope/-header-nav.hbs | 19 ++-- .../templates/scopes/scope/authenticate.hbs | 55 ++++++----- .../scopes/scope/authenticate/index.hbs | 11 ++- .../scopes/scope/authenticate/method.hbs | 2 +- .../scope/authenticate/method/index.hbs | 6 +- .../scopes/scope/authenticate/method/oidc.hbs | 10 +- .../app/templates/scopes/scope/index.hbs | 2 +- .../app/templates/scopes/scope/projects.hbs | 18 ++-- .../templates/scopes/scope/projects/error.hbs | 10 +- .../scopes/scope/projects/sessions/index.hbs | 53 +++++----- .../scopes/scope/projects/targets.hbs | 2 +- .../scopes/scope/projects/targets/index.hbs | 46 +++++---- .../scopes/scope/projects/targets/target.hbs | 8 +- .../projects/targets/target/-actions.hbs | 6 +- .../scope/projects/targets/target/-header.hbs | 10 +- .../projects/targets/target/-navigation.hbs | 2 +- .../scope/projects/targets/target/hosts.hbs | 26 +++-- .../scope/projects/targets/target/index.hbs | 2 +- .../projects/targets/target/sessions.hbs | 38 +++---- ui/desktop/electron-app/src/app-updater.js | 8 +- ui/desktop/electron-app/src/handlers.js | 4 +- ui/desktop/ember-cli-build.js | 1 + ui/desktop/package.json | 4 +- 32 files changed, 275 insertions(+), 225 deletions(-) diff --git a/ui/desktop/.template-lintrc.js b/ui/desktop/.template-lintrc.js index c95107553..8741adbc7 100644 --- a/ui/desktop/.template-lintrc.js +++ b/ui/desktop/.template-lintrc.js @@ -1,7 +1,8 @@ 'use strict'; module.exports = { - extends: 'octane', + plugins: ['ember-template-lint-plugin-prettier'], + extends: ['octane', 'ember-template-lint-plugin-prettier:recommended'], rules: { 'no-bare-strings': true, 'no-curly-component-invocation': { allow: ['app-name'] }, diff --git a/ui/desktop/app/components/branded-card/index.hbs b/ui/desktop/app/components/branded-card/index.hbs index bf8af81d2..6b97c713b 100644 --- a/ui/desktop/app/components/branded-card/index.hbs +++ b/ui/desktop/app/components/branded-card/index.hbs @@ -1,5 +1,5 @@ -
-

{{@title}}

-

{{@description}}

+
+

{{@title}}

+

{{@description}}

{{yield}} -
+
\ No newline at end of file diff --git a/ui/desktop/app/components/copyable/index.hbs b/ui/desktop/app/components/copyable/index.hbs index ac3474940..a1a62e7f2 100644 --- a/ui/desktop/app/components/copyable/index.hbs +++ b/ui/desktop/app/components/copyable/index.hbs @@ -1,16 +1,16 @@ {{#if this.copied}} - + {{yield}} {{else}} - + {{yield}} {{/if}} @@ -19,12 +19,12 @@ {{this.actionText}} {{/if}} - + \ No newline at end of file diff --git a/ui/desktop/app/templates/application.hbs b/ui/desktop/app/templates/application.hbs index b3750e04b..6407a15d2 100644 --- a/ui/desktop/app/templates/application.hbs +++ b/ui/desktop/app/templates/application.hbs @@ -3,43 +3,48 @@ - - + + {{#if this.session.isAuthenticated}} - {{outlet "header-nav"}} + {{outlet 'header-nav'}} - + {{t 'actions.deauthenticate'}} - + + @changed={{route-action 'toggleTheme'}} + as |radioGroup| + > - + - + - + @@ -72,21 +77,23 @@ {{#if confirmation.options.isConnectSuccess}} + as |dialog| + > - {{t 'states.connection.success.description' + {{t + 'states.connection.success.description' port=confirmation.text.port address=confirmation.text.address protocol=confirmation.text.protocol @@ -95,57 +102,59 @@ - - {{t "actions.ok"}} + + {{t 'actions.ok'}} {{else if confirmation.options.isConnectError}} + as |dialog| + >

{{confirmation.text}}

- {{t "questions.retry-confirm"}} + {{t 'questions.retry-confirm'}}

- - {{t "actions.retry"}} + + {{t 'actions.retry'}} - - {{t "actions.cancel"}} + + {{t 'actions.cancel'}}
{{else}} + as |dialog| + >

{{confirmation.text}}

- - {{t "actions.ok"}} + + {{t 'actions.ok'}} - - {{t "actions.cancel"}} + + {{t 'actions.cancel'}}
{{/if}} -
+ \ No newline at end of file diff --git a/ui/desktop/app/templates/error.hbs b/ui/desktop/app/templates/error.hbs index f5fcb9fbf..9f2d6a267 100644 --- a/ui/desktop/app/templates/error.hbs +++ b/ui/desktop/app/templates/error.hbs @@ -1,4 +1,4 @@ -{{page-title (t "errors.generic.title") }} +{{page-title (t 'errors.generic.title')}}
@@ -7,9 +7,9 @@ - - {{t "actions.disconnect"}} + + {{t 'actions.disconnect'}} -
+ \ No newline at end of file diff --git a/ui/desktop/app/templates/index.hbs b/ui/desktop/app/templates/index.hbs index f3994d28f..2ed8bff0b 100644 --- a/ui/desktop/app/templates/index.hbs +++ b/ui/desktop/app/templates/index.hbs @@ -1,2 +1,2 @@ {{outlet}} -{{@model.message}} +{{@model.message}} \ No newline at end of file diff --git a/ui/desktop/app/templates/origin.hbs b/ui/desktop/app/templates/origin.hbs index 8fbae5380..5ecd70b94 100644 --- a/ui/desktop/app/templates/origin.hbs +++ b/ui/desktop/app/templates/origin.hbs @@ -4,22 +4,21 @@ @description={{t 'descriptions.origin-initialization'}} > - + @label={{t 'form.origin.label'}} + @helperText={{t 'form.origin.description'}} + {{autofocus}} + /> + - + \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes.hbs b/ui/desktop/app/templates/scopes.hbs index c24cd6895..e2147cab0 100644 --- a/ui/desktop/app/templates/scopes.hbs +++ b/ui/desktop/app/templates/scopes.hbs @@ -1 +1 @@ -{{outlet}} +{{outlet}} \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/index.hbs b/ui/desktop/app/templates/scopes/index.hbs index c24cd6895..e2147cab0 100644 --- a/ui/desktop/app/templates/scopes/index.hbs +++ b/ui/desktop/app/templates/scopes/index.hbs @@ -1 +1 @@ -{{outlet}} +{{outlet}} \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/-header-nav.hbs b/ui/desktop/app/templates/scopes/scope/-header-nav.hbs index 4a383eb6d..cbb597ea5 100644 --- a/ui/desktop/app/templates/scopes/scope/-header-nav.hbs +++ b/ui/desktop/app/templates/scopes/scope/-header-nav.hbs @@ -1,16 +1,21 @@ {{!-- {{#if this.session.data.authenticated.isGlobal}} --}} - - {{t "titles.global"}} - - + + {{t 'titles.global'}} + + {{!-- {{/if}} --}} {{#each this.scopes.orgs as |scope|}} - + {{scope.displayName}} {{/each}} - + \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/authenticate.hbs b/ui/desktop/app/templates/scopes/scope/authenticate.hbs index 027736bc3..60ccaefa0 100644 --- a/ui/desktop/app/templates/scopes/scope/authenticate.hbs +++ b/ui/desktop/app/templates/scopes/scope/authenticate.hbs @@ -1,20 +1,24 @@ -{{page-title (t "actions.authenticate")}} +{{page-title (t 'actions.authenticate')}}
- - {{t "titles.global"}} + @text={{t 'actions.choose-different-org'}} + @icon='user-organization' + as |dropdown| + > + + {{t 'titles.global'}} {{#each this.sortedScopes as |scope|}} - + {{scope.displayName}} {{/each}} @@ -24,16 +28,22 @@ {{#if (feature-flag 'oidc')}} {{! OIDC enable: list all auth methods }} {{#each @model.authMethods as |authMethod|}} - - {{t (concat "resources.auth-method.types." authMethod.type)}} + + {{t (concat 'resources.auth-method.types.' authMethod.type)}} {{/each}} {{else}} {{! OIDC disabled: filter out OIDC auth methods}} {{#each @model.authMethods as |authMethod|}} {{#unless authMethod.isOIDC}} - - {{t (concat "resources.auth-method.types." authMethod.type)}} + + {{t (concat 'resources.auth-method.types.' authMethod.type)}} {{/unless}} {{/each}} @@ -43,12 +53,12 @@ {{#if @model.authMethods}} {{outlet}} -

- {{t "origin.connected-to"}}: +

+ {{t 'origin.connected-to'}}: {{this.origin}} -
- - {{t "actions.change-origin"}} +
+ + {{t 'actions.change-origin'}}

@@ -56,15 +66,16 @@ {{#unless @model.authMethods}} + @title={{t 'resources.auth-method.messages.none.title'}} + @icon='alert-circle-outline' + as |message| + > - {{t "resources.auth-method.messages.none.description"}} + {{t 'resources.auth-method.messages.none.description'}} {{/unless}}
-
+ \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/authenticate/index.hbs b/ui/desktop/app/templates/scopes/scope/authenticate/index.hbs index effd53cbd..b8dbc824f 100644 --- a/ui/desktop/app/templates/scopes/scope/authenticate/index.hbs +++ b/ui/desktop/app/templates/scopes/scope/authenticate/index.hbs @@ -1,12 +1,13 @@ {{#unless @model}} + @title={{t 'resources.auth-method.messages.none.title'}} + @icon='alert-circle-outline' + as |message| + > - {{t "resources.auth-method.messages.none.description"}} + {{t 'resources.auth-method.messages.none.description'}} -{{/unless}} +{{/unless}} \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/authenticate/method.hbs b/ui/desktop/app/templates/scopes/scope/authenticate/method.hbs index c24cd6895..e2147cab0 100644 --- a/ui/desktop/app/templates/scopes/scope/authenticate/method.hbs +++ b/ui/desktop/app/templates/scopes/scope/authenticate/method.hbs @@ -1 +1 @@ -{{outlet}} +{{outlet}} \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/authenticate/method/index.hbs b/ui/desktop/app/templates/scopes/scope/authenticate/method/index.hbs index e05057cee..14266bf9c 100644 --- a/ui/desktop/app/templates/scopes/scope/authenticate/method/index.hbs +++ b/ui/desktop/app/templates/scopes/scope/authenticate/method/index.hbs @@ -2,7 +2,7 @@ {{! OIDC enabled: show form for any auth method}} {{else}} @@ -10,8 +10,8 @@ {{#unless @model.isOIDC}} {{/unless}} -{{/if}} +{{/if}} \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/authenticate/method/oidc.hbs b/ui/desktop/app/templates/scopes/scope/authenticate/method/oidc.hbs index c6e38e882..09fe1248c 100644 --- a/ui/desktop/app/templates/scopes/scope/authenticate/method/oidc.hbs +++ b/ui/desktop/app/templates/scopes/scope/authenticate/method/oidc.hbs @@ -6,18 +6,14 @@

{{t 'resources.auth-method.messages.pending.description'}}

{{t 'resources.auth-method.questions.no-see-window'}} - + {{t 'actions.retry'}}

- + {{t 'actions.cancel'}}

- + \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/index.hbs b/ui/desktop/app/templates/scopes/scope/index.hbs index c24cd6895..e2147cab0 100644 --- a/ui/desktop/app/templates/scopes/scope/index.hbs +++ b/ui/desktop/app/templates/scopes/scope/index.hbs @@ -1 +1 @@ -{{outlet}} +{{outlet}} \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/projects.hbs b/ui/desktop/app/templates/scopes/scope/projects.hbs index 6a8cd0d89..4c68c45ca 100644 --- a/ui/desktop/app/templates/scopes/scope/projects.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects.hbs @@ -1,18 +1,14 @@ - - - {{t "resources.target.title_plural"}} + + + {{t 'resources.target.title_plural'}} - - - {{t "resources.session.title_plural"}} + + + {{t 'resources.session.title_plural'}} @@ -22,4 +18,4 @@ {{outlet}} - + \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/projects/error.hbs b/ui/desktop/app/templates/scopes/scope/projects/error.hbs index 57529c9f8..6142bbbd5 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/error.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/error.hbs @@ -1,10 +1,10 @@ -{{page-title (t "errors.generic.title") }} +{{page-title (t 'errors.generic.title')}} {{! Most error types will land here }} {{#if @model.errors}} {{#each @model.errors as |error|}} - + {{/each}} {{/if}} @@ -16,8 +16,8 @@ - - {{t "actions.disconnect"}} + + {{t 'actions.disconnect'}} -{{/unless}} +{{/unless}} \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/projects/sessions/index.hbs b/ui/desktop/app/templates/scopes/scope/projects/sessions/index.hbs index 123bc2007..58abacbc3 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/sessions/index.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/sessions/index.hbs @@ -2,10 +2,10 @@

- {{t "resources.session.title_plural"}} - + {{t 'resources.session.title_plural'}} +

-

{{t "resources.session.description"}}

+

{{t 'resources.session.description'}}

@@ -15,33 +15,34 @@ - {{t "form.id.label"}} - {{t "resources.target.title"}} - {{t "form.proxy.label"}} - {{t "form.started.label"}} - {{t "form.status.label"}} + {{t 'form.id.label'}} + {{t 'resources.target.title'}} + {{t 'form.proxy.label'}} + {{t 'form.started.label'}} + {{t 'form.status.label'}} {{#each this.sorted as |model|}} - + + class={{concat 'session-status-' model.status}} + @name='app-icons/action-session' + @size='medium' + /> {{model.id}} {{model.target.displayName}} - {{!-- + {{! Two if's here because: 1) Local proxy info is only relevant if the session is active or pending (aka isCancelable). Once the session @@ -51,13 +52,13 @@ with it. It's possible for the user to start sessions from other devices (or even another tab), in which case we won't have the local proxy info available here. - --}} + }} {{#if model.isCancelable}} {{#if model.proxy}} {{model.proxy}} @@ -74,8 +75,11 @@ {{#if model.isCancelable}} - - {{t "actions.cancel"}} + + {{t 'actions.cancel'}} {{/if}} @@ -87,9 +91,12 @@ {{else}} - + - {{t "resources.session.messages.none-friendly.description"}} + {{t 'resources.session.messages.none-friendly.description'}} @@ -98,4 +105,4 @@ - + \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets.hbs index f0feb5185..d97f37895 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets.hbs @@ -1,3 +1,3 @@ {{page-title (t 'resources.target.title_plural')}} -{{outlet}} +{{outlet}} \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/index.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/index.hbs index cb352055d..99ca234d9 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/index.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/index.hbs @@ -2,10 +2,10 @@

- {{t "resources.target.title_plural"}} - + {{t 'resources.target.title_plural'}} +

-

{{t "resources.target.description"}}

+

{{t 'resources.target.description'}}

@@ -13,10 +13,10 @@ - {{t "form.name.label"}} - {{t "form.id.label"}} - {{t "form.type.label"}} - {{t "resources.project.title"}} + {{t 'form.name.label'}} + {{t 'form.id.label'}} + {{t 'form.type.label'}} + {{t 'resources.project.title'}} @@ -25,7 +25,7 @@ {{model.displayName}} @@ -34,16 +34,16 @@

{{model.target.description}}

{{/if}} {{#if model.target.isActive}} - - {{t "states.active"}} + + {{t 'states.active'}} {{/if}}
{{model.id}} @@ -51,7 +51,7 @@ {{#if model.type}} - {{t (concat "resources.target.types." model.type)}} + {{t (concat 'resources.target.types.' model.type)}} {{/if}} @@ -59,8 +59,8 @@
{{model.project.id}} @@ -70,8 +70,11 @@ - - {{t "resources.session.actions.connect"}} + + {{t 'resources.session.actions.connect'}} @@ -81,9 +84,12 @@ {{else}} - + - {{t "resources.target.messages.none.description"}} + {{t 'resources.target.messages.none.description'}} @@ -91,4 +97,4 @@ {{/if}} - + \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target.hbs index e9354d3f0..901c911ae 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target.hbs @@ -3,19 +3,19 @@ - {{outlet "header"}} + {{outlet 'header'}} - {{outlet "actions"}} + {{outlet 'actions'}} - {{outlet "navigation"}} + {{outlet 'navigation'}} {{outlet}} - + \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/-actions.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/-actions.hbs index b82595c94..76fce67d7 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target/-actions.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/-actions.hbs @@ -1,3 +1,3 @@ - - {{t "resources.session.actions.connect"}} - + + {{t 'resources.session.actions.connect'}} + \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/-header.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/-header.hbs index 228a2887b..a2a93c449 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target/-header.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/-header.hbs @@ -2,8 +2,8 @@ {{@model.displayName}} {{#if @model.isActive}}   - - {{t "states.active"}} + + {{t 'states.active'}} {{/if}} @@ -11,9 +11,9 @@

{{@model.id}} -

+

\ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/-navigation.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/-navigation.hbs index 12bfe97f8..54275ed07 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target/-navigation.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/-navigation.hbs @@ -5,4 +5,4 @@ {{t 'resources.host.title_plural'}} - + \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs index 92ae3eebe..3a4dfbd65 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs @@ -1,4 +1,4 @@ -{{page-title (t "resources.host-set.title_plural")}} +{{page-title (t 'resources.host-set.title_plural')}} {{#if @model.hosts}} @@ -13,19 +13,24 @@ {{host.id}} {{host.attributes.address}} - {{t (concat 'resources.host.types.' host.type)}} + {{t + (concat 'resources.host.types.' host.type) + }} - - {{t "resources.session.actions.connect"}} + + {{t 'resources.session.actions.connect'}} @@ -36,11 +41,14 @@ {{else}} - + - {{t "resources.host.messages.none-friendly.description"}} + {{t 'resources.host.messages.none-friendly.description'}} -{{/if}} +{{/if}} \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/index.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/index.hbs index c24cd6895..e2147cab0 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target/index.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/index.hbs @@ -1 +1 @@ -{{outlet}} +{{outlet}} \ No newline at end of file diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/sessions.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/sessions.hbs index 8593787fe..46d8dfad6 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target/sessions.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/sessions.hbs @@ -3,9 +3,9 @@ - {{t "form.id.label"}} - {{t "form.proxy.label"}} - {{t "form.started.label"}} + {{t 'form.id.label'}} + {{t 'form.proxy.label'}} + {{t 'form.started.label'}} @@ -14,15 +14,16 @@ {{#each this.cancelableUserSessions as |session|}} - + + class={{concat 'session-status-' session.status}} + @name='app-icons/action-session' + @size='medium' + /> {{session.id}} @@ -33,8 +34,8 @@ {{#if session.proxy}} {{session.proxy}} @@ -50,10 +51,10 @@ {{#if session.isCancelable}} - {{t "actions.cancel"}} + {{t 'actions.cancel'}} {{/if}} @@ -67,11 +68,14 @@ {{else}} - + - {{t "resources.session.messages.none-active-friendly.description"}} + {{t 'resources.session.messages.none-active-friendly.description'}} -{{/if}} +{{/if}} \ No newline at end of file diff --git a/ui/desktop/electron-app/src/app-updater.js b/ui/desktop/electron-app/src/app-updater.js index 6409ef198..1898c6ac6 100644 --- a/ui/desktop/electron-app/src/app-updater.js +++ b/ui/desktop/electron-app/src/app-updater.js @@ -46,7 +46,8 @@ const findUpdateArchive = (version) => { // Create update config using downloaded archive const createAppUpdaterConfig = (url, version, destination) => { - if (debug) console.log(`[app-updater] url: ${url}, destination: ${destination}`); + if (debug) + console.log(`[app-updater] url: ${url}, destination: ${destination}`); const json = { url, version }; const config = JSON.stringify(json); const configPath = `${destination}/feed.json`; @@ -144,7 +145,10 @@ module.exports = { const location = process.env.APP_UPDATER_LATEST_VERSION_LOCATION; if (debug && location) { // Support hosted url and file paths - displayDownloadPrompt(latestVersion, location.match(/^http/i) ? location : `file://${location}`); + displayDownloadPrompt( + latestVersion, + location.match(/^http/i) ? location : `file://${location}` + ); return; } diff --git a/ui/desktop/electron-app/src/handlers.js b/ui/desktop/electron-app/src/handlers.js index 4e102212a..3f4eb94c7 100644 --- a/ui/desktop/electron-app/src/handlers.js +++ b/ui/desktop/electron-app/src/handlers.js @@ -33,8 +33,8 @@ handle('resetOrigin', async (requestOrigin) => { */ handle('openExternal', async (href) => { const isSecure = href.startsWith('https://'); - const isLocalhost = href.startsWith('http://localhost') - || href.startsWith('http://127.0.0.1'); + const isLocalhost = + href.startsWith('http://localhost') || href.startsWith('http://127.0.0.1'); if (isSecure || isLocalhost || isDev) { // openExternal is necessary in order to display documentation and to // support arbitrary OIDC flows. The protocol is validated (see above). diff --git a/ui/desktop/ember-cli-build.js b/ui/desktop/ember-cli-build.js index 2bec26235..91b6adad0 100644 --- a/ui/desktop/ember-cli-build.js +++ b/ui/desktop/ember-cli-build.js @@ -4,6 +4,7 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); module.exports = function (defaults) { let app = new EmberApp(defaults, { + hinting: false, 'ember-cli-babel': { includeExternalHelpers: true, }, diff --git a/ui/desktop/package.json b/ui/desktop/package.json index 3319db39b..ad95f6b81 100644 --- a/ui/desktop/package.json +++ b/ui/desktop/package.json @@ -23,6 +23,7 @@ "lint:sass": "stylelint '**/*.scss'", "lint:electron": "electronegativity -r -i ./electron-app", "format": "npm-run-all format:*", + "format:hbs": "prettier --write 'app/**/*.hbs'", "format:js": "prettier --write '{app,config,stories,tests,electron-app/src}/**/*.js' *.js", "format:sass": "prettier --write app/**/*.scss", "lint:js:fix": "eslint . --fix", @@ -81,6 +82,7 @@ "ember-resolver": "^8.0.2", "ember-source": "~3.24.0", "ember-template-lint": "^2.15.0", + "ember-template-lint-plugin-prettier": "^2.0.0", "eslint": "^7.17.0", "eslint-config-prettier": "^7.1.0", "eslint-plugin-ember": "^10.1.1", @@ -89,7 +91,7 @@ "faker": "^5.5.3", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", - "prettier": "^2.2.1", + "prettier": "^2.3.0", "qunit": "^2.13.0", "qunit-dom": "^1.6.0", "rose": "*",