fixes around follow discover page, ads .env and dev mode titlebar

This commit is contained in:
zeppi 2021-10-16 00:58:54 -04:00 committed by jessopb
parent d405ff5ffb
commit 9306971620
3 changed files with 33 additions and 29 deletions

View file

@ -78,7 +78,7 @@ SIMPLE_SITE=false
#BRANDED_SITE #BRANDED_SITE
ENABLE_COMMENT_REACTIONS=true ENABLE_COMMENT_REACTIONS=true
ENABLE_FILE_REACTIONS=false ENABLE_FILE_REACTIONS=true
ENABLE_CREATOR_REACTIONS=false ENABLE_CREATOR_REACTIONS=false
ENABLE_NO_SOURCE_CLAIMS=false ENABLE_NO_SOURCE_CLAIMS=false
ENABLE_PREROLL_ADS=false ENABLE_PREROLL_ADS=false
@ -88,7 +88,7 @@ WEB_PUBLISH_SIZE_LIMIT_GB=4
LOADING_BAR_COLOR=#2bbb90 LOADING_BAR_COLOR=#2bbb90
LIGHTHOUSE_DEFAULT_TYPES=audio,video,text,image,application LIGHTHOUSE_DEFAULT_TYPES=audio,video,text,image,application
SHOW_ADS=true SHOW_ADS=false
## SIMPLE_SITE REPLACEMENTS ## SIMPLE_SITE REPLACEMENTS
ENABLE_MATURE=true ENABLE_MATURE=true

View file

@ -76,7 +76,7 @@ function ClaimListHeader(props: Props) {
const channelIdsInUrl = urlParams.get(CS.CHANNEL_IDS_KEY); const channelIdsInUrl = urlParams.get(CS.CHANNEL_IDS_KEY);
const channelIdsParam = channelIdsInUrl ? channelIdsInUrl.split(',') : channelIds; const channelIdsParam = channelIdsInUrl ? channelIdsInUrl.split(',') : channelIds;
const feeAmountParam = urlParams.get('fee_amount') || feeAmount || CS.FEE_AMOUNT_ANY; const feeAmountParam = urlParams.get('fee_amount') || feeAmount || CS.FEE_AMOUNT_ANY;
const showDuration = !(claimType && claimType === CS.CLAIM_CHANNEL && claimType === CS.CLAIM_COLLECTION); const showDuration = !claimType || (claimType && claimType !== CS.CLAIM_CHANNEL && claimType !== CS.CLAIM_COLLECTION);
const isFiltered = () => const isFiltered = () =>
Boolean( Boolean(
urlParams.get(CS.FRESH_KEY) || urlParams.get(CS.FRESH_KEY) ||
@ -360,7 +360,7 @@ function ClaimListHeader(props: Props) {
)} )}
{/* LANGUAGE FIELD */} {/* LANGUAGE FIELD */}
{!claimType && ( {
<div <div
className={classnames('claim-search__input-container', { className={classnames('claim-search__input-container', {
'claim-search__input-container--selected': shouldHighlight, 'claim-search__input-container--selected': shouldHighlight,
@ -394,7 +394,7 @@ function ClaimListHeader(props: Props) {
})} })}
</FormField> </FormField>
</div> </div>
)} }
{/* DURATIONS FIELD */} {/* DURATIONS FIELD */}
{showDuration && ( {showDuration && (
@ -434,30 +434,31 @@ function ClaimListHeader(props: Props) {
)} )}
{/* PAID FIELD */} {/* PAID FIELD */}
<div className={'claim-search__input-container'}> {claimType !== CS.CLAIM_CHANNEL && (
<FormField <div className={'claim-search__input-container'}>
className={classnames('claim-search__dropdown', { <FormField
'claim-search__dropdown--selected': className={classnames('claim-search__dropdown', {
feeAmountParam === CS.FEE_AMOUNT_ONLY_FREE || feeAmountParam === CS.FEE_AMOUNT_ONLY_PAID, 'claim-search__dropdown--selected':
})} feeAmountParam === CS.FEE_AMOUNT_ONLY_FREE || feeAmountParam === CS.FEE_AMOUNT_ONLY_PAID,
label={__('Price')} })}
type="select" label={__('Price')}
name="paidcontent" type="select"
value={feeAmountParam} name="paidcontent"
onChange={(e) => value={feeAmountParam}
handleChange({ onChange={(e) =>
key: CS.FEE_AMOUNT_KEY, handleChange({
value: e.target.value, key: CS.FEE_AMOUNT_KEY,
}) value: e.target.value,
} })
> }
<option value={CS.FEE_AMOUNT_ANY}>{__('Any')}</option> >
<option value={CS.FEE_AMOUNT_ONLY_FREE}>{__('Free')}</option> <option value={CS.FEE_AMOUNT_ANY}>{__('Any')}</option>
<option value={CS.FEE_AMOUNT_ONLY_PAID}>{__('Paid')}</option> <option value={CS.FEE_AMOUNT_ONLY_FREE}>{__('Free')}</option>
))} <option value={CS.FEE_AMOUNT_ONLY_PAID}>{__('Paid')}</option>
</FormField> ))}
</div> </FormField>
</div>
)}
{/* SORT FIELD */} {/* SORT FIELD */}
{orderParam === CS.ORDER_BY_NEW && ( {orderParam === CS.ORDER_BY_NEW && (
<div className={'claim-search__input-container'}> <div className={'claim-search__input-container'}>

View file

@ -191,6 +191,9 @@ function AppRouter(props: Props) {
useEffect(() => { useEffect(() => {
const getDefaultTitle = (pathname: string) => { const getDefaultTitle = (pathname: string) => {
const title = pathname.startsWith('/$/') ? PAGE_TITLE[pathname.substring(3)] : ''; const title = pathname.startsWith('/$/') ? PAGE_TITLE[pathname.substring(3)] : '';
if (process.env.NODE_ENV !== 'production') {
return uri || pathname || title;
}
return __(title) || (IS_WEB ? SITE_TITLE : 'LBRY'); return __(title) || (IS_WEB ? SITE_TITLE : 'LBRY');
}; };