aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/auth/auth.service.ts
diff options
context:
space:
mode:
authorAndréas Livet <andreas.livet@gmail.com>2017-12-19 10:45:49 +0100
committerChocobozzz <me@florianbigard.com>2017-12-19 10:45:49 +0100
commit7efe153b0bc23e596d5019b9fb3e3e32b6cfeccd (patch)
tree56116e7e9f8467b78ed6dfc81827288915d31c8c /client/src/app/core/auth/auth.service.ts
parent228077efd73485a2832bb6211c9fa923158c2112 (diff)
downloadPeerTube-7efe153b0bc23e596d5019b9fb3e3e32b6cfeccd.tar.gz
PeerTube-7efe153b0bc23e596d5019b9fb3e3e32b6cfeccd.tar.zst
PeerTube-7efe153b0bc23e596d5019b9fb3e3e32b6cfeccd.zip
Enh #106 : Add an autoPlayVideo user attribute (#159)
Warning : I was not able to run the tests on my machine. It uses a different approach to handle databse connexion and didn't find where to configure it... - create a migration file to add a boolean column in user table - add autoPlayVideo attribute everywhere it is needed (both on client and server side) - add tests - add a way to configure this attribute in account-settings - use the attribute in video-watch component to actually autoplay or not the video
Diffstat (limited to 'client/src/app/core/auth/auth.service.ts')
-rw-r--r--client/src/app/core/auth/auth.service.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/src/app/core/auth/auth.service.ts b/client/src/app/core/auth/auth.service.ts
index e2b8b6ba5..37264a8ad 100644
--- a/client/src/app/core/auth/auth.service.ts
+++ b/client/src/app/core/auth/auth.service.ts
@@ -33,6 +33,7 @@ interface UserLoginWithUserInformation extends UserLogin {
33 id: number 33 id: number
34 role: UserRole 34 role: UserRole
35 displayNSFW: boolean 35 displayNSFW: boolean
36 autoPlayVideo: boolean
36 email: string 37 email: string
37 videoQuota: number 38 videoQuota: number
38 account: Account 39 account: Account
@@ -191,6 +192,7 @@ export class AuthService {
191 .subscribe( 192 .subscribe(
192 res => { 193 res => {
193 this.user.displayNSFW = res.displayNSFW 194 this.user.displayNSFW = res.displayNSFW
195 this.user.autoPlayVideo = res.autoPlayVideo
194 this.user.role = res.role 196 this.user.role = res.role
195 this.user.videoChannels = res.videoChannels 197 this.user.videoChannels = res.videoChannels
196 this.user.account = res.account 198 this.user.account = res.account
@@ -212,6 +214,7 @@ export class AuthService {
212 id: res.id, 214 id: res.id,
213 role: res.role, 215 role: res.role,
214 displayNSFW: res.displayNSFW, 216 displayNSFW: res.displayNSFW,
217 autoPlayVideo: res.autoPlayVideo,
215 email: res.email, 218 email: res.email,
216 videoQuota: res.videoQuota, 219 videoQuota: res.videoQuota,
217 account: res.account, 220 account: res.account,
@@ -230,6 +233,7 @@ export class AuthService {
230 role: obj.role, 233 role: obj.role,
231 email: obj.email, 234 email: obj.email,
232 displayNSFW: obj.displayNSFW, 235 displayNSFW: obj.displayNSFW,
236 autoPlayVideo: obj.autoPlayVideo,
233 videoQuota: obj.videoQuota, 237 videoQuota: obj.videoQuota,
234 videoChannels: obj.videoChannels, 238 videoChannels: obj.videoChannels,
235 account: obj.account 239 account: obj.account