mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-13 22:09:47 +00:00
address PR comments
This commit is contained in:
parent
a49604cdb3
commit
d57b9584c1
8 changed files with 28 additions and 25 deletions
|
@ -20,7 +20,7 @@ type Props = {
|
||||||
placeholder?: string | number,
|
placeholder?: string | number,
|
||||||
children?: React.Node,
|
children?: React.Node,
|
||||||
stretch?: boolean,
|
stretch?: boolean,
|
||||||
fixClass?: string, // class applied to prefix/postfix label
|
affixClass?: string, // class applied to prefix/postfix label
|
||||||
};
|
};
|
||||||
|
|
||||||
export class FormField extends React.PureComponent<Props> {
|
export class FormField extends React.PureComponent<Props> {
|
||||||
|
@ -36,7 +36,7 @@ export class FormField extends React.PureComponent<Props> {
|
||||||
type,
|
type,
|
||||||
children,
|
children,
|
||||||
stretch,
|
stretch,
|
||||||
fixClass,
|
affixClass,
|
||||||
...inputProps
|
...inputProps
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
|
@ -94,13 +94,13 @@ export class FormField extends React.PureComponent<Props> {
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{prefix && (
|
{prefix && (
|
||||||
<label htmlFor={name} className={classnames('form-field__prefix', fixClass)}>
|
<label htmlFor={name} className={classnames('form-field__prefix', affixClass)}>
|
||||||
{prefix}
|
{prefix}
|
||||||
</label>
|
</label>
|
||||||
)}
|
)}
|
||||||
{input}
|
{input}
|
||||||
{postfix && (
|
{postfix && (
|
||||||
<label htmlFor={name} className={classnames('form-field__postfix', fixClass)}>
|
<label htmlFor={name} className={classnames('form-field__postfix', affixClass)}>
|
||||||
{postfix}
|
{postfix}
|
||||||
</label>
|
</label>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -171,7 +171,7 @@ class FileList extends React.PureComponent<Props, State> {
|
||||||
{!hideFilter && (
|
{!hideFilter && (
|
||||||
<FormField
|
<FormField
|
||||||
prefix={__('Sort by')}
|
prefix={__('Sort by')}
|
||||||
fixClass="form-field--align-center"
|
affixClass="form-field--align-center"
|
||||||
type="select"
|
type="select"
|
||||||
value={sortBy}
|
value={sortBy}
|
||||||
onChange={this.handleSortChanged}
|
onChange={this.handleSortChanged}
|
||||||
|
|
|
@ -96,7 +96,7 @@ class TransactionList extends React.PureComponent<Props, State> {
|
||||||
type="select"
|
type="select"
|
||||||
value={filter}
|
value={filter}
|
||||||
onChange={this.handleFilterChanged}
|
onChange={this.handleFilterChanged}
|
||||||
fixClass="form-field--align-center"
|
affixClass="form-field--align-center"
|
||||||
prefix={__('Show')}
|
prefix={__('Show')}
|
||||||
postfix={
|
postfix={
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -56,10 +56,10 @@ class WalletSend extends React.PureComponent<Props> {
|
||||||
label={__('Amount')}
|
label={__('Amount')}
|
||||||
postfix={__('LBC')}
|
postfix={__('LBC')}
|
||||||
className="input--price-amount"
|
className="input--price-amount"
|
||||||
fixClass="form-field--fix-no-height"
|
affixClass="form-field--fix-no-height"
|
||||||
min="0"
|
min="0"
|
||||||
step="any"
|
step="any"
|
||||||
placeholder="5"
|
placeholder="12.34"
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
onBlur={handleBlur}
|
onBlur={handleBlur}
|
||||||
value={values.amount}
|
value={values.amount}
|
||||||
|
|
|
@ -115,8 +115,7 @@ class FilePage extends React.Component<Props> {
|
||||||
const shouldObscureThumbnail = obscureNsfw && metadata.nsfw;
|
const shouldObscureThumbnail = obscureNsfw && metadata.nsfw;
|
||||||
const { height, channel_name: channelName, value } = claim;
|
const { height, channel_name: channelName, value } = claim;
|
||||||
const mediaType = Lbry.getMediaType(contentType);
|
const mediaType = Lbry.getMediaType(contentType);
|
||||||
const isPlayable =
|
const isPlayable = Object.values(player.mime).includes(contentType) || mediaType === 'audio';
|
||||||
Object.values(player.mime).indexOf(mediaType) !== -1 || mediaType === 'audio';
|
|
||||||
const channelClaimId =
|
const channelClaimId =
|
||||||
value && value.publisherSignature && value.publisherSignature.certificateId;
|
value && value.publisherSignature && value.publisherSignature.certificateId;
|
||||||
let subscriptionUri;
|
let subscriptionUri;
|
||||||
|
@ -196,6 +195,8 @@ class FilePage extends React.Component<Props> {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{!claimIsMine ||
|
||||||
|
(speechSharable && (
|
||||||
<div className="card__actions card__actions--end">
|
<div className="card__actions card__actions--end">
|
||||||
{!claimIsMine && (
|
{!claimIsMine && (
|
||||||
<Button
|
<Button
|
||||||
|
@ -209,6 +210,7 @@ class FilePage extends React.Component<Props> {
|
||||||
<ViewOnWebButton claimId={claim.claim_id} claimName={claim.name} />
|
<ViewOnWebButton claimId={claim.claim_id} claimName={claim.name} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
))}
|
||||||
<FormRow alignRight>
|
<FormRow alignRight>
|
||||||
<FormField
|
<FormField
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|
|
@ -121,7 +121,7 @@ input::placeholder {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
label {
|
label[for] {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ $large-breakpoint: 1760px;
|
||||||
--color-divider: #e3e3e3;
|
--color-divider: #e3e3e3;
|
||||||
--color-help: rgba(0, 0, 0, 0.54);
|
--color-help: rgba(0, 0, 0, 0.54);
|
||||||
--color-error: #a94442;
|
--color-error: #a94442;
|
||||||
|
--color-nsfw: #bf4440;
|
||||||
--color-download: var(--color-white);
|
--color-download: var(--color-white);
|
||||||
--color-download-overlay: var(--color-black);
|
--color-download-overlay: var(--color-black);
|
||||||
--color-bg: #fafafa;
|
--color-bg: #fafafa;
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
color: var(--color-white);
|
color: var(--color-white);
|
||||||
|
|
||||||
&.content__empty--nsfw {
|
&.content__empty--nsfw {
|
||||||
background-color: var(--color-error);
|
background-color: var(--color-nsfw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue