specify first run follow in config
This commit is contained in:
parent
b8e1990439
commit
81ffd7ae79
4 changed files with 14 additions and 11 deletions
|
@ -30,6 +30,8 @@ DEFAULT_LANGUAGE=en
|
||||||
# Custom Content
|
# Custom Content
|
||||||
# If the following is true, copy custom/homepage.example.js to custom/homepage.js and modify
|
# If the following is true, copy custom/homepage.example.js to custom/homepage.js and modify
|
||||||
CUSTOM_HOMEPAGE=false
|
CUSTOM_HOMEPAGE=false
|
||||||
|
# Add channels to auto-follow on first run
|
||||||
|
AUTO_FOLLOW_CHANNELS=lbry://@lbrycast#4c29f8b013adea4d5cca1861fb2161d5089613ea lbry://@lbry#3fda836a92faaceedfe398225fb9b2ee2ed1f01a
|
||||||
# Add up to 2 sidebar links:
|
# Add up to 2 sidebar links:
|
||||||
# PINNED_URI_1=@Lbrylatam#2/Integracionesporseguridad#4
|
# PINNED_URI_1=@Lbrylatam#2/Integracionesporseguridad#4
|
||||||
# PINNED_LABEL_1=LBRY LATAM
|
# PINNED_LABEL_1=LBRY LATAM
|
||||||
|
|
|
@ -113,6 +113,9 @@ nano .env
|
||||||
- To specify your own OG-IMAGE
|
- To specify your own OG-IMAGE
|
||||||
You can either place a png named v2-og.png in the /custom folder or specify the OG_IMAGE_URL in .env
|
You can either place a png named v2-og.png in the /custom folder or specify the OG_IMAGE_URL in .env
|
||||||
|
|
||||||
|
- To specify your own channels to be followed on first run
|
||||||
|
`AUTO_FOLLOW_URLS=lbry://@chan#123...a lbry://@chan2#456...a`
|
||||||
|
|
||||||
- If you want to customize the homepage content
|
- If you want to customize the homepage content
|
||||||
|
|
||||||
1. add `CUSTOM_HOMEPAGE=true` to the '.env' file
|
1. add `CUSTOM_HOMEPAGE=true` to the '.env' file
|
||||||
|
|
|
@ -21,6 +21,7 @@ const config = {
|
||||||
OG_IMAGE_URL: process.env.OG_IMAGE_URL,
|
OG_IMAGE_URL: process.env.OG_IMAGE_URL,
|
||||||
SITE_CANONICAL_URL: process.env.SITE_CANONICAL_URL,
|
SITE_CANONICAL_URL: process.env.SITE_CANONICAL_URL,
|
||||||
DEFAULT_LANGUAGE: process.env.DEFAULT_LANGUAGE,
|
DEFAULT_LANGUAGE: process.env.DEFAULT_LANGUAGE,
|
||||||
|
AUTO_FOLLOW_CHANNELS: process.env.AUTO_FOLLOW_CHANNELS,
|
||||||
|
|
||||||
PINNED_URI_1: process.env.PINNED_URI_1,
|
PINNED_URI_1: process.env.PINNED_URI_1,
|
||||||
PINNED_LABEL_1: process.env.PINNED_LABEL_1,
|
PINNED_LABEL_1: process.env.PINNED_LABEL_1,
|
||||||
|
|
|
@ -6,6 +6,7 @@ import Nag from 'component/common/nag';
|
||||||
import { parseURI } from 'lbry-redux';
|
import { parseURI } from 'lbry-redux';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import Card from 'component/common/card';
|
import Card from 'component/common/card';
|
||||||
|
import { AUTO_FOLLOW_CHANNELS } from 'config';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
subscribedChannels: Array<Subscription>,
|
subscribedChannels: Array<Subscription>,
|
||||||
|
@ -14,8 +15,7 @@ type Props = {
|
||||||
channelSubscribe: (sub: Subscription) => void,
|
channelSubscribe: (sub: Subscription) => void,
|
||||||
};
|
};
|
||||||
|
|
||||||
const LBRY_URI = 'lbry://@lbry#3fda836a92faaceedfe398225fb9b2ee2ed1f01a';
|
const channelsToSubscribe = AUTO_FOLLOW_CHANNELS.trim().split(' ');
|
||||||
const LBRYCAST_URI = 'lbry://@lbrycast#4c29f8b013adea4d5cca1861fb2161d5089613ea';
|
|
||||||
|
|
||||||
function UserChannelFollowIntro(props: Props) {
|
function UserChannelFollowIntro(props: Props) {
|
||||||
const { subscribedChannels, channelSubscribe, onContinue, onBack } = props;
|
const { subscribedChannels, channelSubscribe, onContinue, onBack } = props;
|
||||||
|
@ -23,15 +23,12 @@ function UserChannelFollowIntro(props: Props) {
|
||||||
|
|
||||||
// subscribe to lbry
|
// subscribe to lbry
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
channelsToSubscribe.forEach(c =>
|
||||||
channelSubscribe({
|
channelSubscribe({
|
||||||
channelName: parseURI(LBRY_URI).claimName,
|
channelName: parseURI(c).claimName,
|
||||||
uri: LBRY_URI,
|
uri: c,
|
||||||
});
|
})
|
||||||
|
);
|
||||||
channelSubscribe({
|
|
||||||
channelName: parseURI(LBRYCAST_URI).claimName,
|
|
||||||
uri: LBRYCAST_URI,
|
|
||||||
});
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Add table
Reference in a new issue