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/initializers | |
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/initializers')
-rw-r--r-- | server/initializers/constants.ts | 6 | ||||
-rw-r--r-- | server/initializers/migrations/0400-user-theme.ts | 2 |
2 files changed, 5 insertions, 3 deletions
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 | |||
585 | const PLUGIN_GLOBAL_CSS_FILE_NAME = 'plugins-global.css' | 585 | const PLUGIN_GLOBAL_CSS_FILE_NAME = 'plugins-global.css' |
586 | const PLUGIN_GLOBAL_CSS_PATH = join(CONFIG.STORAGE.TMP_DIR, PLUGIN_GLOBAL_CSS_FILE_NAME) | 586 | const PLUGIN_GLOBAL_CSS_PATH = join(CONFIG.STORAGE.TMP_DIR, PLUGIN_GLOBAL_CSS_FILE_NAME) |
587 | 587 | ||
588 | const DEFAULT_THEME = 'default' | 588 | const DEFAULT_THEME_NAME = 'default' |
589 | const DEFAULT_USER_THEME_NAME = 'instance-default' | ||
589 | 590 | ||
590 | // --------------------------------------------------------------------------- | 591 | // --------------------------------------------------------------------------- |
591 | 592 | ||
@@ -660,6 +661,7 @@ export { | |||
660 | PREVIEWS_SIZE, | 661 | PREVIEWS_SIZE, |
661 | REMOTE_SCHEME, | 662 | REMOTE_SCHEME, |
662 | FOLLOW_STATES, | 663 | FOLLOW_STATES, |
664 | DEFAULT_USER_THEME_NAME, | ||
663 | SERVER_ACTOR_NAME, | 665 | SERVER_ACTOR_NAME, |
664 | PLUGIN_GLOBAL_CSS_FILE_NAME, | 666 | PLUGIN_GLOBAL_CSS_FILE_NAME, |
665 | PLUGIN_GLOBAL_CSS_PATH, | 667 | PLUGIN_GLOBAL_CSS_PATH, |
@@ -669,7 +671,7 @@ export { | |||
669 | HLS_STREAMING_PLAYLIST_DIRECTORY, | 671 | HLS_STREAMING_PLAYLIST_DIRECTORY, |
670 | FEEDS, | 672 | FEEDS, |
671 | JOB_TTL, | 673 | JOB_TTL, |
672 | DEFAULT_THEME, | 674 | DEFAULT_THEME_NAME, |
673 | NSFW_POLICY_TYPES, | 675 | NSFW_POLICY_TYPES, |
674 | STATIC_MAX_AGE, | 676 | STATIC_MAX_AGE, |
675 | STATIC_PATHS, | 677 | 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: { | |||
9 | const data = { | 9 | const data = { |
10 | type: Sequelize.STRING, | 10 | type: Sequelize.STRING, |
11 | allowNull: false, | 11 | allowNull: false, |
12 | defaultValue: 'default' | 12 | defaultValue: 'instance-default' |
13 | } | 13 | } |
14 | 14 | ||
15 | await utils.queryInterface.addColumn('user', 'theme', data) | 15 | await utils.queryInterface.addColumn('user', 'theme', data) |