Polish for Release (#2314)

This commit is contained in:
Joe Milazzo 2023-10-15 13:39:11 -05:00 committed by GitHub
parent fe4af4b648
commit 59b950c4bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
54 changed files with 1162 additions and 1056 deletions

View file

@ -430,10 +430,10 @@
<div>
<div class="row g-0">
<div class="col">
{{t('added-title')}} {{volume.createdUtc | translocoDate: {dateStyle: 'short' } | defaultDate}}
{{t('added-title')}} {{volume.createdUtc | utcToLocalTime | defaultDate}}
</div>
<div class="col">
{{t('last-modified-title')}} {{volume.lastModifiedUtc | translocoDate: {dateStyle: 'short' } | defaultDate}}
{{t('last-modified-title')}} {{volume.lastModifiedUtc | utcToLocalTime | translocoDate: {dateStyle: 'short' } | defaultDate}}
</div>
</div>
<div class="row g-0">

View file

@ -53,7 +53,7 @@ import {ImageComponent} from "../../../shared/image/image.component";
import {DefaultValuePipe} from "../../../pipe/default-value.pipe";
import {TranslocoModule} from "@ngneat/transloco";
import {TranslocoDatePipe} from "@ngneat/transloco-locale";
import {Volume} from "../../../_models/volume";
import {UtcToLocalTimePipe} from "../../../pipe/utc-to-local-time.pipe";
enum TabID {
General = 0,
@ -68,32 +68,32 @@ enum TabID {
@Component({
selector: 'app-edit-series-modal',
standalone: true,
imports: [
ReactiveFormsModule,
NgbNav,
NgbNavContent,
NgbNavItem,
NgbNavLink,
CommonModule,
TypeaheadComponent,
CoverImageChooserComponent,
EditSeriesRelationComponent,
SentenceCasePipe,
MangaFormatPipe,
DefaultDatePipe,
TimeAgoPipe,
TagBadgeComponent,
PublicationStatusPipe,
NgbTooltip,
BytesPipe,
ImageComponent,
NgbCollapse,
NgbNavOutlet,
DefaultValuePipe,
TranslocoModule,
TranslocoDatePipe,
],
imports: [
ReactiveFormsModule,
NgbNav,
NgbNavContent,
NgbNavItem,
NgbNavLink,
CommonModule,
TypeaheadComponent,
CoverImageChooserComponent,
EditSeriesRelationComponent,
SentenceCasePipe,
MangaFormatPipe,
DefaultDatePipe,
TimeAgoPipe,
TagBadgeComponent,
PublicationStatusPipe,
NgbTooltip,
BytesPipe,
ImageComponent,
NgbCollapse,
NgbNavOutlet,
DefaultValuePipe,
TranslocoModule,
TranslocoDatePipe,
UtcToLocalTimePipe,
],
templateUrl: './edit-series-modal.component.html',
styleUrls: ['./edit-series-modal.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush

View file

@ -1,6 +1,6 @@
<ng-container *transloco="let t; read: 'bulk-operations'">
<ng-container *ngIf="bulkSelectionService.selections$ | async as selectionCount">
<div *ngIf="selectionCount > 0" class="bulk-select mb-3 fixed-top" [ngStyle]="{'margin-top': topOffset + 'px'}">
<div *ngIf="selectionCount > 0" class="bulk-select mb-3 {{modalMode ? '' : 'fixed-top}}" [ngStyle]="{'margin-top': topOffset + 'px'}">
<div class="d-flex justify-content-around align-items-center">
<span class="highlight">

View file

@ -32,19 +32,23 @@ import {CardActionablesComponent} from "../../_single-module/card-actionables/ca
export class BulkOperationsComponent implements OnInit {
@Input({required: true}) actionCallback!: (action: ActionItem<any>, data: any) => void;
topOffset: number = 56;
/**
* Modal mode means don't fix to the top
*/
@Input() modalMode = false;
@Input() topOffset: number = 56;
hasMarkAsRead: boolean = false;
hasMarkAsUnread: boolean = false;
actions: Array<ActionItem<any>> = [];
private readonly destroyRef = inject(DestroyRef);
private readonly cdRef = inject(ChangeDetectorRef);
private readonly actionFactoryService = inject(ActionFactoryService);
public readonly bulkSelectionService = inject(BulkSelectionService);
get Action() {
return Action;
}
protected readonly Action = Action;
constructor(public bulkSelectionService: BulkSelectionService, private readonly cdRef: ChangeDetectorRef,
private actionFactoryService: ActionFactoryService) { }
constructor() { }
ngOnInit(): void {
this.bulkSelectionService.actions$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(actions => {

View file

@ -1,16 +1,16 @@
import { Injectable } from '@angular/core';
import { NavigationStart, Router } from '@angular/router';
import { ReplaySubject } from 'rxjs';
import { filter } from 'rxjs/operators';
import { Action, ActionFactoryService, ActionItem } from '../_services/action-factory.service';
import {Injectable} from '@angular/core';
import {NavigationStart, Router} from '@angular/router';
import {ReplaySubject} from 'rxjs';
import {filter} from 'rxjs/operators';
import {Action, ActionFactoryService, ActionItem} from '../_services/action-factory.service';
type DataSource = 'volume' | 'chapter' | 'special' | 'series' | 'bookmark';
type DataSource = 'volume' | 'chapter' | 'special' | 'series' | 'bookmark' | 'sideNavStream';
/**
* Responsible for handling selections on cards. Can handle multiple card sources next to each other in different loops.
* This will clear selections between pages.
*
* Remakrs: Page which renders cards is responsible for listening for shift keydown/keyup and updating our state variable.
* Remarks: Page which renders cards is responsible for listening for shift keydown/keyup and updating our state variable.
*/
@Injectable({
providedIn: 'root'
@ -151,6 +151,10 @@ export class BulkSelectionService {
return this.actionFactory.getBookmarkActions(callback);
}
if (Object.keys(this.selectedCards).filter(item => item === 'sideNavStream').length > 0) {
return this.applyFilterToList(this.actionFactory.getSideNavStreamActions(callback), [Action.MarkAsInvisible, Action.MarkAsVisible]);
}
return this.applyFilterToList(this.actionFactory.getVolumeActions(callback), allowedActions);
}

View file

@ -64,7 +64,7 @@
<div class="vr d-none d-lg-block m-2"></div>
<div class="col-auto">
<app-icon-and-title [label]="t('date-added-title')" [clickable]="false" fontClasses="fa-solid fa-file-import" [title]="t('date-added-title')">
{{chapter.createdUtc | translocoDate: {dateStyle: 'short', timeStyle: 'short' } | defaultDate}}
{{chapter.createdUtc | utcToLocalTime | translocoDate: {dateStyle: 'short', timeStyle: 'short' } | defaultDate}}
</app-icon-and-title>
</div>
</ng-container>

View file

@ -28,11 +28,12 @@ import {MetadataDetailComponent} from "../../series-detail/_components/metadata-
import {TranslocoModule} from "@ngneat/transloco";
import {TranslocoLocaleModule} from "@ngneat/transloco-locale";
import {FilterField} from "../../_models/metadata/v2/filter-field";
import {UtcToLocalTimePipe} from "../../pipe/utc-to-local-time.pipe";
@Component({
selector: 'app-entity-info-cards',
standalone: true,
imports: [CommonModule, IconAndTitleComponent, SafeHtmlPipe, DefaultDatePipe, BytesPipe, CompactNumberPipe, AgeRatingPipe, NgbTooltip, MetadataDetailComponent, TranslocoModule, CompactNumberPipe, TranslocoLocaleModule],
imports: [CommonModule, IconAndTitleComponent, SafeHtmlPipe, DefaultDatePipe, BytesPipe, CompactNumberPipe, AgeRatingPipe, NgbTooltip, MetadataDetailComponent, TranslocoModule, CompactNumberPipe, TranslocoLocaleModule, UtcToLocalTimePipe],
templateUrl: './entity-info-cards.component.html',
styleUrls: ['./entity-info-cards.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush