Allways use toggle on checkbox input.

- Add changelog entry for PR 1834.
This commit is contained in:
Daniel 2018-08-05 19:35:56 -03:00
parent c7a128f399
commit aea0084ea0
4 changed files with 3 additions and 10 deletions

View file

@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
* Abandoned claim transactions now show in wallet history ([#1769](https://github.com/lbryio/lbry-desktop/pull/1769)) * Abandoned claim transactions now show in wallet history ([#1769](https://github.com/lbryio/lbry-desktop/pull/1769))
* Emoji support in the claim description ([#1800](https://github.com/lbryio/lbry-desktop/pull/1800)) * Emoji support in the claim description ([#1800](https://github.com/lbryio/lbry-desktop/pull/1800))
* PDF preview ([#1576](https://github.com/lbryio/lbry-desktop/pull/1576)) * PDF preview ([#1576](https://github.com/lbryio/lbry-desktop/pull/1576))
* Add Desktop notification settings to be enabled/disabled ([#1834](https://github.com/lbryio/lbry-desktop/pull/1834))
### Changed ### Changed
* Upgraded LBRY Protocol to [version 0.20.4](https://github.com/lbryio/lbry/releases/tag/v0.20.4) to assist with download availability and lower CPU usage on idle. * Upgraded LBRY Protocol to [version 0.20.4](https://github.com/lbryio/lbry/releases/tag/v0.20.4) to assist with download availability and lower CPU usage on idle.
@ -32,6 +33,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
* Hide the "Community top bids" section if user chooses to hide NSFW content ([#1760](https://github.com/lbryio/lbry-desktop/pull/1760)) * Hide the "Community top bids" section if user chooses to hide NSFW content ([#1760](https://github.com/lbryio/lbry-desktop/pull/1760))
* More descriptive error message when Shapeshift is unavailable ([#1771](https://github.com/lbryio/lbry-desktop/pull/1771)) * More descriptive error message when Shapeshift is unavailable ([#1771](https://github.com/lbryio/lbry-desktop/pull/1771))
* Rename the Github repo to lbry-desktop ([#1765](https://github.com/lbryio/lbry-desktop/pull/1765)) * Rename the Github repo to lbry-desktop ([#1765](https://github.com/lbryio/lbry-desktop/pull/1765))
* Changed default browser checkbox to use toggle on all checkbox inputs ([#1834](https://github.com/lbryio/lbry-desktop/pull/1834))
### Fixed ### Fixed
* Edit option missing from certain published claims ([#1756](https://github.com/lbryio/lbry-desktop/issues/1756)) * Edit option missing from certain published claims ([#1756](https://github.com/lbryio/lbry-desktop/issues/1756))

View file

@ -23,7 +23,6 @@ type Props = {
children?: React.Node, children?: React.Node,
stretch?: boolean, stretch?: boolean,
affixClass?: string, // class applied to prefix/postfix label affixClass?: string, // class applied to prefix/postfix label
useToggle?: boolean,
}; };
export class FormField extends React.PureComponent<Props> { export class FormField extends React.PureComponent<Props> {
@ -40,7 +39,6 @@ export class FormField extends React.PureComponent<Props> {
children, children,
stretch, stretch,
affixClass, affixClass,
useToggle,
...inputProps ...inputProps
} = this.props; } = this.props;
@ -82,7 +80,7 @@ export class FormField extends React.PureComponent<Props> {
); );
} else if (type === 'textarea') { } else if (type === 'textarea') {
input = <textarea type={type} id={name} {...inputProps} />; input = <textarea type={type} id={name} {...inputProps} />;
} else if (type === 'checkbox' && useToggle) { } else if (type === 'checkbox') {
input = <Toggle id={name} {...inputProps} />; input = <Toggle id={name} {...inputProps} />;
} else { } else {
input = <input type={type} id={name} {...inputProps} />; input = <input type={type} id={name} {...inputProps} />;

View file

@ -238,7 +238,6 @@ class FilePage extends React.Component<Props> {
<FormRow padded> <FormRow padded>
<ToolTip onComponent body={__('Automatically download and play free content.')}> <ToolTip onComponent body={__('Automatically download and play free content.')}>
<FormField <FormField
useToggle
name="autoplay" name="autoplay"
type="checkbox" type="checkbox"
postfix={__('Autoplay')} postfix={__('Autoplay')}

View file

@ -259,7 +259,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
<section className="card card--section"> <section className="card card--section">
<div className="card__title">{__('Content Settings')}</div> <div className="card__title">{__('Content Settings')}</div>
<FormField <FormField
useToggle
type="checkbox" type="checkbox"
name="autoplay" name="autoplay"
onChange={this.onAutoplayChange} onChange={this.onAutoplayChange}
@ -267,7 +266,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
postfix={__('Autoplay media files')} postfix={__('Autoplay media files')}
/> />
<FormField <FormField
useToggle
type="checkbox" type="checkbox"
name="show_nsfw" name="show_nsfw"
onChange={this.onShowNsfwChange} onChange={this.onShowNsfwChange}
@ -282,7 +280,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
<section className="card card--section"> <section className="card card--section">
<div className="card__title">{__('Notifications')}</div> <div className="card__title">{__('Notifications')}</div>
<FormField <FormField
useToggle
type="checkbox" type="checkbox"
name="desktopNotification" name="desktopNotification"
onChange={this.onDesktopNotificationsChange} onChange={this.onDesktopNotificationsChange}
@ -294,7 +291,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
<section className="card card--section"> <section className="card card--section">
<div className="card__title">{__('Share Diagnostic Data')}</div> <div className="card__title">{__('Share Diagnostic Data')}</div>
<FormField <FormField
useToggle
type="checkbox" type="checkbox"
name="share_usage_data" name="share_usage_data"
onChange={this.onShareDataChange} onChange={this.onShareDataChange}
@ -323,7 +319,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
))} ))}
</FormField> </FormField>
<FormField <FormField
useToggle
type="checkbox" type="checkbox"
name="automatic_dark_mode" name="automatic_dark_mode"
onChange={e => this.onAutomaticDarkModeChange(e.target.checked)} onChange={e => this.onAutomaticDarkModeChange(e.target.checked)}
@ -335,7 +330,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
<section className="card card--section"> <section className="card card--section">
<div className="card__title">{__('Wallet Security')}</div> <div className="card__title">{__('Wallet Security')}</div>
<FormField <FormField
useToggle
type="checkbox" type="checkbox"
name="encrypt_wallet" name="encrypt_wallet"
onChange={e => this.onChangeEncryptWallet(e)} onChange={e => this.onChangeEncryptWallet(e)}