moar cleanup

This commit is contained in:
Sean Yesmunt 2020-01-02 17:30:58 -05:00
parent 7990a379fc
commit 0b38bb1f1a
10 changed files with 50 additions and 42 deletions

View file

@ -43,7 +43,8 @@ type LogPublishParams = {
channel_claim_id?: string, channel_claim_id?: string,
}; };
let analyticsEnabled: boolean = true; let analyticsEnabled: boolean = isProduction;
const analytics: Analytics = { const analytics: Analytics = {
error: message => { error: message => {
if (analyticsEnabled && isProduction) { if (analyticsEnabled && isProduction) {

View file

@ -147,13 +147,17 @@ const Header = (props: Props) => {
</MenuItem> </MenuItem>
<MenuItem className="menu__link" onSelect={() => history.push(`/$/${PAGES.PUBLISHED}`)}> <MenuItem className="menu__link" onSelect={() => history.push(`/$/${PAGES.PUBLISHED}`)}>
<Icon aria-hidden icon={ICONS.PUBLISH} /> <Icon aria-hidden icon={ICONS.PUBLISH} />
{__('Your Publishes')} {__('Publishes')}
</MenuItem>
<MenuItem className="menu__link" onSelect={() => history.push(`/$/${PAGES.PUBLISHED}`)}>
<Icon aria-hidden icon={ICONS.CHANNEL} />
{__('Channels')}
</MenuItem> </MenuItem>
{/* @if TARGET='app' */} {/* @if TARGET='app' */}
<MenuItem className="menu__link" onSelect={() => history.push(`/$/${PAGES.PUBLISH}`)}> <MenuItem className="menu__link" onSelect={() => history.push(`/$/${PAGES.PUBLISH}`)}>
<Icon aria-hidden icon={ICONS.LIBRARY} /> <Icon aria-hidden icon={ICONS.LIBRARY} />
{__('Your Library')} {__('Library')}
</MenuItem> </MenuItem>
{/* @endif */} {/* @endif */}

View file

@ -98,7 +98,7 @@ function AppRouter(props: Props) {
<PrivateRoute {...props} path={`/$/${PAGES.REWARDS}`} component={RewardsPage} /> <PrivateRoute {...props} path={`/$/${PAGES.REWARDS}`} component={RewardsPage} />
<PrivateRoute {...props} path={`/$/${PAGES.TRANSACTIONS}`} component={TransactionHistoryPage} /> <PrivateRoute {...props} path={`/$/${PAGES.TRANSACTIONS}`} component={TransactionHistoryPage} />
<PrivateRoute {...props} path={`/$/${PAGES.LIBRARY}`} component={LibraryPage} /> <PrivateRoute {...props} path={`/$/${PAGES.LIBRARY}`} component={LibraryPage} />
<PrivateRoute {...props} path={`/$/${PAGES.FOLLOWING}`} component={FollowingPage} /> <PrivateRoute {...props} path={`/$/${PAGES.TAGS_FOLLOWING_MANAGE}`} component={FollowingPage} />
<PrivateRoute {...props} path={`/$/${PAGES.BLOCKED}`} component={ListBlockedPage} /> <PrivateRoute {...props} path={`/$/${PAGES.BLOCKED}`} component={ListBlockedPage} />
<PrivateRoute {...props} path={`/$/${PAGES.WALLET}`} exact component={WalletPage} /> <PrivateRoute {...props} path={`/$/${PAGES.WALLET}`} exact component={WalletPage} />
<PrivateRoute {...props} path={`/$/${PAGES.CHANNELS}`} component={ChannelsPage} /> <PrivateRoute {...props} path={`/$/${PAGES.CHANNELS}`} component={ChannelsPage} />

View file

@ -21,9 +21,9 @@ exports.SEARCH = 'search';
exports.TRANSACTIONS = 'transactions'; exports.TRANSACTIONS = 'transactions';
exports.TAGS = 'tags'; exports.TAGS = 'tags';
exports.TAGS_FOLLOWING = 'following/tags'; exports.TAGS_FOLLOWING = 'following/tags';
exports.TAGS_FOLLOWING_MANAGE = 'following/tags/manage';
exports.CHANNELS_FOLLOWING = 'following/channels'; exports.CHANNELS_FOLLOWING = 'following/channels';
exports.CHANNELS_FOLLOWING_MANAGE = 'following/channels/manage'; exports.CHANNELS_FOLLOWING_MANAGE = 'following/channels/manage';
exports.FOLLOWING = 'following';
exports.WALLET = 'wallet'; exports.WALLET = 'wallet';
exports.BLOCKED = 'blocked'; exports.BLOCKED = 'blocked';
exports.CHANNELS = 'channels'; exports.CHANNELS = 'channels';

View file

@ -163,6 +163,8 @@ function ChannelPage(props: Props) {
return ( return (
<Page> <Page>
<ClaimUri uri={uri} />
<div className="card"> <div className="card">
<header className="channel-cover"> <header className="channel-cover">
<div className="channel__quick-actions"> <div className="channel__quick-actions">
@ -212,7 +214,6 @@ function ChannelPage(props: Props) {
<Button button="alt" title={__('Edit')} onClick={() => setEditing(!editing)} icon={ICONS.EDIT} /> <Button button="alt" title={__('Edit')} onClick={() => setEditing(!editing)} icon={ICONS.EDIT} />
)} )}
<div className="channel__meta"> <div className="channel__meta">
<ClaimUri uri={uri} inline />
<span> <span>
{subCount} {subCount !== 1 ? __('Followers') : __('Follower')} {subCount} {subCount !== 1 ? __('Followers') : __('Follower')}
<HelpLink href="https://lbry.com/faq/views" /> <HelpLink href="https://lbry.com/faq/views" />

View file

@ -24,7 +24,7 @@ function FollowingPage(props: Props) {
const viewingSuggestedSubs = urlParams.get('view') || !hasSubscriptions; const viewingSuggestedSubs = urlParams.get('view') || !hasSubscriptions;
function onClick() { function onClick() {
let url = `/$/${PAGES.FOLLOWING}`; let url = `/$/${PAGES.TAGS_FOLLOWING_MANAGE}`;
if (!viewingSuggestedSubs) { if (!viewingSuggestedSubs) {
url += '?view=discover'; url += '?view=discover';
} }

View file

@ -60,7 +60,6 @@ export default function SearchPage(props: Props) {
</header> </header>
)} )}
<div className="card">
<ClaimList <ClaimList
uris={uris} uris={uris}
loading={isSearching} loading={isSearching}
@ -83,7 +82,7 @@ export default function SearchPage(props: Props) {
</Fragment> </Fragment>
} }
/> />
</div>
<div className="help">{__('These search results are provided by LBRY, Inc.')}</div> <div className="help">{__('These search results are provided by LBRY, Inc.')}</div>
</Fragment> </Fragment>
)} )}

View file

@ -7,6 +7,7 @@ import Button from 'component/button';
import useHover from 'effects/use-hover'; import useHover from 'effects/use-hover';
import analytics from 'analytics'; import analytics from 'analytics';
import HiddenNsfw from 'component/common/hidden-nsfw'; import HiddenNsfw from 'component/common/hidden-nsfw';
import Icon from 'component/common/icon';
type Props = { type Props = {
location: { search: string }, location: { search: string },
@ -46,6 +47,12 @@ function TagsPage(props: Props) {
return ( return (
<Page> <Page>
<ClaimListDiscover <ClaimListDiscover
headerLabel={
<span>
<Icon icon={ICONS.TAG} size={10} />
{tag}
</span>
}
tags={tags} tags={tags}
hiddenNsfwMessage={<HiddenNsfw type="page" />} hiddenNsfwMessage={<HiddenNsfw type="page" />}
meta={ meta={

View file

@ -35,7 +35,7 @@ function DiscoverPage(props: Props) {
icon={ICONS.EDIT} icon={ICONS.EDIT}
label={__('Manage')} label={__('Manage')}
requiresAuth={IS_WEB} requiresAuth={IS_WEB}
navigate={`/$/${PAGES.FOLLOWING}`} navigate={`/$/${PAGES.TAGS_FOLLOWING_MANAGE}`}
/> />
} }
/> />

View file

@ -6,33 +6,29 @@
.claim-list__header { .claim-list__header {
display: flex; display: flex;
flex-wrap: wrap;
align-items: center; align-items: center;
min-height: 3rem;
margin: var(--spacing-medium) 0; margin: var(--spacing-medium) 0;
margin-top: 0; margin-top: 0;
font-size: var(--font-body); font-size: var(--font-body);
fieldset-section { .spinner {
margin-top: 0; margin-left: var(--spacing-medium);
margin-bottom: 0;
} }
} }
.claim-list__header--small { .claim-list__header--small {
min-height: 0;
color: var(--color-text-subtitle); color: var(--color-text-subtitle);
} }
.claim-list__dropdown { .claim-list__dropdown {
padding: 0 var(--spacing-medium); padding: 0 var(--spacing-medium);
padding-right: var(--spacing-large);
margin-bottom: 0;
margin-left: var(--spacing-medium); margin-left: var(--spacing-medium);
margin-right: var(--spacing-medium);
@media (max-width: $breakpoint-small) { @media (max-width: $breakpoint-small) {
font-size: var(--font-small); margin-top: var(--spacing-small);
padding: 0 var(--spacing-small); margin-left: 0;
padding-right: var(--spacing-large);
} }
} }