enable 'discover' page for everyone
This commit is contained in:
parent
eadf2f9a45
commit
3b6882412a
7 changed files with 44 additions and 45 deletions
|
@ -2,6 +2,7 @@
|
|||
.*\.typeface\.json
|
||||
.*/node_modules/findup/.*
|
||||
|
||||
|
||||
[include]
|
||||
|
||||
[libs]
|
||||
|
|
|
@ -28,7 +28,7 @@ if (isProduction) {
|
|||
type Analytics = {
|
||||
error: string => Promise<any>,
|
||||
sentryError: ({} | string, {}) => Promise<any>,
|
||||
pageView: string => void,
|
||||
pageView: (string, ?string) => void,
|
||||
setUser: Object => void,
|
||||
toggleInternal: (boolean, ?boolean) => void,
|
||||
apiLogView: (string, string, string, ?number, ?() => void) => Promise<any>,
|
||||
|
@ -97,7 +97,7 @@ const analytics: Analytics = {
|
|||
},
|
||||
pageView: (path, search) => {
|
||||
if (internalAnalyticsEnabled) {
|
||||
const params = { href: `${path}` };
|
||||
const params: { href: string, customDimensions?: Array<{ id: number, value: ?string }> } = { href: `${path}` };
|
||||
const dimensions = [];
|
||||
const searchParams = search && new URLSearchParams(search);
|
||||
|
||||
|
|
|
@ -28,6 +28,12 @@ const RECENT_FROM_FOLLOWING = {
|
|||
icon: ICONS.SUBSCRIBE,
|
||||
};
|
||||
|
||||
const DISCOVER = {
|
||||
title: 'Discover',
|
||||
link: `/$/${PAGES.DISCOVER}`,
|
||||
icon: ICONS.DISCOVER,
|
||||
};
|
||||
|
||||
type Props = {
|
||||
subscriptions: Array<Subscription>,
|
||||
followedTags: Array<Tag>,
|
||||
|
@ -73,25 +79,23 @@ function SideNavigation(props: Props) {
|
|||
|
||||
const { EXTRA_SIDEBAR_LINKS } = homepageData;
|
||||
|
||||
const FULL_LINKS: Array<SideNavLink> = [
|
||||
{
|
||||
title: 'Your Tags',
|
||||
link: `/$/${PAGES.TAGS_FOLLOWING}`,
|
||||
icon: ICONS.TAG,
|
||||
hideForUnauth: true,
|
||||
},
|
||||
{
|
||||
title: 'Discover',
|
||||
link: `/$/${PAGES.DISCOVER}`,
|
||||
icon: ICONS.DISCOVER,
|
||||
},
|
||||
{
|
||||
title: IS_WEB ? 'Purchased' : 'Library',
|
||||
link: `/$/${PAGES.LIBRARY}`,
|
||||
icon: ICONS.PURCHASED,
|
||||
hideForUnauth: true,
|
||||
},
|
||||
];
|
||||
const FULL_LINKS: Array<SideNavLink> = SIMPLE_SITE
|
||||
? [DISCOVER]
|
||||
: [
|
||||
{
|
||||
title: 'Your Tags',
|
||||
link: `/$/${PAGES.TAGS_FOLLOWING}`,
|
||||
icon: ICONS.TAG,
|
||||
hideForUnauth: true,
|
||||
},
|
||||
DISCOVER,
|
||||
{
|
||||
title: IS_WEB ? 'Purchased' : 'Library',
|
||||
link: `/$/${PAGES.LIBRARY}`,
|
||||
icon: ICONS.PURCHASED,
|
||||
hideForUnauth: true,
|
||||
},
|
||||
];
|
||||
|
||||
const MOBILE_LINKS: Array<SideNavLink> = [
|
||||
{
|
||||
|
@ -226,11 +230,8 @@ function SideNavigation(props: Props) {
|
|||
|
||||
SIDE_LINKS.push(HOME);
|
||||
SIDE_LINKS.push(RECENT_FROM_FOLLOWING);
|
||||
SIDE_LINKS.push(...FULL_LINKS);
|
||||
|
||||
if (!SIMPLE_SITE) {
|
||||
SIDE_LINKS.push(...FULL_LINKS);
|
||||
}
|
||||
// $FlowFixMe
|
||||
if (EXTRA_SIDEBAR_LINKS) {
|
||||
SIDE_LINKS.push(...EXTRA_SIDEBAR_LINKS);
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
import { makeSelectNotificationForCommentId } from 'redux/selectors/notifications';
|
||||
|
||||
export function doCommentList(uri: string, page: number = 1, pageSize: number = 99999) {
|
||||
return (dispatch: Dispatch<*>, getState: GetState) => {
|
||||
return (dispatch: Dispatch, getState: GetState) => {
|
||||
const state = getState();
|
||||
const claim = selectClaimsByUri(state)[uri];
|
||||
const claimId = claim ? claim.claim_id : null;
|
||||
|
@ -50,7 +50,7 @@ export function doCommentList(uri: string, page: number = 1, pageSize: number =
|
|||
}
|
||||
|
||||
export function doSetCommentChannel(channelName: string) {
|
||||
return (dispatch: Dispatch<*>) => {
|
||||
return (dispatch: Dispatch) => {
|
||||
dispatch({
|
||||
type: ACTIONS.COMMENT_SET_CHANNEL,
|
||||
data: channelName,
|
||||
|
@ -59,7 +59,7 @@ export function doSetCommentChannel(channelName: string) {
|
|||
}
|
||||
|
||||
export function doCommentReactList(uri: string | null, commentId?: string) {
|
||||
return (dispatch: Dispatch<*>, getState: GetState) => {
|
||||
return (dispatch: Dispatch, getState: GetState) => {
|
||||
const state = getState();
|
||||
const channel = selectCommentChannel(state);
|
||||
const commentIds = uri ? makeSelectCommentIdsForUri(uri)(state) : [commentId];
|
||||
|
@ -100,7 +100,7 @@ export function doCommentReactList(uri: string | null, commentId?: string) {
|
|||
}
|
||||
|
||||
export function doCommentReact(commentId: string, type: string) {
|
||||
return (dispatch: Dispatch<*>, getState: GetState) => {
|
||||
return (dispatch: Dispatch, getState: GetState) => {
|
||||
const state = getState();
|
||||
const channel = selectCommentChannel(state);
|
||||
const pendingReacts = selectPendingCommentReacts(state);
|
||||
|
@ -204,7 +204,7 @@ export function doCommentCreate(
|
|||
parent_id?: string,
|
||||
uri: string
|
||||
) {
|
||||
return (dispatch: Dispatch<*>, getState: GetState) => {
|
||||
return (dispatch: Dispatch, getState: GetState) => {
|
||||
const state = getState();
|
||||
dispatch({
|
||||
type: ACTIONS.COMMENT_CREATE_STARTED,
|
||||
|
@ -268,7 +268,7 @@ export function doCommentCreate(
|
|||
}
|
||||
|
||||
export function doCommentHide(comment_id: string) {
|
||||
return (dispatch: Dispatch<*>) => {
|
||||
return (dispatch: Dispatch) => {
|
||||
dispatch({
|
||||
type: ACTIONS.COMMENT_HIDE_STARTED,
|
||||
});
|
||||
|
@ -297,7 +297,7 @@ export function doCommentHide(comment_id: string) {
|
|||
}
|
||||
|
||||
export function doCommentPin(commentId: string, remove: boolean) {
|
||||
return (dispatch: Dispatch<*>, getState: GetState) => {
|
||||
return (dispatch: Dispatch, getState: GetState) => {
|
||||
const state = getState();
|
||||
// const channel = localStorage.getItem('comment-channel');
|
||||
const channel = selectCommentChannel(state);
|
||||
|
@ -347,7 +347,7 @@ export function doCommentPin(commentId: string, remove: boolean) {
|
|||
}
|
||||
|
||||
export function doCommentAbandon(comment_id: string) {
|
||||
return (dispatch: Dispatch<*>) => {
|
||||
return (dispatch: Dispatch) => {
|
||||
dispatch({
|
||||
type: ACTIONS.COMMENT_ABANDON_STARTED,
|
||||
});
|
||||
|
@ -396,7 +396,7 @@ export function doCommentUpdate(comment_id: string, comment: string) {
|
|||
if (comment === '') {
|
||||
return doCommentAbandon(comment_id);
|
||||
} else {
|
||||
return (dispatch: Dispatch<*>) => {
|
||||
return (dispatch: Dispatch) => {
|
||||
dispatch({
|
||||
type: ACTIONS.COMMENT_UPDATE_STARTED,
|
||||
});
|
||||
|
|
|
@ -42,7 +42,7 @@ export function doDismissError() {
|
|||
}
|
||||
|
||||
export function doNotificationList() {
|
||||
return (dispatch: Dispatch<*>) => {
|
||||
return (dispatch: Dispatch) => {
|
||||
dispatch({ type: ACTIONS.NOTIFICATION_LIST_STARTED });
|
||||
return Lbryio.call('notification', 'list', { is_app_readable: true })
|
||||
.then(response => {
|
||||
|
@ -77,7 +77,7 @@ export function doNotificationList() {
|
|||
}
|
||||
|
||||
export function doReadNotifications() {
|
||||
return (dispatch: Dispatch<*>, getState: GetState) => {
|
||||
return (dispatch: Dispatch, getState: GetState) => {
|
||||
const state = getState();
|
||||
const notifications = selectNotifications(state);
|
||||
const unreadNotifications =
|
||||
|
@ -99,7 +99,7 @@ export function doReadNotifications() {
|
|||
}
|
||||
|
||||
export function doSeeNotifications(notificationIds: Array<string>) {
|
||||
return (dispatch: Dispatch<*>) => {
|
||||
return (dispatch: Dispatch) => {
|
||||
dispatch({ type: ACTIONS.NOTIFICATION_SEEN_STARTED });
|
||||
return Lbryio.call('notification', 'edit', { notification_ids: notificationIds.join(','), is_seen: true })
|
||||
.then(() => {
|
||||
|
@ -117,7 +117,7 @@ export function doSeeNotifications(notificationIds: Array<string>) {
|
|||
}
|
||||
|
||||
export function doSeeAllNotifications() {
|
||||
return (dispatch: Dispatch<*>, getState: GetState) => {
|
||||
return (dispatch: Dispatch, getState: GetState) => {
|
||||
const state = getState();
|
||||
const notifications = selectNotifications(state);
|
||||
const unSeenNotifications =
|
||||
|
@ -128,7 +128,7 @@ export function doSeeAllNotifications() {
|
|||
}
|
||||
|
||||
export function doDeleteNotification(notificationId: number) {
|
||||
return (dispatch: Dispatch<*>) => {
|
||||
return (dispatch: Dispatch) => {
|
||||
Lbryio.call('notification', 'delete', { notification_ids: notificationId })
|
||||
.then(() => {
|
||||
dispatch({ type: ACTIONS.NOTIFICATION_DELETE_COMPLETED, data: { notificationId } });
|
||||
|
|
|
@ -15,10 +15,7 @@ import { push } from 'connected-react-router';
|
|||
import analytics from 'analytics';
|
||||
import { doOpenModal } from 'redux/actions/app';
|
||||
|
||||
export const doPublishDesktop = (filePath: string, preview?: boolean) => (
|
||||
dispatch: Dispatch<*>,
|
||||
getState: () => {}
|
||||
) => {
|
||||
export const doPublishDesktop = (filePath: string, preview?: boolean) => (dispatch: Dispatch, getState: () => {}) => {
|
||||
const publishPreview = previewResponse => {
|
||||
dispatch(
|
||||
doOpenModal(MODALS.PUBLISH_PREVIEW, {
|
||||
|
|
|
@ -7421,9 +7421,9 @@ lbry-redux@lbryio/lbry-redux#70c52e42e8b918e60b8f12b36748e1aef8908c39:
|
|||
reselect "^3.0.0"
|
||||
uuid "^8.3.1"
|
||||
|
||||
lbryinc@lbryio/lbryinc#57b8625454caf6ff295633819fbcfd213aa83e01:
|
||||
lbryinc@lbryio/lbryinc#eee2cb730ecec95a1344a755035755b0d4dad5cf:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/57b8625454caf6ff295633819fbcfd213aa83e01"
|
||||
resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/eee2cb730ecec95a1344a755035755b0d4dad5cf"
|
||||
dependencies:
|
||||
reselect "^3.0.0"
|
||||
|
||||
|
|
Loading…
Reference in a new issue