Release Shakeout Day 2 (#1594)

* Fixed a bad color on the PWA titlebar

* Added more unit tests, cleaned up some dead code, and made it so when age restriction is Not Applicable, the Unknowns field disables

* Don't show an empty menu when user has no permissions

* Fixed deleting a library with relation causing library deleting to fail

* Consolidated some includes code into one method for Series Repo

* Small fixes
This commit is contained in:
Joe Milazzo 2022-10-19 17:48:52 -07:00 committed by GitHub
parent ef662d3235
commit 26d32cbf28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 252 additions and 100 deletions

View file

@ -31,6 +31,12 @@ export class CardActionablesComponent implements OnInit {
if (!user) return;
this.isAdmin = this.accountService.hasAdminRole(user);
this.canDownload = this.accountService.hasDownloadRole(user);
// We want to avoid an empty menu when user doesn't have access to anything
const validActions = this.actions.filter(a => a.children.length > 0 || a.dynamicList);
if (!this.isAdmin && validActions.filter(a => !a.requiresAdmin).length === 0) {
this.actions = [];
}
this.cdRef.markForCheck();
});
}

View file

@ -56,6 +56,11 @@ export class RestrictionSelectorComponent implements OnInit, OnChanges {
ageRating: parseInt(e, 10),
includeUnknowns: this.restrictionForm?.get('ageRestrictionIncludeUnknowns')?.value
});
if (parseInt(e, 10) === AgeRating.NotApplicable) {
this.restrictionForm!.get('ageRestrictionIncludeUnknowns')?.disable();
} else {
this.restrictionForm!.get('ageRestrictionIncludeUnknowns')?.enable();
}
});
this.restrictionForm.get('ageRestrictionIncludeUnknowns')?.valueChanges.subscribe(e => {

View file

@ -12,7 +12,7 @@
<link rel="shortcut icon" href="assets/icons/favicon.ico">
<meta name="msapplication-TileColor" content="#4ac694">
<meta name="msapplication-config" content="assets/icons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<meta name="theme-color" content="#000000">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">