aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account/user.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-10 14:06:19 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-07-24 10:58:16 +0200
commitffb321bedca46d6987c7b31dd58e5dea96ea2ea2 (patch)
tree019f0427c1860ae0b00694c43f1be8d5fe1aa995 /server/models/account/user.ts
parent7cd4d2ba10106c10602c86f74f55743ded588896 (diff)
downloadPeerTube-ffb321bedca46d6987c7b31dd58e5dea96ea2ea2.tar.gz
PeerTube-ffb321bedca46d6987c7b31dd58e5dea96ea2ea2.tar.zst
PeerTube-ffb321bedca46d6987c7b31dd58e5dea96ea2ea2.zip
WIP plugins: load theme on client side
Diffstat (limited to 'server/models/account/user.ts')
-rw-r--r--server/models/account/user.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/account/user.ts b/server/models/account/user.ts
index b8ca1dd5c..6f0b0e00f 100644
--- a/server/models/account/user.ts
+++ b/server/models/account/user.ts
@@ -44,7 +44,7 @@ import { VideoChannelModel } from '../video/video-channel'
44import { AccountModel } from './account' 44import { AccountModel } from './account'
45import { NSFWPolicyType } from '../../../shared/models/videos/nsfw-policy.type' 45import { NSFWPolicyType } from '../../../shared/models/videos/nsfw-policy.type'
46import { values } from 'lodash' 46import { values } from 'lodash'
47import { DEFAULT_THEME, NSFW_POLICY_TYPES } from '../../initializers/constants' 47import { DEFAULT_THEME_NAME, DEFAULT_USER_THEME_NAME, NSFW_POLICY_TYPES } from '../../initializers/constants'
48import { clearCacheByUserId } from '../../lib/oauth-model' 48import { clearCacheByUserId } from '../../lib/oauth-model'
49import { UserNotificationSettingModel } from './user-notification-setting' 49import { UserNotificationSettingModel } from './user-notification-setting'
50import { VideoModel } from '../video/video' 50import { VideoModel } from '../video/video'
@@ -190,7 +190,7 @@ export class UserModel extends Model<UserModel> {
190 videoQuotaDaily: number 190 videoQuotaDaily: number
191 191
192 @AllowNull(false) 192 @AllowNull(false)
193 @Default(DEFAULT_THEME) 193 @Default(DEFAULT_THEME_NAME)
194 @Is('UserTheme', value => throwIfNotValid(value, isThemeValid, 'theme')) 194 @Is('UserTheme', value => throwIfNotValid(value, isThemeValid, 'theme'))
195 @Column 195 @Column
196 theme: string 196 theme: string
@@ -568,7 +568,7 @@ export class UserModel extends Model<UserModel> {
568 autoPlayVideo: this.autoPlayVideo, 568 autoPlayVideo: this.autoPlayVideo,
569 videoLanguages: this.videoLanguages, 569 videoLanguages: this.videoLanguages,
570 role: this.role, 570 role: this.role,
571 theme: getThemeOrDefault(this.theme), 571 theme: getThemeOrDefault(this.theme, DEFAULT_USER_THEME_NAME),
572 roleLabel: USER_ROLE_LABELS[ this.role ], 572 roleLabel: USER_ROLE_LABELS[ this.role ],
573 videoQuota: this.videoQuota, 573 videoQuota: this.videoQuota,
574 videoQuotaDaily: this.videoQuotaDaily, 574 videoQuotaDaily: this.videoQuotaDaily,