Feature/performance pdf (#426)

#  Added
- Added: Added series format information to the search typeahead to help identify duplicate series in libraries

# Fixed
- Fixed: Fixed accent color not looking well on light theme
- Fixed: Attempted to fix the memory issues with PDF reading on Docker. Uses a Memory Pool for streams and removes a bitmap operation for fixing books with transparent backgrounds (#424)

# Changed
- Changed: Refactored download logs to use the same download code as rest of Kavita 

# Dev stuff
- Added timeout for Regex's to make sure during matching, malicious filenames doesn't crash user system
- Refactored a missing GetCoverImage to use Series Format rather than old Library Type

==================================================
* Added Timeout for Regex matching to ensure malicious filenames don't crash system

* Refactored GetCoverImage to use series format rather than library type

* Refactored download logs to use the download service

* Fixed accent color not looking well on light theme

* Refactored series format into dedicated component and added to search results

* Switch to using MemoryManager for Streams to attempt to minimize GC pressure and reduced bitmap manipulation for transparency hack.
This commit is contained in:
Joseph Milazzo 2021-07-24 16:17:13 -05:00 committed by GitHub
parent 78ad01f5ae
commit 81dfd63250
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 267 additions and 136 deletions

View file

@ -4,6 +4,7 @@ import { ToastrService } from 'ngx-toastr';
import { ServerService } from 'src/app/_services/server.service';
import { saveAs } from 'file-saver';
import { Title } from '@angular/platform-browser';
import { DownloadService } from 'src/app/shared/_services/download.service';
@ -23,7 +24,8 @@ export class DashboardComponent implements OnInit {
counter = this.tabs.length + 1;
active = this.tabs[0];
constructor(public route: ActivatedRoute, private serverService: ServerService, private toastr: ToastrService, private titleService: Title) {
constructor(public route: ActivatedRoute, private serverService: ServerService,
private toastr: ToastrService, private titleService: Title, private downloadService: DownloadService) {
this.route.fragment.subscribe(frag => {
const tab = this.tabs.filter(item => item.fragment === frag);
if (tab.length > 0) {
@ -46,10 +48,7 @@ export class DashboardComponent implements OnInit {
}
fetchLogs() {
this.serverService.fetchLogs().subscribe(res => {
const blob = new Blob([res], {type: 'text/plain;charset=utf-8'});
saveAs(blob, 'kavita.zip');
});
this.downloadService.downloadLogs();
}
}

View file

@ -1,11 +1,8 @@
@import '../../../assets/themes/dark.scss';
.accent {
font-style: italic;
font-size: 0.7rem;
background-color: $dark-form-background;
background-color: lightgray;
padding: 10px;
color: lightgray;
color: black;
border-radius: 6px;
box-shadow: inset 0px 0px 8px 1px $dark-form-background
}