claim search options tweaks
add image, bodel, binary fix duration reset/disable
This commit is contained in:
parent
7a572f0c08
commit
5e1ba4aaf5
3 changed files with 58 additions and 37 deletions
|
@ -989,6 +989,20 @@
|
||||||
"Share usage data with LBRY inc.": "Share usage data with LBRY inc.",
|
"Share usage data with LBRY inc.": "Share usage data with LBRY inc.",
|
||||||
"Required": "Required",
|
"Required": "Required",
|
||||||
"Email %help_link% or join our %chat_link% if you encounter any trouble verifying.": "Email %help_link% or join our %chat_link% if you encounter any trouble verifying.",
|
"Email %help_link% or join our %chat_link% if you encounter any trouble verifying.": "Email %help_link% or join our %chat_link% if you encounter any trouble verifying.",
|
||||||
"Show reposts": "Show reposts",
|
"Only apply a few tags that are relevant to your content, and use the Mature tag as appropriate. Tag abuse will not be tolerated.": "Only apply a few tags that are relevant to your content, and use the Mature tag as appropriate. Tag abuse will not be tolerated.",
|
||||||
"Show reposts from the creators you follow.": "Show reposts from the creators you follow."
|
"Add relevant tags...": "Add relevant tags...",
|
||||||
|
"try again in a few seconds.": "try again in a few seconds.",
|
||||||
|
"Any": "Any",
|
||||||
|
"Video": "Video",
|
||||||
|
"Document": "Document",
|
||||||
|
"Duration": "Duration",
|
||||||
|
"Long": "Long",
|
||||||
|
"Short": "Short",
|
||||||
|
"How Fresh": "How Fresh",
|
||||||
|
"This Default": "This Default",
|
||||||
|
"Sorry, your request returned no results or timed out. Modify your options or %again%": "Sorry, your request returned no results or timed out. Modify your options or %again%",
|
||||||
|
"Image": "Image",
|
||||||
|
"Model": "Model",
|
||||||
|
"Binary": "Binary",
|
||||||
|
"Other": "Other"
|
||||||
}
|
}
|
||||||
|
|
|
@ -236,7 +236,7 @@ function ClaimListDiscover(props: Props) {
|
||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Sorry, your request timed out. Modify your options or %again%
|
Sorry, your request returned no results or timed out. Modify your options or %again%
|
||||||
</I18nMessage>
|
</I18nMessage>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
@ -412,6 +412,9 @@ function ClaimListDiscover(props: Props) {
|
||||||
{type === CS.CLAIM_REPOST && __('Repost')}
|
{type === CS.CLAIM_REPOST && __('Repost')}
|
||||||
{type === CS.FILE_VIDEO && __('Video')}
|
{type === CS.FILE_VIDEO && __('Video')}
|
||||||
{type === CS.FILE_AUDIO && __('Audio')}
|
{type === CS.FILE_AUDIO && __('Audio')}
|
||||||
|
{type === CS.FILE_IMAGE && __('Image')}
|
||||||
|
{type === CS.FILE_MODEL && __('Model')}
|
||||||
|
{type === CS.FILE_BINARY && __('Other')}
|
||||||
{type === CS.FILE_DOCUMENT && __('Document')}
|
{type === CS.FILE_DOCUMENT && __('Document')}
|
||||||
{type === CS.CONTENT_ALL && __('Any')}
|
{type === CS.CONTENT_ALL && __('Any')}
|
||||||
</option>
|
</option>
|
||||||
|
@ -420,39 +423,40 @@ function ClaimListDiscover(props: Props) {
|
||||||
})}
|
})}
|
||||||
</FormField>
|
</FormField>
|
||||||
</div>
|
</div>
|
||||||
{options.claim_type !== CS.CLAIM_CHANNEL &&
|
{/* DURATIONS FIELD */}
|
||||||
options.claim_type !== CS.CLAIM_REPOST &&
|
<div className={'claim-search__input-container'}>
|
||||||
JSON.stringify(options.stream_types) !== JSON.stringify([CS.FILE_DOCUMENT]) && (
|
<FormField
|
||||||
<>
|
className={classnames('claim-search__dropdown', {
|
||||||
{/* DURATIONS FIELD */}
|
'claim-search__dropdown--selected': durationParam,
|
||||||
<div className={'claim-search__input-container'}>
|
})}
|
||||||
<FormField
|
label={__('Duration')}
|
||||||
className={classnames('claim-search__dropdown', {
|
type="select"
|
||||||
'claim-search__dropdown--selected': durationParam,
|
name="duration"
|
||||||
})}
|
disabled={
|
||||||
label={__('Duration')}
|
!(
|
||||||
type="select"
|
contentTypeParam === null ||
|
||||||
name="duration"
|
streamTypeParam === CS.FILE_AUDIO ||
|
||||||
value={durationParam || CS.DURATION_ALL}
|
streamTypeParam === CS.FILE_VIDEO
|
||||||
onChange={e =>
|
)
|
||||||
handleChange({
|
}
|
||||||
key: CS.DURATION_KEY,
|
value={durationParam || CS.DURATION_ALL}
|
||||||
value: e.target.value,
|
onChange={e =>
|
||||||
})
|
handleChange({
|
||||||
}
|
key: CS.DURATION_KEY,
|
||||||
>
|
value: e.target.value,
|
||||||
{CS.DURATION_TYPES.map(dur => (
|
})
|
||||||
<option key={dur} value={dur}>
|
}
|
||||||
{/* i18fixme */}
|
>
|
||||||
{dur === CS.DURATION_SHORT && __('Short')}
|
{CS.DURATION_TYPES.map(dur => (
|
||||||
{dur === CS.DURATION_LONG && __('Long')}
|
<option key={dur} value={dur}>
|
||||||
{dur === CS.DURATION_ALL && __('Any')}
|
{/* i18fixme */}
|
||||||
</option>
|
{dur === CS.DURATION_SHORT && __('Short')}
|
||||||
))}
|
{dur === CS.DURATION_LONG && __('Long')}
|
||||||
</FormField>
|
{dur === CS.DURATION_ALL && __('Any')}
|
||||||
</div>
|
</option>
|
||||||
</>
|
))}
|
||||||
)}
|
</FormField>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -30,7 +30,10 @@ export const DURATION_TYPES = [DURATION_ALL, DURATION_LONG, DURATION_SHORT];
|
||||||
export const FILE_VIDEO = 'video';
|
export const FILE_VIDEO = 'video';
|
||||||
export const FILE_AUDIO = 'audio';
|
export const FILE_AUDIO = 'audio';
|
||||||
export const FILE_DOCUMENT = 'document';
|
export const FILE_DOCUMENT = 'document';
|
||||||
export const FILE_TYPES = [FILE_VIDEO, FILE_AUDIO, FILE_DOCUMENT];
|
export const FILE_BINARY = 'binary';
|
||||||
|
export const FILE_IMAGE = 'image';
|
||||||
|
export const FILE_MODEL = 'model';
|
||||||
|
export const FILE_TYPES = [FILE_VIDEO, FILE_AUDIO, FILE_DOCUMENT, FILE_IMAGE, FILE_MODEL, FILE_BINARY];
|
||||||
|
|
||||||
export const CLAIM_CHANNEL = 'channel';
|
export const CLAIM_CHANNEL = 'channel';
|
||||||
export const CLAIM_STREAM = 'stream';
|
export const CLAIM_STREAM = 'stream';
|
||||||
|
|
Loading…
Reference in a new issue