F: season page, addd more episodes view modes + various fixes
This commit is contained in:
1 parent
8f0e9f44a5
commit
59f5d70f09
13 files changed
+467
-147
No files matched your search
@@ -45,27 +45,29 @@ export class SeenModalComponent implements OnInit {
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
if (this.data.title) {
|
||||
this.title = this.data.title;
|
||||
}
|
||||
if (this.data) {
|
||||
if (this.data.title) {
|
||||
this.title = this.data.title;
|
||||
}
|
||||
|
||||
if (this.data.watchedWith)
|
||||
this.watchedWith = this.data.watchedWith.split(', ').join('\n');
|
||||
if (this.data.watchedWith)
|
||||
this.watchedWith = this.data.watchedWith.split(', ').join('\n');
|
||||
|
||||
if (this.data.hideSeenWith) {
|
||||
this.hideSeenWith = this.data.hideSeenWith;
|
||||
}
|
||||
if (this.data.hideSeenWith) {
|
||||
this.hideSeenWith = this.data.hideSeenWith;
|
||||
}
|
||||
|
||||
// ? no initial data was passed: populate date field with current date
|
||||
if (!this.data.watchDate) {
|
||||
this.watchDate = formatDate(new Date(), 'yyyy-MM-dd', 'en-US');
|
||||
// ? no initial data was passed: populate date field with current date
|
||||
if (this.data.watchDate) {
|
||||
// ? if data is passed, populate fields
|
||||
this.watchDate = formatDate(
|
||||
new Date(this.data.watchDate),
|
||||
'yyyy-MM-dd',
|
||||
'en-US'
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// ? if data is passed, populate fields
|
||||
this.watchDate = formatDate(
|
||||
new Date(this.data.watchDate),
|
||||
'yyyy-MM-dd',
|
||||
'en-US'
|
||||
);
|
||||
this.watchDate = formatDate(new Date(), 'yyyy-MM-dd', 'en-US');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user