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,
|
isConnected: false,
|
||||||
connectPromise: null,
|
connectPromise: null,
|
||||||
daemonConnectionString: 'http://localhost:5279',
|
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)
|
// Allow overriding daemon connection string (e.g. to `/api/proxy` for lbryweb)
|
||||||
setDaemonConnectionString: value => {
|
setDaemonConnectionString: value => {
|
||||||
|
@ -3803,6 +3805,11 @@ reducers[CREATE_CHANNEL_COMPLETED] = (state, action) => {
|
||||||
creatingChannel: false
|
creatingChannel: false
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// reducers[ACTIONS.failedifeiowejiowfeiowef] = (state: State, action: any): State => {
|
||||||
|
// return Object.assign({}, state, {
|
||||||
|
// creatingChannel: false,
|
||||||
|
// });
|
||||||
|
// };
|
||||||
|
|
||||||
reducers[UPDATE_CHANNEL_STARTED] = (state, action) => {
|
reducers[UPDATE_CHANNEL_STARTED] = (state, action) => {
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
|
@ -4430,7 +4437,7 @@ function getDefaultKnownTags() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultState$8 = {
|
const defaultState$8 = {
|
||||||
followedTags: DEFAULT_FOLLOWED_TAGS,
|
followedTags: [],
|
||||||
knownTags: getDefaultKnownTags()
|
knownTags: getDefaultKnownTags()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4476,6 +4483,11 @@ const tagsReducer = handleActions({
|
||||||
knownTags: newKnownTags,
|
knownTags: newKnownTags,
|
||||||
followedTags: newFollowedTags
|
followedTags: newFollowedTags
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
USER_SETTINGS_POPULATE: (state, action) => {
|
||||||
|
return _extends$c({}, state, {
|
||||||
|
followedTags: action.data && action.data.app && action.data.app.tags || []
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}, defaultState$8);
|
}, defaultState$8);
|
||||||
|
|
||||||
|
@ -4845,6 +4857,10 @@ const selectUnfollowedTags = reselect.createSelector(selectKnownTagsByName, sele
|
||||||
return tagsToReturn;
|
return tagsToReturn;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const makeSelectIsFollowingTag = tag => reselect.createSelector(selectFollowedTags, followedTags => {
|
||||||
|
return followedTags.some(followedTag => followedTag.name === tag.toLowerCase());
|
||||||
|
});
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
const selectState$a = state => state.blocked || {};
|
const selectState$a = state => state.blocked || {};
|
||||||
|
@ -4964,6 +4980,7 @@ exports.makeSelectFileInfoForUri = makeSelectFileInfoForUri;
|
||||||
exports.makeSelectFileNameForUri = makeSelectFileNameForUri;
|
exports.makeSelectFileNameForUri = makeSelectFileNameForUri;
|
||||||
exports.makeSelectFilePartlyDownloaded = makeSelectFilePartlyDownloaded;
|
exports.makeSelectFilePartlyDownloaded = makeSelectFilePartlyDownloaded;
|
||||||
exports.makeSelectFirstRecommendedFileForUri = makeSelectFirstRecommendedFileForUri;
|
exports.makeSelectFirstRecommendedFileForUri = makeSelectFirstRecommendedFileForUri;
|
||||||
|
exports.makeSelectIsFollowingTag = makeSelectIsFollowingTag;
|
||||||
exports.makeSelectIsUriResolving = makeSelectIsUriResolving;
|
exports.makeSelectIsUriResolving = makeSelectIsUriResolving;
|
||||||
exports.makeSelectLoadingForUri = makeSelectLoadingForUri;
|
exports.makeSelectLoadingForUri = makeSelectLoadingForUri;
|
||||||
exports.makeSelectMediaTypeForUri = makeSelectMediaTypeForUri;
|
exports.makeSelectMediaTypeForUri = makeSelectMediaTypeForUri;
|
||||||
|
|
|
@ -282,7 +282,11 @@ export {
|
||||||
selectTransactionListFilter,
|
selectTransactionListFilter,
|
||||||
} from 'redux/selectors/wallet';
|
} from 'redux/selectors/wallet';
|
||||||
|
|
||||||
export { selectFollowedTags, selectUnfollowedTags } from 'redux/selectors/tags';
|
export {
|
||||||
|
selectFollowedTags,
|
||||||
|
selectUnfollowedTags,
|
||||||
|
makeSelectIsFollowingTag,
|
||||||
|
} from 'redux/selectors/tags';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
selectBlockedChannels,
|
selectBlockedChannels,
|
||||||
|
|
|
@ -11,7 +11,9 @@ const Lbry: LbryTypes = {
|
||||||
isConnected: false,
|
isConnected: false,
|
||||||
connectPromise: null,
|
connectPromise: null,
|
||||||
daemonConnectionString: 'http://localhost:5279',
|
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)
|
// Allow overriding daemon connection string (e.g. to `/api/proxy` for lbryweb)
|
||||||
setDaemonConnectionString: (value: string) => {
|
setDaemonConnectionString: (value: string) => {
|
||||||
|
|
|
@ -303,6 +303,11 @@ reducers[ACTIONS.CREATE_CHANNEL_COMPLETED] = (state: State, action: any): State
|
||||||
creatingChannel: false,
|
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 => {
|
reducers[ACTIONS.UPDATE_CHANNEL_STARTED] = (state: State, action: any): State => {
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
|
|
|
@ -14,7 +14,7 @@ function getDefaultKnownTags() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultState: TagState = {
|
const defaultState: TagState = {
|
||||||
followedTags: DEFAULT_FOLLOWED_TAGS,
|
followedTags: [],
|
||||||
knownTags: getDefaultKnownTags(),
|
knownTags: getDefaultKnownTags(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -65,6 +65,15 @@ export const tagsReducer = handleActions(
|
||||||
followedTags: newFollowedTags,
|
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
|
defaultState
|
||||||
);
|
);
|
||||||
|
|
|
@ -16,7 +16,9 @@ export const selectFollowedTagsList = createSelector(
|
||||||
export const selectFollowedTags = createSelector(
|
export const selectFollowedTags = createSelector(
|
||||||
selectFollowedTagsList,
|
selectFollowedTagsList,
|
||||||
(followedTags: Array<string>): Array<Tag> =>
|
(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(
|
export const selectUnfollowedTags = createSelector(
|
||||||
|
@ -36,3 +38,11 @@ export const selectUnfollowedTags = createSelector(
|
||||||
return tagsToReturn;
|
return tagsToReturn;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const makeSelectIsFollowingTag = (tag: string) =>
|
||||||
|
createSelector(
|
||||||
|
selectFollowedTags,
|
||||||
|
followedTags => {
|
||||||
|
return followedTags.some(followedTag => followedTag.name === tag.toLowerCase());
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue