Release Testing Day 2 (#1937)

* Removed unneded ngModel on password field

* Fixed some bad validation messages on Edit Reading List modal and disabled save button

* Added a lot of trace code to help debug a foreign constraint issue.

* Fixed a bug where after a series is scanned, generate covers for series didn't respect webp cover generation.

* Fixed library last scan being stored in Utc, but expected to be server time.

* Fixed up some of that trace logging being way too verbose. Fixed a case where when a missing storyarc number, the whole pair was dropped. Now, it will default that item to the end of the reading list.

Fixed a bug where Start and End dates weren't being calculated after generating a reading list.

* Fixed a bug where the default admin user for reading list creation from files was selecting the wrong user.

Changed so that when there is a bad pair (aka number missing) and only 1 pair, then we wont constantly reorder the item.

* Fixed unit test
This commit is contained in:
Joe Milazzo 2023-04-22 13:04:09 -05:00 committed by GitHub
parent 66f84a0ee3
commit c70154f428
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 163 additions and 51 deletions

View file

@ -33,11 +33,12 @@ and modified
})
export class TimeAgoPipe implements PipeTransform, OnDestroy {
private timer: number | null = null;
private timer: number | null = null;
constructor(private changeDetectorRef: ChangeDetectorRef, private ngZone: NgZone) {}
transform(value: string) {
this.removeTimer();
const d = new Date(value);
console.log('date: ', d);
const now = new Date();
const seconds = Math.round(Math.abs((now.getTime() - d.getTime()) / 1000));
const timeToUpdate = (Number.isNaN(seconds)) ? 1000 : this.getSecondsUntilUpdate(seconds) * 1000;
@ -61,37 +62,37 @@ export class TimeAgoPipe implements PipeTransform, OnDestroy {
return '';
}
if (seconds <= 45) {
return 'just now';
}
if (seconds <= 90) {
return 'a minute ago';
}
if (minutes <= 45) {
return minutes + ' minutes ago';
}
if (minutes <= 90) {
return 'an hour ago';
}
if (hours <= 22) {
return hours + ' hours ago';
}
if (hours <= 36) {
return 'a day ago';
}
if (days <= 25) {
return days + ' days ago';
}
if (days <= 45) {
return 'a month ago';
}
if (days <= 345) {
return months + ' months ago';
}
if (days <= 545) {
return 'a year ago';
}
return years + ' years ago';
if (seconds <= 45) {
return 'just now';
}
if (seconds <= 90) {
return 'a minute ago';
}
if (minutes <= 45) {
return minutes + ' minutes ago';
}
if (minutes <= 90) {
return 'an hour ago';
}
if (hours <= 22) {
return hours + ' hours ago';
}
if (hours <= 36) {
return 'a day ago';
}
if (days <= 25) {
return days + ' days ago';
}
if (days <= 45) {
return 'a month ago';
}
if (days <= 345) {
return months + ' months ago';
}
if (days <= 545) {
return 'a year ago';
}
return years + ' years ago';
}
ngOnDestroy(): void {

View file

@ -58,7 +58,7 @@
aria-describedby="starting-year-header">
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="reviewGroup.dirty || reviewGroup.touched">
<div *ngIf="formControl.errors?.min || formControl.errors?.max">
Must be between 1 and 12 or blank
Must be greater than 1000, 0 or blank
</div>
</div>
</div>
@ -84,7 +84,7 @@
aria-describedby="ending-year-header">
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="reviewGroup.dirty || reviewGroup.touched">
<div *ngIf="formControl.errors?.min || formControl.errors?.max">
Must be between 1 and 12 or blank
Must be greater than 1000, 0 or blank
</div>
</div>
</div>
@ -109,7 +109,7 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" (click)="close()">Close</button>
<button type="submit" class="btn btn-primary" [disabled]="!reviewGroup.valid" (click)="save()">Save</button>
<button type="submit" class="btn btn-primary" (click)="save()">Save</button>
</div>

View file

@ -116,6 +116,8 @@ export class EditReadingListModalComponent implements OnInit, OnDestroy {
updateSelectedIndex(index: number) {
this.coverImageIndex = index;
console.log(this.coverImageIndex)
this.cdRef.detectChanges();
}
updateSelectedImage(url: string) {

View file

@ -12,7 +12,7 @@
<div class="mb-2">
<label for="password" class="form-label visually-hidden">Password</label>
<input class="form-control custom-input" formControlName="password" name="password"
id="password" type="password" ngModel pattern="^.{6,32}$" placeholder="Password">
id="password" type="password" pattern="^.{6,32}$" placeholder="Password">
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="loginForm.get('password')?.errors?.pattern" >
<div class="" *ngIf="loginForm.get('password')?.errors?.pattern">
Password must be between 6 and 32 characters in length