feat: 🎸 disable origin and auth forms when loading

This commit is contained in:
Randall Morey committed 2020-12-01 14:25:10 -05:00
1 parent a909e2bceb
commit 3468a2d7c7
6 files changed
+7 -2

No files matched your search

+1 -1
View File
@@ -5,6 +5,6 @@ module.exports = {
rules: {
'no-bare-strings': true,
'no-curly-component-invocation': { allow: ['app-name', 'company-name', 'company-copyright'] },
'no-implicit-this': { allow: ['app-name', 'company-name', 'company-copyright', 'doc-url'] }
'no-implicit-this': { allow: ['app-name', 'company-name', 'company-copyright', 'doc-url', 'is-loading'] }
}
};
@@ -5,6 +5,7 @@
password=this.password
)}}
@cancel={{false}}
@disabled={{is-loading}}
as |form|
>
+1 -1
View File
@@ -5,6 +5,6 @@ module.exports = {
rules: {
'no-bare-strings': true,
'no-curly-component-invocation': { allow: ['app-name'] },
'no-implicit-this': { allow: ['app-name'] }
'no-implicit-this': { allow: ['app-name', 'is-loading'] }
}
};
+2
View File
@@ -1,6 +1,7 @@
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';
import loading from 'ember-loading/decorator';
export default class OriginRoute extends Route {
// =services
@@ -45,6 +46,7 @@ export default class OriginRoute extends Route {
* @param {string} origin
*/
@action
@loading
async setOrigin(origin) {
try {
await this.origin.setOrigin(origin);
+1
View File
@@ -7,6 +7,7 @@
class="full-width"
@onSubmit={{route-action "setOrigin" this.origin}}
@cancel={{false}}
@disabled={{is-loading}}
as |form|
>
<form.input
@@ -5,6 +5,7 @@
password=this.password
)}}
@cancel={{false}}
@disabled={{is-loading}}
as |form|
>