Release Polishing (#2325)

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
Joe Milazzo 2023-10-18 17:52:54 -05:00 committed by GitHub
parent 2d3a0c1eda
commit 8e85ba069c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 88 additions and 96 deletions

View file

@ -18,7 +18,7 @@ import { ReadingList } from 'src/app/_models/reading-list';
import { CollectionTagService } from 'src/app/_services/collection-tag.service';
import {CommonModule} from "@angular/common";
import {FilterPipe} from "../../../pipe/filter.pipe";
import {TranslocoDirective, TranslocoService} from "@ngneat/transloco";
import {translate, TranslocoDirective, TranslocoService} from "@ngneat/transloco";
@Component({
selector: 'app-bulk-add-to-collection',
@ -46,7 +46,6 @@ export class BulkAddToCollectionComponent implements OnInit, AfterViewInit {
collectionTitleTrackby = (index: number, item: CollectionTag) => `${item.title}`;
translocoService = inject(TranslocoService);
@ViewChild('title') inputElem!: ElementRef<HTMLInputElement>;
@ -83,7 +82,7 @@ export class BulkAddToCollectionComponent implements OnInit, AfterViewInit {
create() {
const tagName = this.listForm.value.title;
this.collectionService.addByMultiple(0, this.seriesIds, tagName).subscribe(() => {
this.toastr.success(this.translocoService.translate('toasts.series-added-to-collection', {collectionName: tagName}));
this.toastr.success(translate('toasts.series-added-to-collection', {collectionName: tagName}));
this.modal.close();
});
}
@ -92,7 +91,7 @@ export class BulkAddToCollectionComponent implements OnInit, AfterViewInit {
if (this.seriesIds.length === 0) return;
this.collectionService.addByMultiple(tag.id, this.seriesIds, '').subscribe(() => {
this.toastr.success(this.translocoService.translate('toasts.series-added-to-collection', {collectionName: tag.title}));
this.toastr.success(translate('toasts.series-added-to-collection', {collectionName: tag.title}));
this.modal.close();
});

View file

@ -33,7 +33,7 @@ import { UploadService } from 'src/app/_services/upload.service';
import {takeUntilDestroyed} from "@angular/core/rxjs-interop";
import {CommonModule} from "@angular/common";
import {CoverImageChooserComponent} from "../../cover-image-chooser/cover-image-chooser.component";
import {TranslocoDirective, TranslocoService} from "@ngneat/transloco";
import {translate, TranslocoDirective, TranslocoService} from "@ngneat/transloco";
enum TabID {
@ -65,7 +65,6 @@ export class EditCollectionTagsComponent implements OnInit {
imageUrls: Array<string> = [];
selectedCover: string = '';
private readonly destroyRef = inject(DestroyRef);
translocoService = inject(TranslocoService);
get hasSomeSelected() {
return this.selections != null && this.selections.hasSomeSelected();
@ -172,7 +171,7 @@ export class EditCollectionTagsComponent implements OnInit {
tag.id = this.tag.id;
if (unselectedIds.length == this.series.length &&
!await this.confirmService.confirm(this.translocoService.translate('toasts.no-series-collection-warning'))) {
!await this.confirmService.confirm(translate('toasts.no-series-collection-warning'))) {
return;
}
@ -187,7 +186,7 @@ export class EditCollectionTagsComponent implements OnInit {
forkJoin(apis).subscribe(() => {
this.modal.close({success: true, coverImageUpdated: selectedIndex > 0});
this.toastr.success(this.translocoService.translate('toasts.collection-updated'));
this.toastr.success(translate('toasts.collection-updated'));
});
}