From e245b4fa229bee1e2ab97fcb42de3831b8bdbe5b Mon Sep 17 00:00:00 2001 From: Vijay A Date: Wed, 24 May 2023 06:57:50 +0530 Subject: Upgrade npm modules --- src/components/auth/Invite.tsx | 8 ++-- src/components/services/content/ServiceView.tsx | 44 +++++++++++----------- .../settings/navigation/SettingsNavigation.tsx | 6 +-- src/components/settings/services/ServiceItem.tsx | 2 +- src/components/ui/Loader.tsx | 2 +- src/components/ui/Slider.tsx | 2 +- src/components/ui/button/index.tsx | 32 ++++++++-------- src/components/ui/imageUpload/index.tsx | 2 +- src/components/ui/select/index.tsx | 16 ++++---- 9 files changed, 58 insertions(+), 56 deletions(-) (limited to 'src/components') diff --git a/src/components/auth/Invite.tsx b/src/components/auth/Invite.tsx index 4ab5157a8..cebef9365 100644 --- a/src/components/auth/Invite.tsx +++ b/src/components/auth/Invite.tsx @@ -192,7 +192,7 @@ class Invite extends Component { return (
{embed && ( @@ -200,10 +200,10 @@ class Invite extends Component {

{intl.formatMessage(messages.settingsHeadline)}

)} - {!embed ? ( -
{renderForm}
- ) : ( + {embed ? (
{renderForm}
+ ) : ( +
{renderForm}
)} ); diff --git a/src/components/services/content/ServiceView.tsx b/src/components/services/content/ServiceView.tsx index e41184431..0754bccc5 100644 --- a/src/components/services/content/ServiceView.tsx +++ b/src/components/services/content/ServiceView.tsx @@ -135,29 +135,9 @@ class ServiceView extends Component { )} )} - {!service.isEnabled ? ( + {service.isEnabled ? ( <> - {service.isActive && ( - - )} - - ) : ( - <> - {!service.isHibernating ? ( - <> - {showNavBar && } - - - ) : ( + {service.isHibernating ? (
{
Try switching services or reloading Ferdium.
+ ) : ( + <> + {showNavBar && } + + + )} + + ) : ( + <> + {service.isActive && ( + )} )} diff --git a/src/components/settings/navigation/SettingsNavigation.tsx b/src/components/settings/navigation/SettingsNavigation.tsx index 95c69027c..4e2c7f410 100644 --- a/src/components/settings/navigation/SettingsNavigation.tsx +++ b/src/components/settings/navigation/SettingsNavigation.tsx @@ -191,9 +191,9 @@ class SettingsNavigation extends Component { className="settings-navigation__link" onClick={this.handleLogout.bind(this)} > - {!isUsingWithoutAccount - ? intl.formatMessage(messages.logout) - : 'Exit session'} + {isUsingWithoutAccount + ? 'Exit session' + : intl.formatMessage(messages.logout)} ); diff --git a/src/components/settings/services/ServiceItem.tsx b/src/components/settings/services/ServiceItem.tsx index fd961a0a8..0737a680c 100644 --- a/src/components/settings/services/ServiceItem.tsx +++ b/src/components/settings/services/ServiceItem.tsx @@ -63,7 +63,7 @@ class ServiceItem extends Component { onClick={goToServiceForm} role="gridcell" > - {service.name !== '' ? service.name : service.recipe.name} + {service.name === '' ? service.recipe.name : service.name} { } = this.props; const loaderColor = - color !== 'ACCENT' ? color : this.props.stores!.settings.app.accentColor; + color === 'ACCENT' ? this.props.stores!.settings.app.accentColor : color; return ( { value={field.value} min="1" max="100" - onChange={e => (!disabled ? this.onChange(e) : null)} + onChange={e => (disabled ? null : this.onChange(e))} /> diff --git a/src/components/ui/button/index.tsx b/src/components/ui/button/index.tsx index dc984bf95..9444efde2 100644 --- a/src/components/ui/button/index.tsx +++ b/src/components/ui/button/index.tsx @@ -117,12 +117,12 @@ const styles = (theme: Theme) => ({ zIndex: 9999, }, loaderContainer: { - width: (props: IProps): string => (!props.busy ? '0' : '40px'), + width: (props: IProps): string => (props.busy ? '40px' : '0'), height: 20, overflow: 'hidden', transition: loaderContainerTransition, - marginLeft: (props: IProps): number => (!props.busy ? 10 : 20), - marginRight: (props: IProps): number => (!props.busy ? -10 : -20), + marginLeft: (props: IProps): number => (props.busy ? 20 : 10), + marginRight: (props: IProps): number => (props.busy ? -20 : -10), position: (): Property.Position => 'inherit', }, icon: { @@ -217,38 +217,38 @@ class ButtonComponent extends Component { ); - const wrapperComponent = !href ? ( - + ) : ( - {content} - + ); return wrapperComponent; diff --git a/src/components/ui/imageUpload/index.tsx b/src/components/ui/imageUpload/index.tsx index 89e2c65a2..3b164ed41 100644 --- a/src/components/ui/imageUpload/index.tsx +++ b/src/components/ui/imageUpload/index.tsx @@ -46,7 +46,7 @@ class ImageUpload extends Component { this.setState({ errorState: false }); for (const file of acceptedFiles) { - const imgPath = isWindows ? file.path.replace(/\\/g, '/') : file.path; + const imgPath = isWindows ? file.path.replaceAll('\\', '/') : file.path; this.setState({ path: imgPath, }); diff --git a/src/components/ui/select/index.tsx b/src/components/ui/select/index.tsx index 31aa8a15f..695e70e28 100644 --- a/src/components/ui/select/index.tsx +++ b/src/components/ui/select/index.tsx @@ -321,10 +321,12 @@ class SelectComponent extends Component { case 39: case 38: case 40: // Arrow keys - case 32: - break; // Space - default: - break; // do not block other keys + case 32: { + break; + } // Space + default: { + break; + } // do not block other keys } } @@ -381,12 +383,12 @@ class SelectComponent extends Component { [`${classes.hasError}`]: error, })} onClick={ - !disabled - ? () => + disabled + ? noop + : () => this.setState((state: IState) => ({ open: !state.open, })) - : noop } > {selection} -- cgit v1.2.3-70-g09d2