diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-12-11 17:36:46 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-12 10:58:16 +0100 |
commit | 63c4db6d71b98523753c51747e308682d9a2e8a0 (patch) | |
tree | d26c0d092ce016f2afe56bf71b08ca4698fe673f /client/src/app/shared/video | |
parent | 908f6e5e38e85cc0debab0051b7fa34b13025f96 (diff) | |
download | PeerTube-63c4db6d71b98523753c51747e308682d9a2e8a0.tar.gz PeerTube-63c4db6d71b98523753c51747e308682d9a2e8a0.tar.zst PeerTube-63c4db6d71b98523753c51747e308682d9a2e8a0.zip |
Move to angular cli
Diffstat (limited to 'client/src/app/shared/video')
4 files changed, 12 insertions, 5 deletions
diff --git a/client/src/app/shared/video/video-miniature.component.scss b/client/src/app/shared/video/video-miniature.component.scss index 37e84897b..49ba1e51c 100644 --- a/client/src/app/shared/video/video-miniature.component.scss +++ b/client/src/app/shared/video/video-miniature.component.scss | |||
@@ -1,3 +1,6 @@ | |||
1 | @import '_variables'; | ||
2 | @import '_mixins'; | ||
3 | |||
1 | .video-miniature { | 4 | .video-miniature { |
2 | display: inline-block; | 5 | display: inline-block; |
3 | padding-right: 15px; | 6 | padding-right: 15px; |
diff --git a/client/src/app/shared/video/video-thumbnail.component.scss b/client/src/app/shared/video/video-thumbnail.component.scss index ab4f9bcb1..0fc2df220 100644 --- a/client/src/app/shared/video/video-thumbnail.component.scss +++ b/client/src/app/shared/video/video-thumbnail.component.scss | |||
@@ -1,3 +1,6 @@ | |||
1 | @import '_variables'; | ||
2 | @import '_mixins'; | ||
3 | |||
1 | .video-thumbnail { | 4 | .video-thumbnail { |
2 | display: inline-block; | 5 | display: inline-block; |
3 | position: relative; | 6 | position: relative; |
diff --git a/client/src/app/shared/video/video.model.ts b/client/src/app/shared/video/video.model.ts index d86ef8f92..32c33829d 100644 --- a/client/src/app/shared/video/video.model.ts +++ b/client/src/app/shared/video/video.model.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { Video as VideoServerModel } from '../../../../../shared' | ||
2 | import { User } from '../' | 1 | import { User } from '../' |
2 | import { Video as VideoServerModel } from '../../../../../shared' | ||
3 | import { Account } from '../../../../../shared/models/accounts' | 3 | import { Account } from '../../../../../shared/models/accounts' |
4 | import { environment } from '../../../environments/environment' | ||
4 | 5 | ||
5 | export class Video implements VideoServerModel { | 6 | export class Video implements VideoServerModel { |
6 | accountName: string | 7 | accountName: string |
@@ -48,7 +49,7 @@ export class Video implements VideoServerModel { | |||
48 | } | 49 | } |
49 | 50 | ||
50 | constructor (hash: VideoServerModel) { | 51 | constructor (hash: VideoServerModel) { |
51 | let absoluteAPIUrl = API_URL | 52 | let absoluteAPIUrl = environment.apiUrl |
52 | if (!absoluteAPIUrl) { | 53 | if (!absoluteAPIUrl) { |
53 | // The API is on the same domain | 54 | // The API is on the same domain |
54 | absoluteAPIUrl = window.location.origin | 55 | absoluteAPIUrl = window.location.origin |
diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts index 1a0644c3d..91dd3977a 100644 --- a/client/src/app/shared/video/video.service.ts +++ b/client/src/app/shared/video/video.service.ts | |||
@@ -9,9 +9,9 @@ import { UserVideoRateUpdate } from '../../../../../shared/models/videos/user-vi | |||
9 | import { UserVideoRate } from '../../../../../shared/models/videos/user-video-rate.model' | 9 | import { UserVideoRate } from '../../../../../shared/models/videos/user-video-rate.model' |
10 | import { VideoRateType } from '../../../../../shared/models/videos/video-rate.type' | 10 | import { VideoRateType } from '../../../../../shared/models/videos/video-rate.type' |
11 | import { VideoUpdate } from '../../../../../shared/models/videos/video-update.model' | 11 | import { VideoUpdate } from '../../../../../shared/models/videos/video-update.model' |
12 | import { environment } from '../../../environments/environment' | ||
12 | import { RestExtractor } from '../rest/rest-extractor.service' | 13 | import { RestExtractor } from '../rest/rest-extractor.service' |
13 | import { RestService } from '../rest/rest.service' | 14 | import { RestService } from '../rest/rest.service' |
14 | import { Search } from '../header/search.model' | ||
15 | import { UserService } from '../users/user.service' | 15 | import { UserService } from '../users/user.service' |
16 | import { SortField } from './sort-field.type' | 16 | import { SortField } from './sort-field.type' |
17 | import { VideoDetails } from './video-details.model' | 17 | import { VideoDetails } from './video-details.model' |
@@ -21,7 +21,7 @@ import { Video } from './video.model' | |||
21 | 21 | ||
22 | @Injectable() | 22 | @Injectable() |
23 | export class VideoService { | 23 | export class VideoService { |
24 | private static BASE_VIDEO_URL = API_URL + '/api/v1/videos/' | 24 | private static BASE_VIDEO_URL = environment.apiUrl + '/api/v1/videos/' |
25 | 25 | ||
26 | constructor ( | 26 | constructor ( |
27 | private authHttp: HttpClient, | 27 | private authHttp: HttpClient, |
@@ -118,7 +118,7 @@ export class VideoService { | |||
118 | 118 | ||
119 | loadCompleteDescription (descriptionPath: string) { | 119 | loadCompleteDescription (descriptionPath: string) { |
120 | return this.authHttp | 120 | return this.authHttp |
121 | .get(API_URL + descriptionPath) | 121 | .get(environment.apiUrl + descriptionPath) |
122 | .map(res => res['description']) | 122 | .map(res => res['description']) |
123 | .catch((res) => this.restExtractor.handleError(res)) | 123 | .catch((res) => this.restExtractor.handleError(res)) |
124 | } | 124 | } |