diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-10 14:06:19 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-07-24 10:58:16 +0200 |
commit | ffb321bedca46d6987c7b31dd58e5dea96ea2ea2 (patch) | |
tree | 019f0427c1860ae0b00694c43f1be8d5fe1aa995 /server/models/account | |
parent | 7cd4d2ba10106c10602c86f74f55743ded588896 (diff) | |
download | PeerTube-ffb321bedca46d6987c7b31dd58e5dea96ea2ea2.tar.gz PeerTube-ffb321bedca46d6987c7b31dd58e5dea96ea2ea2.tar.zst PeerTube-ffb321bedca46d6987c7b31dd58e5dea96ea2ea2.zip |
WIP plugins: load theme on client side
Diffstat (limited to 'server/models/account')
-rw-r--r-- | server/models/account/user.ts | 6 |
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' | |||
44 | import { AccountModel } from './account' | 44 | import { AccountModel } from './account' |
45 | import { NSFWPolicyType } from '../../../shared/models/videos/nsfw-policy.type' | 45 | import { NSFWPolicyType } from '../../../shared/models/videos/nsfw-policy.type' |
46 | import { values } from 'lodash' | 46 | import { values } from 'lodash' |
47 | import { DEFAULT_THEME, NSFW_POLICY_TYPES } from '../../initializers/constants' | 47 | import { DEFAULT_THEME_NAME, DEFAULT_USER_THEME_NAME, NSFW_POLICY_TYPES } from '../../initializers/constants' |
48 | import { clearCacheByUserId } from '../../lib/oauth-model' | 48 | import { clearCacheByUserId } from '../../lib/oauth-model' |
49 | import { UserNotificationSettingModel } from './user-notification-setting' | 49 | import { UserNotificationSettingModel } from './user-notification-setting' |
50 | import { VideoModel } from '../video/video' | 50 | import { 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, |