Bugfixes and Cover Chooser Upgrades (#1146)
* Fixed a bug where GetNextChapter would return a loose leaf chapter from a special when it should return nothing. * Fixed a bug in events widget when an update comes in after a user refreshes, the active event counter could get out of sync, thus showing "Nothing going on here" Refactored the events widget to be named appropriately. * Refactored code to have errors during threaded tasks propagate to the UI via events widget (css still needed). Removed ScanLibraryError in favor of generic Error event. * Fixed up some code and added ability to remove the event from events widget * Fixed a bug where modifiying certain fields, like summary, wouldn't lock the field * Fixed a few bugs where lock state was not being set in the DB correctly nor were certain combinations of locking fields and editing fields. * Removed debug code * Updated the discord alert to tag new group * Refactored cover upload to actually handle uploading a temp file via url on the backend so that users can user change cover by url. Fixed up some bugs that occured when chaning the image container in a previous PR. * Code cleanup * Cleaned up the css on the error items * Code cleanup
This commit is contained in:
parent
d2f05cf5ae
commit
e41b455d09
24 changed files with 363 additions and 158 deletions
|
|
@ -83,6 +83,10 @@ export class ImageService implements OnDestroy {
|
|||
return this.baseUrl + 'image/bookmark?chapterId=' + chapterId + '&pageNum=' + pageNum + '&apiKey=' + encodeURIComponent(this.apiKey);
|
||||
}
|
||||
|
||||
getCoverUploadImage(filename: string) {
|
||||
return this.baseUrl + 'image/cover-upload?filename=' + encodeURIComponent(filename);
|
||||
}
|
||||
|
||||
updateErroredImage(event: any) {
|
||||
event.target.src = this.placeholderImage;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,10 @@ export enum EVENTS {
|
|||
ScanLibraryProgress = 'ScanLibraryProgress',
|
||||
OnlineUsers = 'OnlineUsers',
|
||||
SeriesAddedToCollection = 'SeriesAddedToCollection',
|
||||
ScanLibraryError = 'ScanLibraryError',
|
||||
/**
|
||||
* A generic error that occurs during operations on the server
|
||||
*/
|
||||
Error = 'Error',
|
||||
BackupDatabaseProgress = 'BackupDatabaseProgress',
|
||||
/**
|
||||
* A subtype of NotificationProgress that represents maintenance cleanup on server-owned resources
|
||||
|
|
@ -149,15 +152,11 @@ export class MessageHubService {
|
|||
});
|
||||
});
|
||||
|
||||
this.hubConnection.on(EVENTS.ScanLibraryError, resp => {
|
||||
this.hubConnection.on(EVENTS.Error, resp => {
|
||||
this.messagesSource.next({
|
||||
event: EVENTS.ScanLibraryError,
|
||||
event: EVENTS.Error,
|
||||
payload: resp.body
|
||||
});
|
||||
if (this.isAdmin) {
|
||||
// TODO: Just show the error, RBS is done in eventhub
|
||||
this.toastr.error('Library Scan had a critical error. Some series were not saved. Check logs');
|
||||
}
|
||||
});
|
||||
|
||||
this.hubConnection.on(EVENTS.SeriesAdded, resp => {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@ export class UploadService {
|
|||
constructor(private httpClient: HttpClient) { }
|
||||
|
||||
|
||||
uploadByUrl(url: string) {
|
||||
return this.httpClient.post<string>(this.baseUrl + 'upload/upload-by-url', {url}, {responseType: 'text' as 'json'});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param seriesId Series to overwrite cover image for
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue