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