onboarding updates
This commit is contained in:
parent
9d78fbb62d
commit
7954c1d5d0
6 changed files with 53 additions and 6 deletions
21
dist/bundle.es.js
vendored
21
dist/bundle.es.js
vendored
|
@ -669,7 +669,9 @@ const Lbry = {
|
|||
isConnected: false,
|
||||
connectPromise: null,
|
||||
daemonConnectionString: 'http://localhost:5279',
|
||||
apiRequestHeaders: { 'Content-Type': 'application/json-rpc' },
|
||||
apiRequestHeaders: {
|
||||
'Content-Type': 'application/json-rpc'
|
||||
},
|
||||
|
||||
// Allow overriding daemon connection string (e.g. to `/api/proxy` for lbryweb)
|
||||
setDaemonConnectionString: value => {
|
||||
|
@ -3803,6 +3805,11 @@ reducers[CREATE_CHANNEL_COMPLETED] = (state, action) => {
|
|||
creatingChannel: false
|
||||
});
|
||||
};
|
||||
// reducers[ACTIONS.failedifeiowejiowfeiowef] = (state: State, action: any): State => {
|
||||
// return Object.assign({}, state, {
|
||||
// creatingChannel: false,
|
||||
// });
|
||||
// };
|
||||
|
||||
reducers[UPDATE_CHANNEL_STARTED] = (state, action) => {
|
||||
return Object.assign({}, state, {
|
||||
|
@ -4430,7 +4437,7 @@ function getDefaultKnownTags() {
|
|||
}
|
||||
|
||||
const defaultState$8 = {
|
||||
followedTags: DEFAULT_FOLLOWED_TAGS,
|
||||
followedTags: [],
|
||||
knownTags: getDefaultKnownTags()
|
||||
};
|
||||
|
||||
|
@ -4476,6 +4483,11 @@ const tagsReducer = handleActions({
|
|||
knownTags: newKnownTags,
|
||||
followedTags: newFollowedTags
|
||||
});
|
||||
},
|
||||
USER_SETTINGS_POPULATE: (state, action) => {
|
||||
return _extends$c({}, state, {
|
||||
followedTags: action.data && action.data.app && action.data.app.tags || []
|
||||
});
|
||||
}
|
||||
}, defaultState$8);
|
||||
|
||||
|
@ -4845,6 +4857,10 @@ const selectUnfollowedTags = reselect.createSelector(selectKnownTagsByName, sele
|
|||
return tagsToReturn;
|
||||
});
|
||||
|
||||
const makeSelectIsFollowingTag = tag => reselect.createSelector(selectFollowedTags, followedTags => {
|
||||
return followedTags.some(followedTag => followedTag.name === tag.toLowerCase());
|
||||
});
|
||||
|
||||
//
|
||||
|
||||
const selectState$a = state => state.blocked || {};
|
||||
|
@ -4964,6 +4980,7 @@ exports.makeSelectFileInfoForUri = makeSelectFileInfoForUri;
|
|||
exports.makeSelectFileNameForUri = makeSelectFileNameForUri;
|
||||
exports.makeSelectFilePartlyDownloaded = makeSelectFilePartlyDownloaded;
|
||||
exports.makeSelectFirstRecommendedFileForUri = makeSelectFirstRecommendedFileForUri;
|
||||
exports.makeSelectIsFollowingTag = makeSelectIsFollowingTag;
|
||||
exports.makeSelectIsUriResolving = makeSelectIsUriResolving;
|
||||
exports.makeSelectLoadingForUri = makeSelectLoadingForUri;
|
||||
exports.makeSelectMediaTypeForUri = makeSelectMediaTypeForUri;
|
||||
|
|
|
@ -282,7 +282,11 @@ export {
|
|||
selectTransactionListFilter,
|
||||
} from 'redux/selectors/wallet';
|
||||
|
||||
export { selectFollowedTags, selectUnfollowedTags } from 'redux/selectors/tags';
|
||||
export {
|
||||
selectFollowedTags,
|
||||
selectUnfollowedTags,
|
||||
makeSelectIsFollowingTag,
|
||||
} from 'redux/selectors/tags';
|
||||
|
||||
export {
|
||||
selectBlockedChannels,
|
||||
|
|
|
@ -11,7 +11,9 @@ const Lbry: LbryTypes = {
|
|||
isConnected: false,
|
||||
connectPromise: null,
|
||||
daemonConnectionString: 'http://localhost:5279',
|
||||
apiRequestHeaders: { 'Content-Type': 'application/json-rpc' },
|
||||
apiRequestHeaders: {
|
||||
'Content-Type': 'application/json-rpc',
|
||||
},
|
||||
|
||||
// Allow overriding daemon connection string (e.g. to `/api/proxy` for lbryweb)
|
||||
setDaemonConnectionString: (value: string) => {
|
||||
|
|
|
@ -303,6 +303,11 @@ reducers[ACTIONS.CREATE_CHANNEL_COMPLETED] = (state: State, action: any): State
|
|||
creatingChannel: false,
|
||||
});
|
||||
};
|
||||
// reducers[ACTIONS.failedifeiowejiowfeiowef] = (state: State, action: any): State => {
|
||||
// return Object.assign({}, state, {
|
||||
// creatingChannel: false,
|
||||
// });
|
||||
// };
|
||||
|
||||
reducers[ACTIONS.UPDATE_CHANNEL_STARTED] = (state: State, action: any): State => {
|
||||
return Object.assign({}, state, {
|
||||
|
|
|
@ -14,7 +14,7 @@ function getDefaultKnownTags() {
|
|||
}
|
||||
|
||||
const defaultState: TagState = {
|
||||
followedTags: DEFAULT_FOLLOWED_TAGS,
|
||||
followedTags: [],
|
||||
knownTags: getDefaultKnownTags(),
|
||||
};
|
||||
|
||||
|
@ -65,6 +65,15 @@ export const tagsReducer = handleActions(
|
|||
followedTags: newFollowedTags,
|
||||
};
|
||||
},
|
||||
USER_SETTINGS_POPULATE: (
|
||||
state: TagState,
|
||||
action: { data: { app: { tags: Array<string> } } }
|
||||
) => {
|
||||
return {
|
||||
...state,
|
||||
followedTags: (action.data && action.data.app && action.data.app.tags) || [],
|
||||
};
|
||||
},
|
||||
},
|
||||
defaultState
|
||||
);
|
||||
|
|
|
@ -16,7 +16,9 @@ export const selectFollowedTagsList = createSelector(
|
|||
export const selectFollowedTags = createSelector(
|
||||
selectFollowedTagsList,
|
||||
(followedTags: Array<string>): Array<Tag> =>
|
||||
followedTags.map(tag => ({ name: tag.toLowerCase() })).sort((a, b) => a.name.localeCompare(b.name))
|
||||
followedTags
|
||||
.map(tag => ({ name: tag.toLowerCase() }))
|
||||
.sort((a, b) => a.name.localeCompare(b.name))
|
||||
);
|
||||
|
||||
export const selectUnfollowedTags = createSelector(
|
||||
|
@ -36,3 +38,11 @@ export const selectUnfollowedTags = createSelector(
|
|||
return tagsToReturn;
|
||||
}
|
||||
);
|
||||
|
||||
export const makeSelectIsFollowingTag = (tag: string) =>
|
||||
createSelector(
|
||||
selectFollowedTags,
|
||||
followedTags => {
|
||||
return followedTags.some(followedTag => followedTag.name === tag.toLowerCase());
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue