mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 13:23:20 -07:00
Change the oauth to a loading spinner
This commit is contained in:
parent
ebea0caeb8
commit
883ddfb9d2
2 changed files with 13 additions and 10 deletions
|
@ -36,7 +36,10 @@
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<button mat-raised-button color="primary" type="submit" (click)="loginWithOmbi = true">{{'Login.SignInWith' | translate:appNameTranslate}}</button>
|
<button mat-raised-button color="primary" type="submit" (click)="loginWithOmbi = true">{{'Login.SignInWith' | translate:appNameTranslate}}</button>
|
||||||
<button mat-raised-button color="accent" type="button" (click)="oauth()">{{'Login.SignInWithPlex' | translate}}</button>
|
<button mat-raised-button color="accent" type="button" (click)="oauth()">
|
||||||
|
<span *ngIf="!oauthLoading">{{'Login.SignInWithPlex' | translate}}</span>
|
||||||
|
<span *ngIf="oauthLoading"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ export class LoginComponent implements OnDestroy, OnInit {
|
||||||
public baseUrl: string;
|
public baseUrl: string;
|
||||||
public loginWithOmbi: boolean;
|
public loginWithOmbi: boolean;
|
||||||
public pinTimer: any;
|
public pinTimer: any;
|
||||||
|
public oauthLoading: boolean;
|
||||||
|
|
||||||
public get appName(): string {
|
public get appName(): string {
|
||||||
if (this.customizationSettings.applicationName) {
|
if (this.customizationSettings.applicationName) {
|
||||||
|
@ -97,7 +98,7 @@ export class LoginComponent implements OnDestroy, OnInit {
|
||||||
});
|
});
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
this.cycleBackground();
|
this.cycleBackground();
|
||||||
}, 15000);
|
}, 30000);
|
||||||
|
|
||||||
const base = this.href;
|
const base = this.href;
|
||||||
if (base.length > 1) {
|
if (base.length > 1) {
|
||||||
|
@ -160,9 +161,7 @@ export class LoginComponent implements OnDestroy, OnInit {
|
||||||
|
|
||||||
this.pinTimer = setInterval(() => {
|
this.pinTimer = setInterval(() => {
|
||||||
|
|
||||||
this.notify.open("Authenticating. Loading... Please Wait", "OK", {
|
this.oauthLoading = true;
|
||||||
duration: 3000
|
|
||||||
});
|
|
||||||
this.getPinResult(x.pinId);
|
this.getPinResult(x.pinId);
|
||||||
}, 4000);
|
}, 4000);
|
||||||
});
|
});
|
||||||
|
@ -180,6 +179,7 @@ export class LoginComponent implements OnDestroy, OnInit {
|
||||||
if(this.oAuthWindow) {
|
if(this.oAuthWindow) {
|
||||||
this.oAuthWindow.close();
|
this.oAuthWindow.close();
|
||||||
}
|
}
|
||||||
|
this.oauthLoading = false;
|
||||||
this.router.navigate(["search"]);
|
this.router.navigate(["search"]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue