@arsedizioni/ars-utils 20.3.5 → 20.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,7 +4,7 @@ import { HttpClient, HttpHeaders, HttpRequest, HttpErrorResponse } from '@angula
|
|
|
4
4
|
import { BroadcastService, SystemUtils } from '@arsedizioni/ars-utils/core';
|
|
5
5
|
import { EMPTY, throwError, of, catchError as catchError$1, switchMap } from 'rxjs';
|
|
6
6
|
import { DialogService } from '@arsedizioni/ars-utils/ui';
|
|
7
|
-
import { catchError,
|
|
7
|
+
import { catchError, finalize, map } from 'rxjs/operators';
|
|
8
8
|
|
|
9
9
|
const ClipperMessages = {
|
|
10
10
|
/**
|
|
@@ -2238,6 +2238,7 @@ class ClipperService {
|
|
|
2238
2238
|
flags |= ClipperLoginFlags.RememberCredentials;
|
|
2239
2239
|
}
|
|
2240
2240
|
this.login(email ?? this.getRememberToken(), password, remember, oauth, oauthAccessToken, flags)
|
|
2241
|
+
.pipe(finalize(() => this.dialogService.clearBusy()))
|
|
2241
2242
|
.subscribe({
|
|
2242
2243
|
next: r => {
|
|
2243
2244
|
if (!r.success) {
|
|
@@ -2264,11 +2265,11 @@ class ClipperService {
|
|
|
2264
2265
|
autoLogout(onSuccess) {
|
|
2265
2266
|
if (!this.loggedIn())
|
|
2266
2267
|
return;
|
|
2267
|
-
this.logout()
|
|
2268
|
+
this.logout()
|
|
2269
|
+
.pipe(finalize(() => this.dialogService.clearBusy()))
|
|
2270
|
+
.subscribe({
|
|
2268
2271
|
next: r => {
|
|
2269
2272
|
if (!r.success) {
|
|
2270
|
-
localStorage.removeItem('clipper_context');
|
|
2271
|
-
localStorage.removeItem('clipper_remember');
|
|
2272
2273
|
this.broadcastService.sendMessage(ClipperMessages.LOGIN_CHANGED);
|
|
2273
2274
|
this.dialogService.error(r.message, undefined, "Errore in Clipper");
|
|
2274
2275
|
}
|