From feb4bdfd9b46e87aadfa7c0d5338cde887d1f58c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sun, 11 Dec 2016 21:50:51 +0100 Subject: First version with PostgreSQL --- client/src/app/videos/shared/sort-field.type.ts | 2 +- client/src/app/videos/shared/video.model.ts | 6 +++--- client/src/app/videos/video-list/video-list.component.ts | 2 +- client/src/app/videos/video-list/video-miniature.component.html | 2 +- client/src/app/videos/video-list/video-miniature.component.scss | 2 +- client/src/app/videos/video-list/video-sort.component.ts | 4 ++-- client/src/app/videos/video-watch/video-watch.component.html | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) (limited to 'client/src/app/videos') diff --git a/client/src/app/videos/shared/sort-field.type.ts b/client/src/app/videos/shared/sort-field.type.ts index 6e8cc7936..74908e344 100644 --- a/client/src/app/videos/shared/sort-field.type.ts +++ b/client/src/app/videos/shared/sort-field.type.ts @@ -1,3 +1,3 @@ export type SortField = "name" | "-name" | "duration" | "-duration" - | "createdDate" | "-createdDate"; + | "createdAt" | "-createdAt"; diff --git a/client/src/app/videos/shared/video.model.ts b/client/src/app/videos/shared/video.model.ts index b51a0e9de..fae001d78 100644 --- a/client/src/app/videos/shared/video.model.ts +++ b/client/src/app/videos/shared/video.model.ts @@ -1,7 +1,7 @@ export class Video { author: string; by: string; - createdDate: Date; + createdAt: Date; description: string; duration: string; id: string; @@ -27,7 +27,7 @@ export class Video { constructor(hash: { author: string, - createdDate: string, + createdAt: string, description: string, duration: number; id: string, @@ -39,7 +39,7 @@ export class Video { thumbnailPath: string }) { this.author = hash.author; - this.createdDate = new Date(hash.createdDate); + this.createdAt = new Date(hash.createdAt); this.description = hash.description; this.duration = Video.createDurationString(hash.duration); this.id = hash.id; diff --git a/client/src/app/videos/video-list/video-list.component.ts b/client/src/app/videos/video-list/video-list.component.ts index a8b92480b..6c42ba5be 100644 --- a/client/src/app/videos/video-list/video-list.component.ts +++ b/client/src/app/videos/video-list/video-list.component.ts @@ -145,7 +145,7 @@ export class VideoListComponent implements OnInit, OnDestroy { }; } - this.sort = routeParams['sort'] || '-createdDate'; + this.sort = routeParams['sort'] || '-createdAt'; if (routeParams['page'] !== undefined) { this.pagination.currentPage = parseInt(routeParams['page']); diff --git a/client/src/app/videos/video-list/video-miniature.component.html b/client/src/app/videos/video-list/video-miniature.component.html index 16513902b..f2f4a53a9 100644 --- a/client/src/app/videos/video-list/video-miniature.component.html +++ b/client/src/app/videos/video-list/video-miniature.component.html @@ -23,6 +23,6 @@ {{ video.by }} - {{ video.createdDate | date:'short' }} + {{ video.createdAt | date:'short' }} diff --git a/client/src/app/videos/video-list/video-miniature.component.scss b/client/src/app/videos/video-list/video-miniature.component.scss index 6b3fa3bf0..d70b1b50d 100644 --- a/client/src/app/videos/video-list/video-miniature.component.scss +++ b/client/src/app/videos/video-list/video-miniature.component.scss @@ -79,7 +79,7 @@ } } - .video-miniature-author, .video-miniature-created-date { + .video-miniature-author, .video-miniature-created-at { display: block; margin-left: 1px; font-size: 12px; diff --git a/client/src/app/videos/video-list/video-sort.component.ts b/client/src/app/videos/video-list/video-sort.component.ts index ca94b07c2..53951deb4 100644 --- a/client/src/app/videos/video-list/video-sort.component.ts +++ b/client/src/app/videos/video-list/video-sort.component.ts @@ -17,8 +17,8 @@ export class VideoSortComponent { '-name': 'Name - Desc', 'duration': 'Duration - Asc', '-duration': 'Duration - Desc', - 'createdDate': 'Created Date - Asc', - '-createdDate': 'Created Date - Desc' + 'createdAt': 'Created Date - Asc', + '-createdAt': 'Created Date - Desc' }; get choiceKeys() { diff --git a/client/src/app/videos/video-watch/video-watch.component.html b/client/src/app/videos/video-watch/video-watch.component.html index 0f0fa68cc..a726ef3ff 100644 --- a/client/src/app/videos/video-watch/video-watch.component.html +++ b/client/src/app/videos/video-watch/video-watch.component.html @@ -47,7 +47,7 @@ {{ video.by }} - on {{ video.createdDate | date:'short' }} + on {{ video.createdAt | date:'short' }} -- cgit v1.2.3