Warn on Refresh Metadata (#610)

* Warn the user about the dangers of refresh metadata and promote them to use a scan instead.

* Removed presence hub and moved it over to message hub.

When a library scan is in progress, now a spinner will show on manage libraries page.

* Code cleanup
This commit is contained in:
Joseph Milazzo 2021-09-30 17:36:58 -07:00 committed by GitHub
parent 9b536ce700
commit 0ac54e682f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 101 additions and 77 deletions

View file

@ -8,7 +8,6 @@ import { User } from '../_models/user';
import * as Sentry from "@sentry/angular";
import { Router } from '@angular/router';
import { MessageHubService } from './message-hub.service';
import { PresenceHubService } from './presence-hub.service';
@Injectable({
providedIn: 'root'
@ -26,7 +25,7 @@ export class AccountService implements OnDestroy {
private readonly onDestroy = new Subject<void>();
constructor(private httpClient: HttpClient, private router: Router,
private messageHub: MessageHubService, private presenceHub: PresenceHubService) {}
private messageHub: MessageHubService) {}
ngOnDestroy(): void {
this.onDestroy.next();
@ -52,7 +51,6 @@ export class AccountService implements OnDestroy {
if (user) {
this.setCurrentUser(user);
this.messageHub.createHubConnection(user, this.hasAdminRole(user));
this.presenceHub.createHubConnection(user);
}
}),
takeUntil(this.onDestroy)
@ -85,7 +83,6 @@ export class AccountService implements OnDestroy {
// Upon logout, perform redirection
this.router.navigateByUrl('/login');
this.messageHub.stopHubConnection();
this.presenceHub.stopHubConnection();
}
register(model: {username: string, password: string, isAdmin?: boolean}) {