diff options
Diffstat (limited to 'client/src/app/core')
-rw-r--r-- | client/src/app/core/menu/menu.component.html | 5 | ||||
-rw-r--r-- | client/src/app/core/server/server.service.ts | 14 |
2 files changed, 18 insertions, 1 deletions
diff --git a/client/src/app/core/menu/menu.component.html b/client/src/app/core/menu/menu.component.html index 2d8aace54..fcde23fdd 100644 --- a/client/src/app/core/menu/menu.component.html +++ b/client/src/app/core/menu/menu.component.html | |||
@@ -23,6 +23,11 @@ | |||
23 | <span class="hidden-xs glyphicon glyphicon-user"></span> | 23 | <span class="hidden-xs glyphicon glyphicon-user"></span> |
24 | My account | 24 | My account |
25 | </a> | 25 | </a> |
26 | |||
27 | <a *ngIf="isLoggedIn" routerLink="/videos/mine" routerLinkActive="active"> | ||
28 | <span class="hidden-xs glyphicon glyphicon-folder-open"></span> | ||
29 | My videos | ||
30 | </a> | ||
26 | </div> | 31 | </div> |
27 | 32 | ||
28 | <div class="panel-block"> | 33 | <div class="panel-block"> |
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts index ae507afce..cbc4074c9 100644 --- a/client/src/app/core/server/server.service.ts +++ b/client/src/app/core/server/server.service.ts | |||
@@ -19,6 +19,7 @@ export class ServerService { | |||
19 | private videoCategories: Array<{ id: number, label: string }> = [] | 19 | private videoCategories: Array<{ id: number, label: string }> = [] |
20 | private videoLicences: Array<{ id: number, label: string }> = [] | 20 | private videoLicences: Array<{ id: number, label: string }> = [] |
21 | private videoLanguages: Array<{ id: number, label: string }> = [] | 21 | private videoLanguages: Array<{ id: number, label: string }> = [] |
22 | private videoPrivacies: Array<{ id: number, label: string }> = [] | ||
22 | 23 | ||
23 | constructor (private http: HttpClient) {} | 24 | constructor (private http: HttpClient) {} |
24 | 25 | ||
@@ -39,6 +40,10 @@ export class ServerService { | |||
39 | return this.loadVideoAttributeEnum('languages', this.videoLanguages) | 40 | return this.loadVideoAttributeEnum('languages', this.videoLanguages) |
40 | } | 41 | } |
41 | 42 | ||
43 | loadVideoPrivacies () { | ||
44 | return this.loadVideoAttributeEnum('privacies', this.videoPrivacies) | ||
45 | } | ||
46 | |||
42 | getConfig () { | 47 | getConfig () { |
43 | return this.config | 48 | return this.config |
44 | } | 49 | } |
@@ -55,7 +60,14 @@ export class ServerService { | |||
55 | return this.videoLanguages | 60 | return this.videoLanguages |
56 | } | 61 | } |
57 | 62 | ||
58 | private loadVideoAttributeEnum (attributeName: 'categories' | 'licences' | 'languages', hashToPopulate: { id: number, label: string }[]) { | 63 | getVideoPrivacies () { |
64 | return this.videoPrivacies | ||
65 | } | ||
66 | |||
67 | private loadVideoAttributeEnum ( | ||
68 | attributeName: 'categories' | 'licences' | 'languages' | 'privacies', | ||
69 | hashToPopulate: { id: number, label: string }[] | ||
70 | ) { | ||
59 | return this.http.get(ServerService.BASE_VIDEO_URL + attributeName) | 71 | return this.http.get(ServerService.BASE_VIDEO_URL + attributeName) |
60 | .subscribe(data => { | 72 | .subscribe(data => { |
61 | Object.keys(data) | 73 | Object.keys(data) |