fix: tag params on tags page
This commit is contained in:
parent
6e59e5b1b3
commit
ef2fb47b39
4 changed files with 16 additions and 14 deletions
|
@ -119,7 +119,7 @@
|
|||
"jsmediatags": "^3.8.1",
|
||||
"json-loader": "^0.5.4",
|
||||
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
||||
"lbry-redux": "lbryio/lbry-redux#fceb9747e10f6f6622e34580baf12c0521616407",
|
||||
"lbry-redux": "lbryio/lbry-redux#291324d03f694c4fefa6967aa7be02d9245596a8",
|
||||
"lbryinc": "lbryio/lbryinc#43d382d9b74d396a581a74d87e4c53105e04f845",
|
||||
"lint-staged": "^7.0.2",
|
||||
"localforage": "^1.7.1",
|
||||
|
|
|
@ -10,14 +10,14 @@ const TIME_WEEK = 'week';
|
|||
const TIME_MONTH = 'month';
|
||||
const TIME_YEAR = 'year';
|
||||
const TIME_ALL = 'all';
|
||||
const TRENDING_SORT_YOU = 'you';
|
||||
const TRENDING_SORT_ALL = 'everyone';
|
||||
const SEARCH_SORT_YOU = 'you';
|
||||
const SEARCH_SORT_ALL = 'everyone';
|
||||
const TYPE_TRENDING = 'trending';
|
||||
const TYPE_TOP = 'top';
|
||||
const TYPE_NEW = 'new';
|
||||
const TRENDING_FILTER_TYPES = [TRENDING_SORT_YOU, TRENDING_SORT_ALL];
|
||||
const TRENDING_TYPES = ['trending', 'top', 'new'];
|
||||
const TRENDING_TIMES = [TIME_DAY, TIME_WEEK, TIME_MONTH, TIME_YEAR, TIME_ALL];
|
||||
const SEARCH_FILTER_TYPES = [SEARCH_SORT_YOU, SEARCH_SORT_ALL];
|
||||
const SEARCH_TYPES = ['trending', 'top', 'new'];
|
||||
const SEARCH_TIMES = [TIME_DAY, TIME_WEEK, TIME_MONTH, TIME_YEAR, TIME_ALL];
|
||||
|
||||
type Props = {
|
||||
uris: Array<string>,
|
||||
|
@ -30,7 +30,7 @@ type Props = {
|
|||
|
||||
function FileListDiscover(props: Props) {
|
||||
const { doClaimSearch, uris, tags, loading, personal, injectedItem } = props;
|
||||
const [personalSort, setPersonalSort] = usePersistedState('file-list-trending:personalSort', TRENDING_SORT_YOU);
|
||||
const [personalSort, setPersonalSort] = usePersistedState('file-list-trending:personalSort', SEARCH_SORT_YOU);
|
||||
const [typeSort, setTypeSort] = usePersistedState('file-list-trending:typeSort', TYPE_TRENDING);
|
||||
const [timeSort, setTimeSort] = usePersistedState('file-list-trending:timeSort', TIME_WEEK);
|
||||
|
||||
|
@ -40,7 +40,7 @@ function FileListDiscover(props: Props) {
|
|||
const options = {};
|
||||
const newTags = tagsString.split(',');
|
||||
|
||||
if (personalSort === TRENDING_SORT_YOU) {
|
||||
if ((tags && !personal) || (tags && personal && personalSort === SEARCH_SORT_YOU)) {
|
||||
options.any_tags = newTags;
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ function FileListDiscover(props: Props) {
|
|||
value={personalSort}
|
||||
onChange={e => setPersonalSort(e.target.value)}
|
||||
>
|
||||
{TRENDING_FILTER_TYPES.map(type => (
|
||||
{SEARCH_FILTER_TYPES.map(type => (
|
||||
<option key={type} value={type}>
|
||||
{toCapitalCase(type)}
|
||||
</option>
|
||||
|
@ -101,7 +101,7 @@ function FileListDiscover(props: Props) {
|
|||
value={typeSort}
|
||||
onChange={e => setTypeSort(e.target.value)}
|
||||
>
|
||||
{TRENDING_TYPES.map(type => (
|
||||
{SEARCH_TYPES.map(type => (
|
||||
<option key={type} value={type}>
|
||||
{toCapitalCase(type)}
|
||||
</option>
|
||||
|
@ -115,7 +115,7 @@ function FileListDiscover(props: Props) {
|
|||
value={timeSort}
|
||||
onChange={e => setTimeSort(e.target.value)}
|
||||
>
|
||||
{TRENDING_TIMES.map(time => (
|
||||
{SEARCH_TIMES.map(time => (
|
||||
<option key={time} value={time}>
|
||||
{toCapitalCase(time)}
|
||||
</option>
|
||||
|
@ -129,7 +129,7 @@ function FileListDiscover(props: Props) {
|
|||
<FileList
|
||||
loading={loading}
|
||||
uris={uris}
|
||||
injectedItem={personalSort === TRENDING_SORT_YOU && injectedItem}
|
||||
injectedItem={personalSort === SEARCH_SORT_YOU && injectedItem}
|
||||
header={header}
|
||||
headerAltControls={headerAltControls}
|
||||
/>
|
||||
|
|
|
@ -38,6 +38,8 @@ $metadata-z-index: 1;
|
|||
height: var(--channel-thumbnail-width);
|
||||
width: var(--channel-thumbnail-width);
|
||||
box-shadow: 0px 8px 40px -3px $lbry-black;
|
||||
// left: var(--spacing-medium);
|
||||
// left: 0;
|
||||
left: var(--spacing-medium);
|
||||
}
|
||||
|
||||
|
|
|
@ -6588,9 +6588,9 @@ lazy-val@^1.0.3, lazy-val@^1.0.4:
|
|||
yargs "^13.2.2"
|
||||
zstd-codec "^0.1.1"
|
||||
|
||||
lbry-redux@lbryio/lbry-redux#fceb9747e10f6f6622e34580baf12c0521616407:
|
||||
lbry-redux@lbryio/lbry-redux#291324d03f694c4fefa6967aa7be02d9245596a8:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/fceb9747e10f6f6622e34580baf12c0521616407"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/291324d03f694c4fefa6967aa7be02d9245596a8"
|
||||
dependencies:
|
||||
proxy-polyfill "0.1.6"
|
||||
reselect "^3.0.0"
|
||||
|
|
Loading…
Reference in a new issue