From 099667a4bb873e696e3e9ab7c324263c3754cb83 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Tue, 29 Jun 2021 20:54:54 +0800 Subject: [PATCH] Use env for loading-bar color instead of hardcoded. --- .env.defaults | 1 + config.js | 1 + ui/component/loadingBarOneOff/view.jsx | 6 ++---- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.env.defaults b/.env.defaults index 4106f95c5..e8584724a 100644 --- a/.env.defaults +++ b/.env.defaults @@ -35,6 +35,7 @@ ENABLE_PREROLL_ADS=false CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS=4 CHANNEL_STAKED_LEVEL_LIVESTREAM=5 WEB_PUBLISH_SIZE_LIMIT_GB=4 +LOADING_BAR_COLOR=#2bbb90 # OG OG_TITLE_SUFFIX=| lbry.tv diff --git a/config.js b/config.js index d772ed8d3..0646db770 100644 --- a/config.js +++ b/config.js @@ -41,6 +41,7 @@ const config = { CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS: process.env.CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS, CHANNEL_STAKED_LEVEL_LIVESTREAM: process.env.CHANNEL_STAKED_LEVEL_LIVESTREAM, WEB_PUBLISH_SIZE_LIMIT_GB: process.env.WEB_PUBLISH_SIZE_LIMIT_GB, + LOADING_BAR_COLOR: process.env.LOADING_BAR_COLOR, SIMPLE_SITE: process.env.SIMPLE_SITE === 'true', SHOW_ADS: process.env.SHOW_ADS === 'true', PINNED_URI_1: process.env.PINNED_URI_1, diff --git a/ui/component/loadingBarOneOff/view.jsx b/ui/component/loadingBarOneOff/view.jsx index 78fc2b305..abd9b8932 100644 --- a/ui/component/loadingBarOneOff/view.jsx +++ b/ui/component/loadingBarOneOff/view.jsx @@ -1,10 +1,8 @@ // @flow import * as React from 'react'; +import { LOADING_BAR_COLOR } from 'config'; import LoadingBar from 'react-top-loading-bar'; -// TODO: Retrieve from CSS? -export const COLOR_LOADING_BAR = '#2bbb90'; - function LoadingBarOneOff(props: any) { const loadingBarRef = React.useRef(null); @@ -14,7 +12,7 @@ function LoadingBarOneOff(props: any) { } }, []); - return ; + return ; } export default LoadingBarOneOff;