Various bug fixes (#3667)
This commit is contained in:
parent
a1d3aef39b
commit
1ad8a360cb
17 changed files with 73 additions and 32 deletions
|
|
@ -535,7 +535,7 @@
|
|||
<div class="mb-3">
|
||||
<app-setting-item [title]="t('date-added-label')" [toggleOnViewClick]="false" [showEdit]="false">
|
||||
<ng-template #view>
|
||||
{{chapter.createdUtc | utcToLocalTime | translocoDate: {dateStyle: 'short', timeStyle: 'short' } | defaultDate}}
|
||||
{{chapter.createdUtc | utcToLocalTime:'short' | defaultDate}}
|
||||
</ng-template>
|
||||
</app-setting-item>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -197,7 +197,12 @@ export class EditChapterModalComponent implements OnInit {
|
|||
this.editForm.addControl('language', new FormControl(this.chapter.language, []));
|
||||
this.editForm.addControl('isbn', new FormControl(this.chapter.isbn, []));
|
||||
this.editForm.addControl('ageRating', new FormControl(this.chapter.ageRating, []));
|
||||
this.editForm.addControl('releaseDate', new FormControl(this.chapter.releaseDate, []));
|
||||
|
||||
if (this.chapter.releaseDate !== '0001-01-01T00:00:00') {
|
||||
this.editForm.addControl('releaseDate', new FormControl(this.chapter.releaseDate.substring(0, 10), []));
|
||||
} else {
|
||||
this.editForm.addControl('releaseDate', new FormControl('', []));
|
||||
}
|
||||
|
||||
|
||||
this.editForm.addControl('genres', new FormControl(this.chapter.genres, []));
|
||||
|
|
@ -261,7 +266,11 @@ export class EditChapterModalComponent implements OnInit {
|
|||
const model = this.editForm.value;
|
||||
const selectedIndex = this.editForm.get('coverImageIndex')?.value || 0;
|
||||
|
||||
this.chapter.releaseDate = model.releaseDate;
|
||||
if (model.releaseDate === '') {
|
||||
this.chapter.releaseDate = '0001-01-01T00:00:00';
|
||||
} else {
|
||||
this.chapter.releaseDate = model.releaseDate + 'T00:00:00';
|
||||
}
|
||||
this.chapter.ageRating = parseInt(model.ageRating + '', 10) as AgeRating;
|
||||
this.chapter.genres = model.genres;
|
||||
this.chapter.tags = model.tags;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
<div class="mb-3">
|
||||
<app-setting-item [title]="t('date-added-label')" [toggleOnViewClick]="false" [showEdit]="false">
|
||||
<ng-template #view>
|
||||
{{volume.createdUtc | utcToLocalTime | translocoDate: {dateStyle: 'short', timeStyle: 'short' } | defaultDate}}
|
||||
{{volume.createdUtc | utcToLocalTime:'short' | defaultDate}}
|
||||
</ng-template>
|
||||
</app-setting-item>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<app-setting-item [title]="t('edit-collection-tags.last-sync-title')" [showEdit]="false" [canEdit]="false"
|
||||
[subtitle]="t('edit-collection-tags.last-sync-tooltip')">
|
||||
<ng-template #view>
|
||||
{{collection.lastSyncUtc | utcToLocalTime | date:'shortDate' | defaultDate}}
|
||||
{{collection.lastSyncUtc | utcToLocalTime:'shortDate' | defaultDate}}
|
||||
</ng-template>
|
||||
</app-setting-item>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue