diff --git a/src/app/components/floating-column/add-new-account/add-new-account.component.html b/src/app/components/floating-column/add-new-account/add-new-account.component.html
index 00274f15..f9e7f28d 100644
--- a/src/app/components/floating-column/add-new-account/add-new-account.component.html
+++ b/src/app/components/floating-column/add-new-account/add-new-account.component.html
@@ -7,7 +7,8 @@
-
+
+
diff --git a/src/app/components/floating-column/add-new-account/add-new-account.component.ts b/src/app/components/floating-column/add-new-account/add-new-account.component.ts
index 1e43dba3..a79a40cb 100644
--- a/src/app/components/floating-column/add-new-account/add-new-account.component.ts
+++ b/src/app/components/floating-column/add-new-account/add-new-account.component.ts
@@ -20,6 +20,8 @@ export class AddNewAccountComponent implements OnInit {
private instance: string;
isComrade: boolean;
+ isLoading: boolean;
+
private _mastodonFullHandle: string;
@Input()
set mastodonFullHandle(value: string) {
@@ -57,17 +59,20 @@ export class AddNewAccountComponent implements OnInit {
}
onSubmit(): boolean {
- // let fullHandle = this.mastodonFullHandle.split('@').filter(x => x != null && x !== '');
- // const username = fullHandle[0];
- // const instance = fullHandle[1];
-
this.checkBlockList(this.instance);
+ this.isLoading = true;
this.checkAndCreateApplication(this.instance)
.then((appData: AppData) => {
this.redirectToInstanceAuthPage(this.username, this.instance, appData);
})
+ .then(x => {
+ setTimeout(() => {
+ this.isLoading = false;
+ }, 1000);
+ })
.catch((err: HttpErrorResponse) => {
+ this.isLoading = false;
if (err instanceof HttpErrorResponse) {
this.notificationService.notifyHttpError(err, null);
} else if ((err).message === 'CORS') {