From ffb321bedca46d6987c7b31dd58e5dea96ea2ea2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 10 Jul 2019 14:06:19 +0200 Subject: WIP plugins: load theme on client side --- server/models/account/user.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/models/account') 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' import { AccountModel } from './account' import { NSFWPolicyType } from '../../../shared/models/videos/nsfw-policy.type' import { values } from 'lodash' -import { DEFAULT_THEME, NSFW_POLICY_TYPES } from '../../initializers/constants' +import { DEFAULT_THEME_NAME, DEFAULT_USER_THEME_NAME, NSFW_POLICY_TYPES } from '../../initializers/constants' import { clearCacheByUserId } from '../../lib/oauth-model' import { UserNotificationSettingModel } from './user-notification-setting' import { VideoModel } from '../video/video' @@ -190,7 +190,7 @@ export class UserModel extends Model { videoQuotaDaily: number @AllowNull(false) - @Default(DEFAULT_THEME) + @Default(DEFAULT_THEME_NAME) @Is('UserTheme', value => throwIfNotValid(value, isThemeValid, 'theme')) @Column theme: string @@ -568,7 +568,7 @@ export class UserModel extends Model { autoPlayVideo: this.autoPlayVideo, videoLanguages: this.videoLanguages, role: this.role, - theme: getThemeOrDefault(this.theme), + theme: getThemeOrDefault(this.theme, DEFAULT_USER_THEME_NAME), roleLabel: USER_ROLE_LABELS[ this.role ], videoQuota: this.videoQuota, videoQuotaDaily: this.videoQuotaDaily, -- cgit v1.2.3