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 --- shared/models/server/server-config.model.ts | 8 ++++++-- shared/models/users/user.model.ts | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'shared/models') diff --git a/shared/models/server/server-config.model.ts b/shared/models/server/server-config.model.ts index d6c660aac..3498f86d7 100644 --- a/shared/models/server/server-config.model.ts +++ b/shared/models/server/server-config.model.ts @@ -1,13 +1,17 @@ import { NSFWPolicyType } from '../videos/nsfw-policy.type' import { ClientScript } from '../plugins/plugin-package-json.model' -export type ServerConfigPlugin = { +export interface ServerConfigPlugin { name: string version: string description: string clientScripts: { [name: string]: ClientScript } } +export interface ServerConfigTheme extends ServerConfigPlugin { + css: string[] +} + export interface ServerConfig { serverVersion: string serverCommit?: string @@ -29,7 +33,7 @@ export interface ServerConfig { } theme: { - registered: ServerConfigPlugin[] + registered: ServerConfigTheme[] default: string } diff --git a/shared/models/users/user.model.ts b/shared/models/users/user.model.ts index b5823b47a..de9825e1f 100644 --- a/shared/models/users/user.model.ts +++ b/shared/models/users/user.model.ts @@ -25,6 +25,9 @@ export interface User { videoQuota: number videoQuotaDaily: number createdAt: Date + + theme: string + account: Account notificationSettings?: UserNotificationSetting videoChannels?: VideoChannel[] -- cgit v1.2.3