Pre-Release Shakeout (#1932)

* Allow users to setup an account with a fake email and the same username without hitting the validate username code.

* Fixed a bug where opds url could have //.

Fixed a bug where baseurl wasn't being used for invite link generation

* Fixed enum mismatch causing age rating to display incorrectly on UI
This commit is contained in:
Joe Milazzo 2023-04-16 19:28:21 -05:00 committed by GitHub
parent 202a35dc7c
commit e7618861e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 43 additions and 17 deletions

View file

@ -4,16 +4,18 @@ export enum AgeRating {
*/
NotApplicable = -1,
Unknown = 0,
AdultsOnly = 1,
RatingPending = 1,
EarlyChildhood = 2,
Everyone = 3,
Everyone10Plus = 4,
G = 5,
KidsToAdults = 6,
Mature = 7,
Mature15Plus = 8,
Mature17Plus = 9,
RatingPending = 10,
Teen = 11,
X18Plus = 12
G = 4,
Everyone10Plus = 5,
PG = 6,
KidsToAdults = 7,
Teen = 8,
Mature15Plus = 9,
Mature17Plus = 10,
Mature = 11,
R18Plus = 12,
AdultsOnly = 13,
X18Plus = 14
}

View file

@ -59,6 +59,7 @@ export class InviteUserComponent implements OnInit {
}
}, err => {
this.isSending = false;
this.toastr.error(err)
});
}

View file

@ -32,6 +32,8 @@ export class AgeRatingPipe implements PipeTransform {
case AgeRating.Teen: return of('Teen');
case AgeRating.X18Plus: return of('X18+');
case AgeRating.NotApplicable: return of('Not Applicable');
case AgeRating.PG: return of('PG');
case AgeRating.R18Plus: return of('R18+')
}
return of('Unknown');

View file

@ -257,10 +257,10 @@ export class UserPreferencesComponent implements OnInit, OnDestroy {
transformKeyToOpdsUrl(key: string) {
if (environment.production) {
return `${location.origin}${environment.apiUrl}opds/${key}`;
return `${location.origin}${environment.apiUrl}opds/${key}`.replace('//', '/');
}
return `${location.origin}${this.baseUrl}api/opds/${key}`;
return `${location.origin}${this.baseUrl}api/opds/${key}`.replace('//', '/');
}
handleBackgroundColorChange() {