Angular 14 (#1420)
* Updated to Angular 14 * Fixed all new tslint issues * Fixed a routing bug for Angular 14 * Updated ngBootstrap and bootstrap. Fixed side nav item not highlighting on route change * Refactored how default dark styles are done * Migrated everything to a typed form * Bump versions by dotnet-bump-version. * Fixed a regression where click areas need an explicit z-index * Cleanup some css * Bumped docnet back to the alpha which has our downstream fixes * Updated dependencies to later versions. Mainly just NetVips with some archive fixes. * Fixed broken unit tests (due to some fixes in SharpCompress that changed byte arrays, but not visible quality)
This commit is contained in:
parent
01e874150e
commit
b38a26f92b
71 changed files with 4638 additions and 835 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Input, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||
import { FormGroup, FormControl } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormControl } from '@angular/forms';
|
||||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { ToastrService } from 'ngx-toastr';
|
||||
import { CollectionTag } from 'src/app/_models/collection-tag';
|
||||
|
|
@ -26,7 +26,7 @@ export class BulkAddToCollectionComponent implements OnInit {
|
|||
*/
|
||||
lists: Array<CollectionTag> = [];
|
||||
loading: boolean = false;
|
||||
listForm: FormGroup = new FormGroup({});
|
||||
listForm: UntypedFormGroup = new UntypedFormGroup({});
|
||||
|
||||
collectionTitleTrackby = (index: number, item: CollectionTag) => `${item.title}`;
|
||||
|
||||
|
|
@ -38,8 +38,8 @@ export class BulkAddToCollectionComponent implements OnInit {
|
|||
|
||||
ngOnInit(): void {
|
||||
|
||||
this.listForm.addControl('title', new FormControl(this.title, []));
|
||||
this.listForm.addControl('filterQuery', new FormControl('', []));
|
||||
this.listForm.addControl('title', new UntypedFormControl(this.title, []));
|
||||
this.listForm.addControl('filterQuery', new UntypedFormControl('', []));
|
||||
|
||||
this.loading = true;
|
||||
this.cdRef.markForCheck();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="modal-basic-title">Edit {{tag?.title}} Collection</h4>
|
||||
<h4 class="modal-title" id="modal-basic-title">Edit {{tag.title}} Collection</h4>
|
||||
<button type="button" class="btn-close" aria-label="Close" (click)="close()"></button>
|
||||
</div>
|
||||
<div class="modal-body {{utilityService.getActiveBreakpoint() === Breakpoint.Mobile ? '' : 'd-flex'}}">
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
<a ngbNavLink>{{tabs[TabID.General].title}}</a>
|
||||
<ng-template ngbNavContent>
|
||||
<p class="alert alert-secondary" role="alert">
|
||||
This tag is currently {{tag?.promoted ? 'promoted' : 'not promoted'}} (<i class="fa fa-angle-double-up" aria-hidden="true"></i>).
|
||||
This tag is currently {{tag.promoted ? 'promoted' : 'not promoted'}} (<i class="fa fa-angle-double-up" aria-hidden="true"></i>).
|
||||
Promotion means that the tag can be seen server-wide, not just for admin users. All series that have this tag will still have user-access restrictions placed on them.
|
||||
</p>
|
||||
<form [formGroup]="collectionTagForm">
|
||||
|
|
@ -65,6 +65,6 @@
|
|||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" (click)="close()">Cancel</button>
|
||||
<button type="button" class="btn btn-secondary alt" (click)="togglePromotion()">{{tag?.promoted ? 'Demote' : 'Promote'}}</button>
|
||||
<button type="button" class="btn btn-secondary alt" (click)="togglePromotion()">{{tag.promoted ? 'Demote' : 'Promote'}}</button>
|
||||
<button type="button" class="btn btn-primary" (click)="save()">Save</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit } from '@angular/core';
|
||||
import { FormControl, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormControl, UntypedFormGroup } from '@angular/forms';
|
||||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { ToastrService } from 'ngx-toastr';
|
||||
import { forkJoin } from 'rxjs';
|
||||
|
|
@ -37,7 +37,7 @@ export class EditCollectionTagsComponent implements OnInit {
|
|||
pagination!: Pagination;
|
||||
selectAll: boolean = true;
|
||||
libraryNames!: any;
|
||||
collectionTagForm!: FormGroup;
|
||||
collectionTagForm!: UntypedFormGroup;
|
||||
tabs = [{title: 'General', id: TabID.General}, {title: 'Cover Image', id: TabID.CoverImage}];
|
||||
active = TabID.General;
|
||||
imageUrls: Array<string> = [];
|
||||
|
|
@ -65,10 +65,10 @@ export class EditCollectionTagsComponent implements OnInit {
|
|||
if (this.pagination == undefined) {
|
||||
this.pagination = {totalPages: 1, totalItems: 200, itemsPerPage: 200, currentPage: 0};
|
||||
}
|
||||
this.collectionTagForm = new FormGroup({
|
||||
summary: new FormControl(this.tag.summary, []),
|
||||
coverImageLocked: new FormControl(this.tag.coverImageLocked, []),
|
||||
coverImageIndex: new FormControl(0, []),
|
||||
this.collectionTagForm = new UntypedFormGroup({
|
||||
summary: new UntypedFormControl(this.tag.summary, []),
|
||||
coverImageLocked: new UntypedFormControl(this.tag.coverImageLocked, []),
|
||||
coverImageIndex: new UntypedFormControl(0, []),
|
||||
|
||||
});
|
||||
this.imageUrls.push(this.imageService.randomize(this.imageService.getCollectionCoverImage(this.tag.id)));
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
<div class="row g-0" *ngIf="metadata">
|
||||
<div class="mb-3" style="width: 100%">
|
||||
<label for="summary" class="form-label">Summary</label>
|
||||
<div class="input-group {{metadata?.summaryLocked ? 'lock-active' : ''}}">
|
||||
<div class="input-group {{metadata.summaryLocked ? 'lock-active' : ''}}">
|
||||
<ng-container [ngTemplateOutlet]="lock" [ngTemplateOutletContext]="{ item: metadata, field: 'summaryLocked' }"></ng-container>
|
||||
<textarea id="summary" class="form-control" formControlName="summary" rows="4"></textarea>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue