Stablize the Styles (#1128)

* Fixed a bug where adding multiple series to reading list would throw an error on UI, but it was successful.

* When a series has a reading list, we now show the connection on Series detail.

* Removed all baseurl code from UI and not-connected component since we no longer use it.

* Fixed tag badges not showing a border. Added last read time to the series detail page

* Fixed up error interceptor to remove no-connection code

* Changed implementation for series detail. Book libraries will never send chapters back. Volume 0 volumes will not be sent in volumes ever. Fixed up more renaming logic on books to send more accurate representations to the UI.

* Cleaned up the selected tab and tab display logic

* Fixed a bad where statement in reading lists for series

* Fixed up tab logic again

* Fixed a small margin on search backdrop

* Made badge expander button smaller to align with badges

* Fixed a few UIs due to .form-group and .form-row being removed

* Updated Theme component page to help with style testing

* Added more components to theme tester

* Cleaned up some styling

* Fixed opacity on search item hover
This commit is contained in:
Joseph Milazzo 2022-02-28 13:09:37 -06:00 committed by GitHub
parent cb9b54b8de
commit 864d693790
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 425 additions and 187 deletions

View file

@ -1,4 +1,4 @@
import { Injectable, OnDestroy } from '@angular/core';
import { Injectable } from '@angular/core';
import {
HttpRequest,
HttpHandler,
@ -8,14 +8,12 @@ import {
import { Observable, throwError } from 'rxjs';
import { Router } from '@angular/router';
import { ToastrService } from 'ngx-toastr';
import { catchError, take } from 'rxjs/operators';
import { catchError } from 'rxjs/operators';
import { AccountService } from '../_services/account.service';
import { environment } from 'src/environments/environment';
@Injectable()
export class ErrorInterceptor implements HttpInterceptor {
public urlKey: string = 'kavita--no-connection-url';
constructor(private router: Router, private toastr: ToastrService, private accountService: AccountService) {}
@ -44,12 +42,6 @@ export class ErrorInterceptor implements HttpInterceptor {
if (this.toastr.previousToastMessage !== 'Something unexpected went wrong.') {
this.toastr.error('Something unexpected went wrong.');
}
// If we are not on no-connection, redirect there and save current url so when we refersh, we redirect back there
// if (this.router.url !== '/no-connection') {
// localStorage.setItem(this.urlKey, this.router.url);
// this.router.navigateByUrl('/no-connection');
// }
break;
}
return throwError(error);
@ -126,8 +118,7 @@ export class ErrorInterceptor implements HttpInterceptor {
private handleAuthError(error: any) {
// NOTE: Signin has error.error or error.statusText available.
// if statement is due to http/2 spec issue: https://github.com/angular/angular/issues/23334
this.accountService.currentUser$.pipe(take(1)).subscribe(user => {
this.accountService.logout();
});
this.accountService.logout();
this.router.navigateByUrl('/login');
}
}