2020-05-07 20:44:11 +02:00
|
|
|
// On Web, this will find .env.defaults and optional .env in web/
|
|
|
|
// On Desktop App, this will find .env.defaults and optional .env in root dir
|
2020-07-23 16:22:57 +02:00
|
|
|
require('dotenv-defaults').config({ silent: false });
|
2020-09-30 20:46:17 +02:00
|
|
|
|
2019-08-23 17:54:08 +02:00
|
|
|
const config = {
|
2020-05-07 20:44:11 +02:00
|
|
|
WEBPACK_WEB_PORT: process.env.WEBPACK_WEB_PORT,
|
|
|
|
WEBPACK_ELECTRON_PORT: process.env.WEBPACK_ELECTRON_PORT,
|
|
|
|
WEB_SERVER_PORT: process.env.WEB_SERVER_PORT,
|
2021-11-30 03:27:56 +01:00
|
|
|
LBRY_WEB_API: process.env.LBRY_WEB_API, // api.na-backend.odysee.com',
|
2021-07-29 15:53:44 +02:00
|
|
|
LBRY_WEB_PUBLISH_API: process.env.LBRY_WEB_PUBLISH_API,
|
Support resume-able upload via tus (#186)
* Publish button: use spinner instead of "Publishing..."
Looks better, plus the preview could take a while sometimes.
* Refactor `doPublish`. No functional change
This is to allow `doPublish` to accept a custom payload as an input (for resuming uploads), instead of always resolving it from the redux data.
* Add doPublishResume
* Support resume-able upload via tus
## Issue
38 Handle resumable file upload
## Notes
Since we can't serialize a File object, we'll need to the user to re-select the file to resume.
* Exclude "modified date" for Firefox/Android
## Issue
It appears that the modification date of the Android file changes when selected, so that file was deemed "different" when trying to resume upload.
## Change
Exclude modification date for now. Let's assume a smart user.
* Move 'currentUploads' to 'publish' reducer
`publish` is currently rehydrated, so we can ride on that and don't need to store the `currentUploads` in `localStorage` for persistence. This would allow us to store Markdown Post data too, as `localStorage` has a 5MB limit per app.
We could have also made `webReducer` rehydrate, but in this repo, there is no need to split it to another reducer. It also makes more sense to be part of publish anyway (at least to me).
This change is mostly moving items between files, with the exception of
1. An additional REHYDRATE in the publish reducer to clean up the tusUploader.
2. Not clearing `currentUploads` in CLEAR_PUBLISH.
* Restore v1 code for livestream replay, etc.
v2 (tus) does not handle `remote_url`, so the app still needs v1 for that. Since we'll still have v1 code, use v1 for previews as well.
2021-11-10 19:16:16 +01:00
|
|
|
LBRY_WEB_PUBLISH_API_V2: process.env.LBRY_WEB_PUBLISH_API_V2,
|
2022-02-08 19:09:38 +01:00
|
|
|
LBRY_API_URL: process.env.LBRY_API_URL, // api.odysee.com',
|
|
|
|
LBRY_WEB_STREAMING_API: process.env.LBRY_WEB_STREAMING_API, // player.odycdn.com
|
2020-08-07 22:59:20 +02:00
|
|
|
LBRY_WEB_BUFFER_API: process.env.LBRY_WEB_BUFFER_API,
|
2021-07-29 19:14:57 +02:00
|
|
|
SEARCH_SERVER_API: process.env.SEARCH_SERVER_API,
|
2021-11-24 21:25:22 +01:00
|
|
|
SEARCH_SERVER_API_ALT: process.env.SEARCH_SERVER_API_ALT,
|
2021-02-11 06:12:41 +01:00
|
|
|
COMMENT_SERVER_API: process.env.COMMENT_SERVER_API,
|
2021-07-30 22:48:10 +02:00
|
|
|
SOCKETY_SERVER_API: process.env.SOCKETY_SERVER_API,
|
2022-03-02 15:44:01 +01:00
|
|
|
LOCALE_API: process.env.LOCALE_API,
|
2020-07-06 23:39:35 +02:00
|
|
|
WELCOME_VERSION: process.env.WELCOME_VERSION,
|
2020-05-07 20:44:11 +02:00
|
|
|
DOMAIN: process.env.DOMAIN,
|
2020-08-29 19:58:38 +02:00
|
|
|
SHARE_DOMAIN_URL: process.env.SHARE_DOMAIN_URL,
|
2020-07-02 03:34:50 +02:00
|
|
|
URL: process.env.URL,
|
2022-02-07 12:49:11 +01:00
|
|
|
RECSYS_ENDPOINT: process.env.RECSYS_ENDPOINT,
|
2020-12-08 21:10:11 +01:00
|
|
|
THUMBNAIL_CDN_URL: process.env.THUMBNAIL_CDN_URL,
|
2021-10-13 02:31:10 +02:00
|
|
|
THUMBNAIL_CARDS_CDN_URL: process.env.THUMBNAIL_CARDS_CDN_URL,
|
2021-10-07 22:38:56 +02:00
|
|
|
THUMBNAIL_HEIGHT: process.env.THUMBNAIL_HEIGHT,
|
|
|
|
THUMBNAIL_WIDTH: process.env.THUMBNAIL_WIDTH,
|
|
|
|
THUMBNAIL_QUALITY: process.env.THUMBNAIL_QUALITY,
|
2022-01-13 06:10:55 +01:00
|
|
|
THUMBNAIL_CDN_SIZE_LIMIT_BYTES: process.env.THUMBNAIL_CDN_SIZE_LIMIT_BYTES,
|
2020-05-07 20:44:11 +02:00
|
|
|
SITE_TITLE: process.env.SITE_TITLE,
|
2020-07-02 03:34:50 +02:00
|
|
|
SITE_NAME: process.env.SITE_NAME,
|
2020-07-01 00:44:46 +02:00
|
|
|
SITE_DESCRIPTION: process.env.SITE_DESCRIPTION,
|
2021-03-04 09:22:07 +01:00
|
|
|
SITE_HELP_EMAIL: process.env.SITE_HELP_EMAIL,
|
2021-07-26 19:27:48 +02:00
|
|
|
// SOCIAL MEDIA
|
|
|
|
TWITTER_ACCOUNT: process.env.TWITTER_ACCOUNT,
|
2021-07-19 19:20:25 +02:00
|
|
|
// LOGO
|
2020-05-07 20:44:11 +02:00
|
|
|
LOGO_TITLE: process.env.LOGO_TITLE,
|
2021-07-21 17:33:28 +02:00
|
|
|
LOGO: process.env.LOGO,
|
2021-12-20 15:00:22 +01:00
|
|
|
LOGO_WHITE_TEXT: process.env.LOGO_WHITE_TEXT,
|
|
|
|
LOGO_DARK_TEXT: process.env.LOGO_DARK_TEXT,
|
2021-07-21 17:33:28 +02:00
|
|
|
AVATAR_DEFAULT: process.env.AVATAR_DEFAULT,
|
2021-08-02 14:33:31 +02:00
|
|
|
MISSING_THUMB_DEFAULT: process.env.MISSING_THUMB_DEFAULT,
|
2021-07-19 19:20:25 +02:00
|
|
|
// OG
|
2020-07-06 23:39:35 +02:00
|
|
|
OG_TITLE_SUFFIX: process.env.OG_TITLE_SUFFIX,
|
|
|
|
OG_HOMEPAGE_TITLE: process.env.OG_HOMEPAGE_TITLE,
|
|
|
|
OG_IMAGE_URL: process.env.OG_IMAGE_URL,
|
2021-07-19 19:20:25 +02:00
|
|
|
// MASCOT
|
2020-08-26 18:24:07 +02:00
|
|
|
YRBL_HAPPY_IMG_URL: process.env.YRBL_HAPPY_IMG_URL,
|
|
|
|
YRBL_SAD_IMG_URL: process.env.YRBL_SAD_IMG_URL,
|
2021-05-13 09:26:59 +02:00
|
|
|
LOGIN_IMG_URL: process.env.LOGIN_IMG_URL,
|
2020-07-06 23:39:35 +02:00
|
|
|
SITE_CANONICAL_URL: process.env.SITE_CANONICAL_URL,
|
|
|
|
DEFAULT_LANGUAGE: process.env.DEFAULT_LANGUAGE,
|
2020-07-15 00:49:10 +02:00
|
|
|
AUTO_FOLLOW_CHANNELS: process.env.AUTO_FOLLOW_CHANNELS,
|
2020-07-31 20:24:01 +02:00
|
|
|
UNSYNCED_SETTINGS: process.env.UNSYNCED_SETTINGS,
|
2021-07-19 19:20:25 +02:00
|
|
|
|
|
|
|
// ENABLE FEATURES
|
2020-09-30 17:59:05 +02:00
|
|
|
ENABLE_COMMENT_REACTIONS: process.env.ENABLE_COMMENT_REACTIONS === 'true',
|
2020-10-02 21:18:53 +02:00
|
|
|
ENABLE_FILE_REACTIONS: process.env.ENABLE_FILE_REACTIONS === 'true',
|
2020-10-27 17:24:31 +01:00
|
|
|
ENABLE_CREATOR_REACTIONS: process.env.ENABLE_CREATOR_REACTIONS === 'true',
|
2021-03-18 16:41:21 +01:00
|
|
|
ENABLE_NO_SOURCE_CLAIMS: process.env.ENABLE_NO_SOURCE_CLAIMS === 'true',
|
2021-04-12 18:43:47 +02:00
|
|
|
ENABLE_PREROLL_ADS: process.env.ENABLE_PREROLL_ADS === 'true',
|
2021-03-09 10:33:42 +01:00
|
|
|
CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS: process.env.CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS,
|
2021-04-08 21:19:14 +02:00
|
|
|
CHANNEL_STAKED_LEVEL_LIVESTREAM: process.env.CHANNEL_STAKED_LEVEL_LIVESTREAM,
|
2022-02-16 15:14:08 +01:00
|
|
|
CHANNEL_CREATION_LIMIT: process.env.CHANNEL_CREATION_LIMIT,
|
2021-04-14 06:06:11 +02:00
|
|
|
WEB_PUBLISH_SIZE_LIMIT_GB: process.env.WEB_PUBLISH_SIZE_LIMIT_GB,
|
2021-06-29 14:54:54 +02:00
|
|
|
LOADING_BAR_COLOR: process.env.LOADING_BAR_COLOR,
|
2022-02-16 15:14:08 +01:00
|
|
|
SIMPLE_SITE: process.env.SIMPLE_SITE === 'true',
|
2020-08-03 22:14:43 +02:00
|
|
|
SHOW_ADS: process.env.SHOW_ADS === 'true',
|
2021-01-08 19:05:53 +01:00
|
|
|
KNOWN_APP_DOMAINS: process.env.KNOWN_APP_DOMAINS ? process.env.KNOWN_APP_DOMAINS.split(',') : [],
|
2021-07-03 19:19:23 +02:00
|
|
|
STRIPE_PUBLIC_KEY: process.env.STRIPE_PUBLIC_KEY,
|
2021-07-06 19:01:55 +02:00
|
|
|
ENABLE_UI_NOTIFICATIONS: process.env.ENABLE_UI_NOTIFICATIONS === 'true',
|
2021-07-06 20:16:57 +02:00
|
|
|
ENABLE_MATURE: process.env.ENABLE_MATURE === 'true',
|
2021-07-13 02:14:43 +02:00
|
|
|
CUSTOM_HOMEPAGE: process.env.CUSTOM_HOMEPAGE === 'true',
|
2021-07-20 04:38:55 +02:00
|
|
|
SHOW_TAGS_INTRO: process.env.SHOW_TAGS_INTRO === 'true',
|
2021-07-22 22:04:46 +02:00
|
|
|
LIGHTHOUSE_DEFAULT_TYPES: process.env.LIGHTHOUSE_DEFAULT_TYPES,
|
2021-07-28 22:10:19 +02:00
|
|
|
BRANDED_SITE: process.env.BRANDED_SITE,
|
2021-10-27 16:38:10 +02:00
|
|
|
|
|
|
|
// FIREBASE SDK
|
|
|
|
FIREBASE_API_KEY: process.env.FIREBASE_API_KEY,
|
|
|
|
FIREBASE_AUTH_DOMAIN: process.env.FIREBASE_AUTH_DOMAIN,
|
|
|
|
FIREBASE_PROJECT_ID: process.env.FIREBASE_PROJECT_ID,
|
|
|
|
FIREBASE_STORAGE_BUCKET: process.env.FIREBASE_STORAGE_BUCKET,
|
|
|
|
FIREBASE_MESSAGING_SENDER_ID: process.env.FIREBASE_MESSAGING_SENDER_ID,
|
|
|
|
FIREBASE_APP_ID: process.env.FIREBASE_APP_ID,
|
|
|
|
FIREBASE_MEASUREMENT_ID: process.env.FIREBASE_MEASUREMENT_ID,
|
|
|
|
FIREBASE_VAPID_KEY: process.env.FIREBASE_VAPID_KEY,
|
|
|
|
|
2021-12-06 19:01:40 +01:00
|
|
|
AD_KEYWORD_BLOCKLIST: process.env.AD_KEYWORD_BLOCKLIST,
|
2022-02-08 19:09:38 +01:00
|
|
|
AD_KEYWORD_BLOCKLIST_CHECK_DESCRIPTION: process.env.AD_KEYWORD_BLOCKLIST_CHECK_DESCRIPTION,
|
2019-08-23 17:54:08 +02:00
|
|
|
};
|
|
|
|
|
2021-12-01 16:36:52 +01:00
|
|
|
config.SDK_API_PATH = `${config.LBRY_WEB_API}/api/v1`;
|
|
|
|
config.PROXY_URL = `${config.SDK_API_PATH}/proxy`;
|
|
|
|
|
2019-11-20 21:57:38 +01:00
|
|
|
config.URL_DEV = `http://localhost:${config.WEBPACK_WEB_PORT}`;
|
2021-07-26 19:27:48 +02:00
|
|
|
config.URL_LOCAL = `http://localhost:${config.WEB_SERVER_PORT}`;
|
2021-11-30 03:27:56 +01:00
|
|
|
config.FAVICON = `/public/favicon-spaceman.png`;
|
2019-08-23 17:54:08 +02:00
|
|
|
|
|
|
|
module.exports = config;
|