Allways use toggle on checkbox input.
- Add changelog entry for PR 1834.
This commit is contained in:
parent
c7a128f399
commit
aea0084ea0
4 changed files with 3 additions and 10 deletions
|
@ -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))
|
||||
* 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))
|
||||
* Add Desktop notification settings to be enabled/disabled ([#1834](https://github.com/lbryio/lbry-desktop/pull/1834))
|
||||
|
||||
### 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.
|
||||
|
@ -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))
|
||||
* 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))
|
||||
* Changed default browser checkbox to use toggle on all checkbox inputs ([#1834](https://github.com/lbryio/lbry-desktop/pull/1834))
|
||||
|
||||
### Fixed
|
||||
* Edit option missing from certain published claims ([#1756](https://github.com/lbryio/lbry-desktop/issues/1756))
|
||||
|
|
|
@ -23,7 +23,6 @@ type Props = {
|
|||
children?: React.Node,
|
||||
stretch?: boolean,
|
||||
affixClass?: string, // class applied to prefix/postfix label
|
||||
useToggle?: boolean,
|
||||
};
|
||||
|
||||
export class FormField extends React.PureComponent<Props> {
|
||||
|
@ -40,7 +39,6 @@ export class FormField extends React.PureComponent<Props> {
|
|||
children,
|
||||
stretch,
|
||||
affixClass,
|
||||
useToggle,
|
||||
...inputProps
|
||||
} = this.props;
|
||||
|
||||
|
@ -82,7 +80,7 @@ export class FormField extends React.PureComponent<Props> {
|
|||
);
|
||||
} else if (type === 'textarea') {
|
||||
input = <textarea type={type} id={name} {...inputProps} />;
|
||||
} else if (type === 'checkbox' && useToggle) {
|
||||
} else if (type === 'checkbox') {
|
||||
input = <Toggle id={name} {...inputProps} />;
|
||||
} else {
|
||||
input = <input type={type} id={name} {...inputProps} />;
|
||||
|
|
|
@ -238,7 +238,6 @@ class FilePage extends React.Component<Props> {
|
|||
<FormRow padded>
|
||||
<ToolTip onComponent body={__('Automatically download and play free content.')}>
|
||||
<FormField
|
||||
useToggle
|
||||
name="autoplay"
|
||||
type="checkbox"
|
||||
postfix={__('Autoplay')}
|
||||
|
|
|
@ -259,7 +259,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
|||
<section className="card card--section">
|
||||
<div className="card__title">{__('Content Settings')}</div>
|
||||
<FormField
|
||||
useToggle
|
||||
type="checkbox"
|
||||
name="autoplay"
|
||||
onChange={this.onAutoplayChange}
|
||||
|
@ -267,7 +266,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
|||
postfix={__('Autoplay media files')}
|
||||
/>
|
||||
<FormField
|
||||
useToggle
|
||||
type="checkbox"
|
||||
name="show_nsfw"
|
||||
onChange={this.onShowNsfwChange}
|
||||
|
@ -282,7 +280,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
|||
<section className="card card--section">
|
||||
<div className="card__title">{__('Notifications')}</div>
|
||||
<FormField
|
||||
useToggle
|
||||
type="checkbox"
|
||||
name="desktopNotification"
|
||||
onChange={this.onDesktopNotificationsChange}
|
||||
|
@ -294,7 +291,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
|||
<section className="card card--section">
|
||||
<div className="card__title">{__('Share Diagnostic Data')}</div>
|
||||
<FormField
|
||||
useToggle
|
||||
type="checkbox"
|
||||
name="share_usage_data"
|
||||
onChange={this.onShareDataChange}
|
||||
|
@ -323,7 +319,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
|||
))}
|
||||
</FormField>
|
||||
<FormField
|
||||
useToggle
|
||||
type="checkbox"
|
||||
name="automatic_dark_mode"
|
||||
onChange={e => this.onAutomaticDarkModeChange(e.target.checked)}
|
||||
|
@ -335,7 +330,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
|||
<section className="card card--section">
|
||||
<div className="card__title">{__('Wallet Security')}</div>
|
||||
<FormField
|
||||
useToggle
|
||||
type="checkbox"
|
||||
name="encrypt_wallet"
|
||||
onChange={e => this.onChangeEncryptWallet(e)}
|
||||
|
|
Loading…
Add table
Reference in a new issue