aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/account/account-videos/account-videos.component.html1
-rw-r--r--client/src/app/account/account-videos/account-videos.component.scss6
-rw-r--r--client/src/app/core/auth/auth-user.model.ts8
-rw-r--r--client/src/app/shared/video/video-details.model.ts11
-rw-r--r--client/src/app/shared/video/video.model.ts4
5 files changed, 14 insertions, 16 deletions
diff --git a/client/src/app/account/account-videos/account-videos.component.html b/client/src/app/account/account-videos/account-videos.component.html
index d7e2230b0..66ce3a77b 100644
--- a/client/src/app/account/account-videos/account-videos.component.html
+++ b/client/src/app/account/account-videos/account-videos.component.html
@@ -18,6 +18,7 @@
18 <div class="video-info"> 18 <div class="video-info">
19 <a class="video-info-name" [routerLink]="['/videos/watch', video.uuid]" [attr.title]="video.name">{{ video.name }}</a> 19 <a class="video-info-name" [routerLink]="['/videos/watch', video.uuid]" [attr.title]="video.name">{{ video.name }}</a>
20 <span class="video-info-date-views">{{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views</span> 20 <span class="video-info-date-views">{{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views</span>
21 <div class="video-info-private">{{ video.privacy.label }}</div>
21 </div> 22 </div>
22 23
23 <!-- Display only once --> 24 <!-- Display only once -->
diff --git a/client/src/app/account/account-videos/account-videos.component.scss b/client/src/app/account/account-videos/account-videos.component.scss
index 449cc6af4..f276ea389 100644
--- a/client/src/app/account/account-videos/account-videos.component.scss
+++ b/client/src/app/account/account-videos/account-videos.component.scss
@@ -79,8 +79,12 @@
79 font-weight: $font-semibold; 79 font-weight: $font-semibold;
80 } 80 }
81 81
82 .video-info-date-views { 82 .video-info-date-views, .video-info-private {
83 font-size: 13px; 83 font-size: 13px;
84
85 &.video-info-private {
86 font-weight: $font-semibold;
87 }
84 } 88 }
85 } 89 }
86 90
diff --git a/client/src/app/core/auth/auth-user.model.ts b/client/src/app/core/auth/auth-user.model.ts
index 60fe57899..74ed1c580 100644
--- a/client/src/app/core/auth/auth-user.model.ts
+++ b/client/src/app/core/auth/auth-user.model.ts
@@ -71,7 +71,7 @@ export class AuthUser extends User {
71 ROLE: 'role', 71 ROLE: 'role',
72 EMAIL: 'email', 72 EMAIL: 'email',
73 USERNAME: 'username', 73 USERNAME: 'username',
74 DEFAULT_NSFW_POLICY: 'nsfw_policy', 74 NSFW_POLICY: 'nsfw_policy',
75 AUTO_PLAY_VIDEO: 'auto_play_video' 75 AUTO_PLAY_VIDEO: 'auto_play_video'
76 } 76 }
77 77
@@ -86,7 +86,7 @@ export class AuthUser extends User {
86 username: peertubeLocalStorage.getItem(this.KEYS.USERNAME), 86 username: peertubeLocalStorage.getItem(this.KEYS.USERNAME),
87 email: peertubeLocalStorage.getItem(this.KEYS.EMAIL), 87 email: peertubeLocalStorage.getItem(this.KEYS.EMAIL),
88 role: parseInt(peertubeLocalStorage.getItem(this.KEYS.ROLE), 10) as UserRole, 88 role: parseInt(peertubeLocalStorage.getItem(this.KEYS.ROLE), 10) as UserRole,
89 nsfwPolicy: peertubeLocalStorage.getItem(this.KEYS.DEFAULT_NSFW_POLICY) as NSFWPolicyType, 89 nsfwPolicy: peertubeLocalStorage.getItem(this.KEYS.NSFW_POLICY) as NSFWPolicyType,
90 autoPlayVideo: peertubeLocalStorage.getItem(this.KEYS.AUTO_PLAY_VIDEO) === 'true' 90 autoPlayVideo: peertubeLocalStorage.getItem(this.KEYS.AUTO_PLAY_VIDEO) === 'true'
91 }, 91 },
92 Tokens.load() 92 Tokens.load()
@@ -100,7 +100,7 @@ export class AuthUser extends User {
100 peertubeLocalStorage.removeItem(this.KEYS.USERNAME) 100 peertubeLocalStorage.removeItem(this.KEYS.USERNAME)
101 peertubeLocalStorage.removeItem(this.KEYS.ID) 101 peertubeLocalStorage.removeItem(this.KEYS.ID)
102 peertubeLocalStorage.removeItem(this.KEYS.ROLE) 102 peertubeLocalStorage.removeItem(this.KEYS.ROLE)
103 peertubeLocalStorage.removeItem(this.KEYS.DEFAULT_NSFW_POLICY) 103 peertubeLocalStorage.removeItem(this.KEYS.NSFW_POLICY)
104 peertubeLocalStorage.removeItem(this.KEYS.AUTO_PLAY_VIDEO) 104 peertubeLocalStorage.removeItem(this.KEYS.AUTO_PLAY_VIDEO)
105 peertubeLocalStorage.removeItem(this.KEYS.EMAIL) 105 peertubeLocalStorage.removeItem(this.KEYS.EMAIL)
106 Tokens.flush() 106 Tokens.flush()
@@ -137,7 +137,7 @@ export class AuthUser extends User {
137 peertubeLocalStorage.setItem(AuthUser.KEYS.USERNAME, this.username) 137 peertubeLocalStorage.setItem(AuthUser.KEYS.USERNAME, this.username)
138 peertubeLocalStorage.setItem(AuthUser.KEYS.EMAIL, this.email) 138 peertubeLocalStorage.setItem(AuthUser.KEYS.EMAIL, this.email)
139 peertubeLocalStorage.setItem(AuthUser.KEYS.ROLE, this.role.toString()) 139 peertubeLocalStorage.setItem(AuthUser.KEYS.ROLE, this.role.toString())
140 peertubeLocalStorage.setItem(AuthUser.KEYS.DEFAULT_NSFW_POLICY, this.nsfwPolicy.toString()) 140 peertubeLocalStorage.setItem(AuthUser.KEYS.NSFW_POLICY, this.nsfwPolicy.toString())
141 peertubeLocalStorage.setItem(AuthUser.KEYS.AUTO_PLAY_VIDEO, JSON.stringify(this.autoPlayVideo)) 141 peertubeLocalStorage.setItem(AuthUser.KEYS.AUTO_PLAY_VIDEO, JSON.stringify(this.autoPlayVideo))
142 this.tokens.save() 142 this.tokens.save()
143 } 143 }
diff --git a/client/src/app/shared/video/video-details.model.ts b/client/src/app/shared/video/video-details.model.ts
index a1f7207a2..5397aa37f 100644
--- a/client/src/app/shared/video/video-details.model.ts
+++ b/client/src/app/shared/video/video-details.model.ts
@@ -1,17 +1,9 @@
1import { 1import { UserRight, VideoChannel, VideoDetails as VideoDetailsServerModel, VideoFile } from '../../../../../shared'
2 UserRight,
3 VideoChannel,
4 VideoDetails as VideoDetailsServerModel,
5 VideoFile,
6 VideoPrivacy
7} from '../../../../../shared'
8import { Account } from '../../../../../shared/models/actors' 2import { Account } from '../../../../../shared/models/actors'
9import { VideoConstant } from '../../../../../shared/models/videos/video.model'
10import { AuthUser } from '../../core' 3import { AuthUser } from '../../core'
11import { Video } from '../../shared/video/video.model' 4import { Video } from '../../shared/video/video.model'
12 5
13export class VideoDetails extends Video implements VideoDetailsServerModel { 6export class VideoDetails extends Video implements VideoDetailsServerModel {
14 privacy: VideoConstant<VideoPrivacy>
15 descriptionPath: string 7 descriptionPath: string
16 support: string 8 support: string
17 channel: VideoChannel 9 channel: VideoChannel
@@ -26,7 +18,6 @@ export class VideoDetails extends Video implements VideoDetailsServerModel {
26 constructor (hash: VideoDetailsServerModel) { 18 constructor (hash: VideoDetailsServerModel) {
27 super(hash) 19 super(hash)
28 20
29 this.privacy = hash.privacy
30 this.descriptionPath = hash.descriptionPath 21 this.descriptionPath = hash.descriptionPath
31 this.files = hash.files 22 this.files = hash.files
32 this.channel = hash.channel 23 this.channel = hash.channel
diff --git a/client/src/app/shared/video/video.model.ts b/client/src/app/shared/video/video.model.ts
index adc248a1e..e25c172e0 100644
--- a/client/src/app/shared/video/video.model.ts
+++ b/client/src/app/shared/video/video.model.ts
@@ -1,6 +1,6 @@
1import { Account } from '@app/shared/account/account.model' 1import { Account } from '@app/shared/account/account.model'
2import { User } from '../' 2import { User } from '../'
3import { Video as VideoServerModel } from '../../../../../shared' 3import { Video as VideoServerModel, VideoPrivacy } from '../../../../../shared'
4import { Avatar } from '../../../../../shared/models/avatars/avatar.model' 4import { Avatar } from '../../../../../shared/models/avatars/avatar.model'
5import { VideoConstant } from '../../../../../shared/models/videos/video.model' 5import { VideoConstant } from '../../../../../shared/models/videos/video.model'
6import { getAbsoluteAPIUrl } from '../misc/utils' 6import { getAbsoluteAPIUrl } from '../misc/utils'
@@ -14,6 +14,7 @@ export class Video implements VideoServerModel {
14 category: VideoConstant<number> 14 category: VideoConstant<number>
15 licence: VideoConstant<number> 15 licence: VideoConstant<number>
16 language: VideoConstant<number> 16 language: VideoConstant<number>
17 privacy: VideoConstant<VideoPrivacy>
17 description: string 18 description: string
18 duration: number 19 duration: number
19 durationLabel: string 20 durationLabel: string
@@ -62,6 +63,7 @@ export class Video implements VideoServerModel {
62 this.category = hash.category 63 this.category = hash.category
63 this.licence = hash.licence 64 this.licence = hash.licence
64 this.language = hash.language 65 this.language = hash.language
66 this.privacy = hash.privacy
65 this.description = hash.description 67 this.description = hash.description
66 this.duration = hash.duration 68 this.duration = hash.duration
67 this.durationLabel = Video.createDurationString(hash.duration) 69 this.durationLabel = Video.createDurationString(hash.duration)