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:
parent
ef662d3235
commit
26d32cbf28
9 changed files with 252 additions and 100 deletions
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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 => {
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue