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/initializers/constants.ts | 6 ++++-- server/initializers/migrations/0400-user-theme.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'server/initializers') diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 9d61ed537..e5f88b71d 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -585,7 +585,8 @@ const P2P_MEDIA_LOADER_PEER_VERSION = 2 const PLUGIN_GLOBAL_CSS_FILE_NAME = 'plugins-global.css' const PLUGIN_GLOBAL_CSS_PATH = join(CONFIG.STORAGE.TMP_DIR, PLUGIN_GLOBAL_CSS_FILE_NAME) -const DEFAULT_THEME = 'default' +const DEFAULT_THEME_NAME = 'default' +const DEFAULT_USER_THEME_NAME = 'instance-default' // --------------------------------------------------------------------------- @@ -660,6 +661,7 @@ export { PREVIEWS_SIZE, REMOTE_SCHEME, FOLLOW_STATES, + DEFAULT_USER_THEME_NAME, SERVER_ACTOR_NAME, PLUGIN_GLOBAL_CSS_FILE_NAME, PLUGIN_GLOBAL_CSS_PATH, @@ -669,7 +671,7 @@ export { HLS_STREAMING_PLAYLIST_DIRECTORY, FEEDS, JOB_TTL, - DEFAULT_THEME, + DEFAULT_THEME_NAME, NSFW_POLICY_TYPES, STATIC_MAX_AGE, STATIC_PATHS, diff --git a/server/initializers/migrations/0400-user-theme.ts b/server/initializers/migrations/0400-user-theme.ts index 2c1763890..f74d76115 100644 --- a/server/initializers/migrations/0400-user-theme.ts +++ b/server/initializers/migrations/0400-user-theme.ts @@ -9,7 +9,7 @@ async function up (utils: { const data = { type: Sequelize.STRING, allowNull: false, - defaultValue: 'default' + defaultValue: 'instance-default' } await utils.queryInterface.addColumn('user', 'theme', data) -- cgit v1.2.3