File Created Date (#1434)

* Capture date when Kavita creates a MangaFile so we can show the date on the UI.

* On startup, exit early for migration directory if it's a fresh install and we have migrations to run but no settings stored yet.

* Blur summaries should apply when there isn't any read more collapsable

* Fixed custom theme files not loading.

* Cleaned up the logic for displaying the manga file date
This commit is contained in:
Joseph Milazzo 2022-08-14 09:35:02 -05:00 committed by GitHub
parent 79b8df1112
commit 7a026e9497
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 1653 additions and 6 deletions

View file

@ -5,4 +5,5 @@ export interface MangaFile {
filePath: string;
pages: number;
format: MangaFormat;
created: string;
}

View file

@ -143,7 +143,15 @@
Pages: {{file.pages | number:''}}
</div>
<div class="col" *ngIf="data.hasOwnProperty('created')">
Added: {{(data.created | date: 'short') || '-'}}
Added:
<!-- TODO: This data.created can be removed after v0.5.5 release -->
<ng-container *ngIf="file.created == '0001-01-01T00:00:00'; else fileDate">
{{(data.created | date: 'short') || '-'}}
</ng-container>
<ng-template #fileDate>
{{(file.created | date: 'short') || '-'}}
</ng-template>
</div>
</div>
</li>

View file

@ -1,12 +1,11 @@
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
import { ToastrService } from 'ngx-toastr';
import { finalize, map, Observable, Subject, take, takeWhile, takeUntil } from 'rxjs';
import { map, Observable, Subject, takeUntil } from 'rxjs';
import { Download } from 'src/app/shared/_models/download';
import { DownloadEvent, DownloadService } from 'src/app/shared/_services/download.service';
import { UtilityService } from 'src/app/shared/_services/utility.service';
import { Chapter } from 'src/app/_models/chapter';
import { LibraryType } from 'src/app/_models/library';
import { Series } from 'src/app/_models/series';
import { RelationKind } from 'src/app/_models/series-detail/relation-kind';
import { Volume } from 'src/app/_models/volume';
import { Action, ActionItem } from 'src/app/_services/action-factory.service';

View file

@ -30,10 +30,11 @@ export class ReadMoreComponent implements OnChanges {
this.isCollapsed = !this.isCollapsed;
this.determineView();
}
determineView() {
if (!this.text || this.text.length <= this.maxLength) {
this.currentText = this.text;
this.isCollapsed = false;
this.isCollapsed = true;
this.hideToggle = true;
return;
}