aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/app/admin/friends/friend-list/friend-list.component.html2
-rw-r--r--client/src/app/admin/friends/shared/friend.model.ts2
-rw-r--r--client/src/app/admin/requests/request-stats/request-stats.component.html2
-rw-r--r--client/src/app/admin/requests/request-stats/request-stats.component.ts2
-rw-r--r--client/src/app/admin/requests/shared/request-stats.model.ts6
-rw-r--r--client/src/app/admin/users/user-list/user-list.component.html2
-rw-r--r--client/src/app/shared/auth/auth-user.model.ts9
-rw-r--r--client/src/app/shared/search/search-field.type.ts2
-rw-r--r--client/src/app/shared/search/search.component.ts4
-rw-r--r--client/src/app/shared/users/user.model.ts10
-rw-r--r--client/src/app/videos/shared/sort-field.type.ts2
-rw-r--r--client/src/app/videos/shared/video.model.ts6
-rw-r--r--client/src/app/videos/video-list/video-list.component.ts2
-rw-r--r--client/src/app/videos/video-list/video-miniature.component.html2
-rw-r--r--client/src/app/videos/video-list/video-miniature.component.scss2
-rw-r--r--client/src/app/videos/video-list/video-sort.component.ts4
-rw-r--r--client/src/app/videos/video-watch/video-watch.component.html2
17 files changed, 29 insertions, 32 deletions
diff --git a/client/src/app/admin/friends/friend-list/friend-list.component.html b/client/src/app/admin/friends/friend-list/friend-list.component.html
index 4236fc5f6..06258f8c8 100644
--- a/client/src/app/admin/friends/friend-list/friend-list.component.html
+++ b/client/src/app/admin/friends/friend-list/friend-list.component.html
@@ -15,7 +15,7 @@
15 <td>{{ friend.id }}</td> 15 <td>{{ friend.id }}</td>
16 <td>{{ friend.host }}</td> 16 <td>{{ friend.host }}</td>
17 <td>{{ friend.score }}</td> 17 <td>{{ friend.score }}</td>
18 <td>{{ friend.createdDate | date: 'medium' }}</td> 18 <td>{{ friend.createdAt | date: 'medium' }}</td>
19 </tr> 19 </tr>
20 </tbody> 20 </tbody>
21</table> 21</table>
diff --git a/client/src/app/admin/friends/shared/friend.model.ts b/client/src/app/admin/friends/shared/friend.model.ts
index 3c23feebc..462cc82ed 100644
--- a/client/src/app/admin/friends/shared/friend.model.ts
+++ b/client/src/app/admin/friends/shared/friend.model.ts
@@ -2,5 +2,5 @@ export interface Friend {
2 id: string; 2 id: string;
3 host: string; 3 host: string;
4 score: number; 4 score: number;
5 createdDate: Date; 5 createdAt: Date;
6} 6}
diff --git a/client/src/app/admin/requests/request-stats/request-stats.component.html b/client/src/app/admin/requests/request-stats/request-stats.component.html
index b5ac59a9a..6698eac48 100644
--- a/client/src/app/admin/requests/request-stats/request-stats.component.html
+++ b/client/src/app/admin/requests/request-stats/request-stats.component.html
@@ -18,6 +18,6 @@
18 18
19 <div> 19 <div>
20 <span class="label-description">Remaining requests:</span> 20 <span class="label-description">Remaining requests:</span>
21 {{ stats.requests.length }} 21 {{ stats.totalRequests }}
22 </div> 22 </div>
23</div> 23</div>
diff --git a/client/src/app/admin/requests/request-stats/request-stats.component.ts b/client/src/app/admin/requests/request-stats/request-stats.component.ts
index d20b12199..9e2af219c 100644
--- a/client/src/app/admin/requests/request-stats/request-stats.component.ts
+++ b/client/src/app/admin/requests/request-stats/request-stats.component.ts
@@ -19,7 +19,7 @@ export class RequestStatsComponent implements OnInit, OnDestroy {
19 } 19 }
20 20
21 ngOnDestroy() { 21 ngOnDestroy() {
22 if (this.stats.secondsInterval !== null) { 22 if (this.stats !== null && this.stats.secondsInterval !== null) {
23 clearInterval(this.interval); 23 clearInterval(this.interval);
24 } 24 }
25 } 25 }
diff --git a/client/src/app/admin/requests/shared/request-stats.model.ts b/client/src/app/admin/requests/shared/request-stats.model.ts
index 766e80836..49ecbc79e 100644
--- a/client/src/app/admin/requests/shared/request-stats.model.ts
+++ b/client/src/app/admin/requests/shared/request-stats.model.ts
@@ -7,18 +7,18 @@ export class RequestStats {
7 maxRequestsInParallel: number; 7 maxRequestsInParallel: number;
8 milliSecondsInterval: number; 8 milliSecondsInterval: number;
9 remainingMilliSeconds: number; 9 remainingMilliSeconds: number;
10 requests: Request[]; 10 totalRequests: number;
11 11
12 constructor(hash: { 12 constructor(hash: {
13 maxRequestsInParallel: number, 13 maxRequestsInParallel: number,
14 milliSecondsInterval: number, 14 milliSecondsInterval: number,
15 remainingMilliSeconds: number, 15 remainingMilliSeconds: number,
16 requests: Request[]; 16 totalRequests: number;
17 }) { 17 }) {
18 this.maxRequestsInParallel = hash.maxRequestsInParallel; 18 this.maxRequestsInParallel = hash.maxRequestsInParallel;
19 this.milliSecondsInterval = hash.milliSecondsInterval; 19 this.milliSecondsInterval = hash.milliSecondsInterval;
20 this.remainingMilliSeconds = hash.remainingMilliSeconds; 20 this.remainingMilliSeconds = hash.remainingMilliSeconds;
21 this.requests = hash.requests; 21 this.totalRequests = hash.totalRequests;
22 } 22 }
23 23
24 get remainingSeconds() { 24 get remainingSeconds() {
diff --git a/client/src/app/admin/users/user-list/user-list.component.html b/client/src/app/admin/users/user-list/user-list.component.html
index 328b1be77..36193d119 100644
--- a/client/src/app/admin/users/user-list/user-list.component.html
+++ b/client/src/app/admin/users/user-list/user-list.component.html
@@ -14,7 +14,7 @@
14 <tr *ngFor="let user of users"> 14 <tr *ngFor="let user of users">
15 <td>{{ user.id }}</td> 15 <td>{{ user.id }}</td>
16 <td>{{ user.username }}</td> 16 <td>{{ user.username }}</td>
17 <td>{{ user.createdDate | date: 'medium' }}</td> 17 <td>{{ user.createdAt | date: 'medium' }}</td>
18 <td class="text-right"> 18 <td class="text-right">
19 <span class="glyphicon glyphicon-remove" *ngIf="!user.isAdmin()" (click)="removeUser(user)"></span> 19 <span class="glyphicon glyphicon-remove" *ngIf="!user.isAdmin()" (click)="removeUser(user)"></span>
20 </td> 20 </td>
diff --git a/client/src/app/shared/auth/auth-user.model.ts b/client/src/app/shared/auth/auth-user.model.ts
index bdd5ea5a9..f560351f4 100644
--- a/client/src/app/shared/auth/auth-user.model.ts
+++ b/client/src/app/shared/auth/auth-user.model.ts
@@ -7,9 +7,6 @@ export class AuthUser extends User {
7 USERNAME: 'username' 7 USERNAME: 'username'
8 }; 8 };
9 9
10 id: string;
11 role: string;
12 username: string;
13 tokens: Tokens; 10 tokens: Tokens;
14 11
15 static load() { 12 static load() {
@@ -17,7 +14,7 @@ export class AuthUser extends User {
17 if (usernameLocalStorage) { 14 if (usernameLocalStorage) {
18 return new AuthUser( 15 return new AuthUser(
19 { 16 {
20 id: localStorage.getItem(this.KEYS.ID), 17 id: parseInt(localStorage.getItem(this.KEYS.ID)),
21 username: localStorage.getItem(this.KEYS.USERNAME), 18 username: localStorage.getItem(this.KEYS.USERNAME),
22 role: localStorage.getItem(this.KEYS.ROLE) 19 role: localStorage.getItem(this.KEYS.ROLE)
23 }, 20 },
@@ -35,7 +32,7 @@ export class AuthUser extends User {
35 Tokens.flush(); 32 Tokens.flush();
36 } 33 }
37 34
38 constructor(userHash: { id: string, username: string, role: string }, hashTokens: any) { 35 constructor(userHash: { id: number, username: string, role: string }, hashTokens: any) {
39 super(userHash); 36 super(userHash);
40 this.tokens = new Tokens(hashTokens); 37 this.tokens = new Tokens(hashTokens);
41 } 38 }
@@ -58,7 +55,7 @@ export class AuthUser extends User {
58 } 55 }
59 56
60 save() { 57 save() {
61 localStorage.setItem(AuthUser.KEYS.ID, this.id); 58 localStorage.setItem(AuthUser.KEYS.ID, this.id.toString());
62 localStorage.setItem(AuthUser.KEYS.USERNAME, this.username); 59 localStorage.setItem(AuthUser.KEYS.USERNAME, this.username);
63 localStorage.setItem(AuthUser.KEYS.ROLE, this.role); 60 localStorage.setItem(AuthUser.KEYS.ROLE, this.role);
64 this.tokens.save(); 61 this.tokens.save();
diff --git a/client/src/app/shared/search/search-field.type.ts b/client/src/app/shared/search/search-field.type.ts
index 5228ee68a..6be584ed1 100644
--- a/client/src/app/shared/search/search-field.type.ts
+++ b/client/src/app/shared/search/search-field.type.ts
@@ -1 +1 @@
export type SearchField = "name" | "author" | "podUrl" | "magnetUri" | "tags"; export type SearchField = "name" | "author" | "host" | "magnetUri" | "tags";
diff --git a/client/src/app/shared/search/search.component.ts b/client/src/app/shared/search/search.component.ts
index b6237469b..9f7e156ec 100644
--- a/client/src/app/shared/search/search.component.ts
+++ b/client/src/app/shared/search/search.component.ts
@@ -14,8 +14,8 @@ export class SearchComponent implements OnInit {
14 fieldChoices = { 14 fieldChoices = {
15 name: 'Name', 15 name: 'Name',
16 author: 'Author', 16 author: 'Author',
17 podUrl: 'Pod Url', 17 host: 'Pod Host',
18 magnetUri: 'Magnet Uri', 18 magnetUri: 'Magnet URI',
19 tags: 'Tags' 19 tags: 'Tags'
20 }; 20 };
21 searchCriterias: Search = { 21 searchCriterias: Search = {
diff --git a/client/src/app/shared/users/user.model.ts b/client/src/app/shared/users/user.model.ts
index 726495d11..52d89e004 100644
--- a/client/src/app/shared/users/user.model.ts
+++ b/client/src/app/shared/users/user.model.ts
@@ -1,16 +1,16 @@
1export class User { 1export class User {
2 id: string; 2 id: number;
3 username: string; 3 username: string;
4 role: string; 4 role: string;
5 createdDate: Date; 5 createdAt: Date;
6 6
7 constructor(hash: { id: string, username: string, role: string, createdDate?: Date }) { 7 constructor(hash: { id: number, username: string, role: string, createdAt?: Date }) {
8 this.id = hash.id; 8 this.id = hash.id;
9 this.username = hash.username; 9 this.username = hash.username;
10 this.role = hash.role; 10 this.role = hash.role;
11 11
12 if (hash.createdDate) { 12 if (hash.createdAt) {
13 this.createdDate = hash.createdDate; 13 this.createdAt = hash.createdAt;
14 } 14 }
15 } 15 }
16 16
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 @@
1export type SortField = "name" | "-name" 1export type SortField = "name" | "-name"
2 | "duration" | "-duration" 2 | "duration" | "-duration"
3 | "createdDate" | "-createdDate"; 3 | "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 @@
1export class Video { 1export class Video {
2 author: string; 2 author: string;
3 by: string; 3 by: string;
4 createdDate: Date; 4 createdAt: Date;
5 description: string; 5 description: string;
6 duration: string; 6 duration: string;
7 id: string; 7 id: string;
@@ -27,7 +27,7 @@ export class Video {
27 27
28 constructor(hash: { 28 constructor(hash: {
29 author: string, 29 author: string,
30 createdDate: string, 30 createdAt: string,
31 description: string, 31 description: string,
32 duration: number; 32 duration: number;
33 id: string, 33 id: string,
@@ -39,7 +39,7 @@ export class Video {
39 thumbnailPath: string 39 thumbnailPath: string
40 }) { 40 }) {
41 this.author = hash.author; 41 this.author = hash.author;
42 this.createdDate = new Date(hash.createdDate); 42 this.createdAt = new Date(hash.createdAt);
43 this.description = hash.description; 43 this.description = hash.description;
44 this.duration = Video.createDurationString(hash.duration); 44 this.duration = Video.createDurationString(hash.duration);
45 this.id = hash.id; 45 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 {
145 }; 145 };
146 } 146 }
147 147
148 this.sort = <SortField>routeParams['sort'] || '-createdDate'; 148 this.sort = <SortField>routeParams['sort'] || '-createdAt';
149 149
150 if (routeParams['page'] !== undefined) { 150 if (routeParams['page'] !== undefined) {
151 this.pagination.currentPage = parseInt(routeParams['page']); 151 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 @@
23 </span> 23 </span>
24 24
25 <a [routerLink]="['/videos/list', { field: 'author', search: video.author, sort: currentSort }]" class="video-miniature-author">{{ video.by }}</a> 25 <a [routerLink]="['/videos/list', { field: 'author', search: video.author, sort: currentSort }]" class="video-miniature-author">{{ video.by }}</a>
26 <span class="video-miniature-created-date">{{ video.createdDate | date:'short' }}</span> 26 <span class="video-miniature-created-at">{{ video.createdAt | date:'short' }}</span>
27 </div> 27 </div>
28</div> 28</div>
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 @@
79 } 79 }
80 } 80 }
81 81
82 .video-miniature-author, .video-miniature-created-date { 82 .video-miniature-author, .video-miniature-created-at {
83 display: block; 83 display: block;
84 margin-left: 1px; 84 margin-left: 1px;
85 font-size: 12px; 85 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 {
17 '-name': 'Name - Desc', 17 '-name': 'Name - Desc',
18 'duration': 'Duration - Asc', 18 'duration': 'Duration - Asc',
19 '-duration': 'Duration - Desc', 19 '-duration': 'Duration - Desc',
20 'createdDate': 'Created Date - Asc', 20 'createdAt': 'Created Date - Asc',
21 '-createdDate': 'Created Date - Desc' 21 '-createdAt': 'Created Date - Desc'
22 }; 22 };
23 23
24 get choiceKeys() { 24 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 @@
47 {{ video.by }} 47 {{ video.by }}
48 </a> 48 </a>
49 </span> 49 </span>
50 <span id="video-date">on {{ video.createdDate | date:'short' }}</span> 50 <span id="video-date">on {{ video.createdAt | date:'short' }}</span>
51 </div> 51 </div>
52 </div> 52 </div>
53 </div> 53 </div>