diff options
author | 2022-07-25 08:16:50 +0530 | |
---|---|---|
committer | 2022-07-25 08:17:10 +0530 | |
commit | cf282aa351cbc58691fb1b2fb4764830247cdbe8 (patch) | |
tree | 1a6ac4c9abd8b3de9d358016a5065da86cdd8510 /src/components | |
parent | 6.0.1-nightly.3 [skip ci] (diff) | |
download | ferdium-app-cf282aa351cbc58691fb1b2fb4764830247cdbe8.tar.gz ferdium-app-cf282aa351cbc58691fb1b2fb4764830247cdbe8.tar.zst ferdium-app-cf282aa351cbc58691fb1b2fb4764830247cdbe8.zip |
eslint needs to be executed at the top-level to actually workv6.0.1-nightly.3
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/auth/Invite.js | 8 | ||||
-rw-r--r-- | src/components/auth/Locked.js | 20 | ||||
-rw-r--r-- | src/components/auth/Password.js | 24 | ||||
-rw-r--r-- | src/components/auth/Welcome.jsx | 7 | ||||
-rw-r--r-- | src/components/services/content/ServiceView.js | 38 | ||||
-rw-r--r-- | src/components/settings/account/AccountDashboard.js | 2 | ||||
-rw-r--r-- | src/components/settings/recipes/RecipesDashboard.jsx | 4 | ||||
-rw-r--r-- | src/components/settings/services/EditServiceForm.js | 4 | ||||
-rw-r--r-- | src/components/ui/ColorPickerInput.tsx | 15 | ||||
-rw-r--r-- | src/components/ui/FullscreenLoader/index.js | 2 | ||||
-rw-r--r-- | src/components/ui/loader/index.tsx | 4 | ||||
-rw-r--r-- | src/components/ui/select/index.tsx | 4 | ||||
-rw-r--r-- | src/components/ui/textarea/index.tsx | 4 | ||||
-rw-r--r-- | src/components/ui/wrapper/index.tsx | 4 |
14 files changed, 77 insertions, 63 deletions
diff --git a/src/components/auth/Invite.js b/src/components/auth/Invite.js index 9eca924cd..6b0e0e40b 100644 --- a/src/components/auth/Invite.js +++ b/src/components/auth/Invite.js | |||
@@ -70,9 +70,7 @@ class Invite extends Component { | |||
70 | fields: { | 70 | fields: { |
71 | name: { | 71 | name: { |
72 | label: intl.formatMessage(messages.nameLabel), | 72 | label: intl.formatMessage(messages.nameLabel), |
73 | placeholder: intl.formatMessage( | 73 | placeholder: intl.formatMessage(messages.nameLabel), |
74 | messages.nameLabel, | ||
75 | ), | ||
76 | onChange: () => { | 74 | onChange: () => { |
77 | this.setState({ showSuccessInfo: false }); | 75 | this.setState({ showSuccessInfo: false }); |
78 | }, | 76 | }, |
@@ -80,9 +78,7 @@ class Invite extends Component { | |||
80 | }, | 78 | }, |
81 | email: { | 79 | email: { |
82 | label: intl.formatMessage(messages.emailLabel), | 80 | label: intl.formatMessage(messages.emailLabel), |
83 | placeholder: intl.formatMessage( | 81 | placeholder: intl.formatMessage(messages.emailLabel), |
84 | messages.emailLabel, | ||
85 | ), | ||
86 | onChange: () => { | 82 | onChange: () => { |
87 | this.setState({ showSuccessInfo: false }); | 83 | this.setState({ showSuccessInfo: false }); |
88 | }, | 84 | }, |
diff --git a/src/components/auth/Locked.js b/src/components/auth/Locked.js index 90ee46722..6e32dd980 100644 --- a/src/components/auth/Locked.js +++ b/src/components/auth/Locked.js | |||
@@ -54,17 +54,19 @@ class Locked extends Component { | |||
54 | 54 | ||
55 | form = (() => { | 55 | form = (() => { |
56 | const { intl } = this.props; | 56 | const { intl } = this.props; |
57 | return new Form({ | 57 | return new Form( |
58 | fields: { | 58 | { |
59 | password: { | 59 | fields: { |
60 | label: intl.formatMessage(messages.passwordLabel), | 60 | password: { |
61 | value: '', | 61 | label: intl.formatMessage(messages.passwordLabel), |
62 | type: 'password', | 62 | value: '', |
63 | type: 'password', | ||
64 | }, | ||
63 | }, | 65 | }, |
64 | }, | 66 | }, |
65 | }, | 67 | intl, |
66 | intl, | 68 | ); |
67 | )})(); | 69 | })(); |
68 | 70 | ||
69 | submit(e) { | 71 | submit(e) { |
70 | e.preventDefault(); | 72 | e.preventDefault(); |
diff --git a/src/components/auth/Password.js b/src/components/auth/Password.js index 0daa4c77a..5086b0bbd 100644 --- a/src/components/auth/Password.js +++ b/src/components/auth/Password.js | |||
@@ -50,17 +50,19 @@ class Password extends Component { | |||
50 | 50 | ||
51 | form = (() => { | 51 | form = (() => { |
52 | const { intl } = this.props; | 52 | const { intl } = this.props; |
53 | return new Form({ | 53 | return new Form( |
54 | fields: { | 54 | { |
55 | email: { | 55 | fields: { |
56 | label: intl.formatMessage(messages.emailLabel), | 56 | email: { |
57 | value: '', | 57 | label: intl.formatMessage(messages.emailLabel), |
58 | validators: [required, email], | 58 | value: '', |
59 | validators: [required, email], | ||
60 | }, | ||
59 | }, | 61 | }, |
60 | }, | 62 | }, |
61 | }, | 63 | intl, |
62 | intl, | 64 | ); |
63 | )})(); | 65 | })(); |
64 | 66 | ||
65 | submit(e) { | 67 | submit(e) { |
66 | e.preventDefault(); | 68 | e.preventDefault(); |
@@ -80,7 +82,9 @@ class Password extends Component { | |||
80 | return ( | 82 | return ( |
81 | <div className="auth__container"> | 83 | <div className="auth__container"> |
82 | <form className="franz-form auth__form" onSubmit={e => this.submit(e)}> | 84 | <form className="franz-form auth__form" onSubmit={e => this.submit(e)}> |
83 | <Link to='/auth/welcome'><img src="./assets/images/logo.svg" className="auth__logo" alt="" /></Link> | 85 | <Link to="/auth/welcome"> |
86 | <img src="./assets/images/logo.svg" className="auth__logo" alt="" /> | ||
87 | </Link> | ||
84 | <H1>{intl.formatMessage(messages.headline)}</H1> | 88 | <H1>{intl.formatMessage(messages.headline)}</H1> |
85 | {status.length > 0 && status.includes('sent') && ( | 89 | {status.length > 0 && status.includes('sent') && ( |
86 | <Infobox type="success" icon="checkbox-marked-circle-outline"> | 90 | <Infobox type="success" icon="checkbox-marked-circle-outline"> |
diff --git a/src/components/auth/Welcome.jsx b/src/components/auth/Welcome.jsx index c784b75c3..9e5d10126 100644 --- a/src/components/auth/Welcome.jsx +++ b/src/components/auth/Welcome.jsx | |||
@@ -21,7 +21,8 @@ const messages = defineMessages({ | |||
21 | }, | 21 | }, |
22 | changeServerMessage: { | 22 | changeServerMessage: { |
23 | id: 'login.changeServerMessage', | 23 | id: 'login.changeServerMessage', |
24 | defaultMessage: 'You are using {serverNameParse} Server, do you want to switch?' | 24 | defaultMessage: |
25 | 'You are using {serverNameParse} Server, do you want to switch?', | ||
25 | }, | 26 | }, |
26 | changeServer: { | 27 | changeServer: { |
27 | id: 'login.changeServer', | 28 | id: 'login.changeServer', |
@@ -78,7 +79,9 @@ class Welcome extends Component { | |||
78 | </Link> | 79 | </Link> |
79 | <div className="welcome__text__change-server"> | 80 | <div className="welcome__text__change-server"> |
80 | <span> | 81 | <span> |
81 | {intl.formatMessage(messages.changeServerMessage, { serverNameParse })} | 82 | {intl.formatMessage(messages.changeServerMessage, { |
83 | serverNameParse, | ||
84 | })} | ||
82 | </span> | 85 | </span> |
83 | <Link to={changeServerRoute} className="button__change-server"> | 86 | <Link to={changeServerRoute} className="button__change-server"> |
84 | <span>{intl.formatMessage(messages.changeServer)}</span> | 87 | <span>{intl.formatMessage(messages.changeServer)}</span> |
diff --git a/src/components/services/content/ServiceView.js b/src/components/services/content/ServiceView.js index 504325c3a..47d84fead 100644 --- a/src/components/services/content/ServiceView.js +++ b/src/components/services/content/ServiceView.js | |||
@@ -77,7 +77,8 @@ class ServiceView extends Component { | |||
77 | isSpellcheckerEnabled, | 77 | isSpellcheckerEnabled, |
78 | } = this.props; | 78 | } = this.props; |
79 | 79 | ||
80 | const { navigationBarBehaviour, navigationBarManualActive } = stores.settings.app; | 80 | const { navigationBarBehaviour, navigationBarManualActive } = |
81 | stores.settings.app; | ||
81 | 82 | ||
82 | const showNavBar = | 83 | const showNavBar = |
83 | navigationBarBehaviour === 'always' || | 84 | navigationBarBehaviour === 'always' || |
@@ -98,7 +99,11 @@ class ServiceView extends Component { | |||
98 | } | 99 | } |
99 | 100 | ||
100 | return ( | 101 | return ( |
101 | <div className={webviewClasses} data-name={service.name} style={{order: service.order}}> | 102 | <div |
103 | className={webviewClasses} | ||
104 | data-name={service.name} | ||
105 | style={{ order: service.order }} | ||
106 | > | ||
102 | {service.isActive && service.isEnabled && ( | 107 | {service.isActive && service.isEnabled && ( |
103 | <> | 108 | <> |
104 | {service.hasCrashed && ( | 109 | {service.hasCrashed && ( |
@@ -115,9 +120,9 @@ class ServiceView extends Component { | |||
115 | !service.isServiceAccessRestricted && ( | 120 | !service.isServiceAccessRestricted && ( |
116 | <WebviewLoader loaded={false} name={service.name} /> | 121 | <WebviewLoader loaded={false} name={service.name} /> |
117 | )} | 122 | )} |
118 | {service.isProgressbarEnabled && service.isLoadingPage && !service.isFirstLoad && ( | 123 | {service.isProgressbarEnabled && |
119 | <TopBarProgress /> | 124 | service.isLoadingPage && |
120 | )} | 125 | !service.isFirstLoad && <TopBarProgress />} |
121 | {service.isError && ( | 126 | {service.isError && ( |
122 | <WebviewErrorHandler | 127 | <WebviewErrorHandler |
123 | name={service.recipe.name} | 128 | name={service.recipe.name} |
@@ -151,11 +156,26 @@ class ServiceView extends Component { | |||
151 | /> | 156 | /> |
152 | </> | 157 | </> |
153 | ) : ( | 158 | ) : ( |
154 | <div style={{display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', textAlign: 'center' }}> | 159 | <div |
155 | <span role="img" aria-label="Sleeping Emoji" style={{fontSize: 42}}> | 160 | style={{ |
161 | display: 'flex', | ||
162 | flexDirection: 'column', | ||
163 | justifyContent: 'center', | ||
164 | alignItems: 'center', | ||
165 | textAlign: 'center', | ||
166 | }} | ||
167 | > | ||
168 | <span | ||
169 | role="img" | ||
170 | aria-label="Sleeping Emoji" | ||
171 | style={{ fontSize: 42 }} | ||
172 | > | ||
156 | 😴 | 173 | 😴 |
157 | </span><br/><br/> | 174 | </span> |
158 | This service is currently hibernating.<br/> | 175 | <br /> |
176 | <br /> | ||
177 | This service is currently hibernating. | ||
178 | <br /> | ||
159 | Try switching services or reloading Ferdium. | 179 | Try switching services or reloading Ferdium. |
160 | </div> | 180 | </div> |
161 | )} | 181 | )} |
diff --git a/src/components/settings/account/AccountDashboard.js b/src/components/settings/account/AccountDashboard.js index 8ebf1ac5f..a1612cf8b 100644 --- a/src/components/settings/account/AccountDashboard.js +++ b/src/components/settings/account/AccountDashboard.js | |||
@@ -106,7 +106,7 @@ class AccountDashboard extends Component { | |||
106 | <div className="settings__body"> | 106 | <div className="settings__body"> |
107 | {isUsingWithoutAccount && ( | 107 | {isUsingWithoutAccount && ( |
108 | <> | 108 | <> |
109 | <H1 className='.no-bottom-margin'> | 109 | <H1 className=".no-bottom-margin"> |
110 | {intl.formatMessage(messages.accountUnavailable)} | 110 | {intl.formatMessage(messages.accountUnavailable)} |
111 | </H1> | 111 | </H1> |
112 | <p | 112 | <p |
diff --git a/src/components/settings/recipes/RecipesDashboard.jsx b/src/components/settings/recipes/RecipesDashboard.jsx index 589b97ecd..d6150d300 100644 --- a/src/components/settings/recipes/RecipesDashboard.jsx +++ b/src/components/settings/recipes/RecipesDashboard.jsx | |||
@@ -191,7 +191,9 @@ class RecipesDashboard extends Component { | |||
191 | <NavLink | 191 | <NavLink |
192 | to="/settings/recipes/all" | 192 | to="/settings/recipes/all" |
193 | className={({ isActive }) => | 193 | className={({ isActive }) => |
194 | isActive && recipeFilter === 'all' ? 'badge badge--primary' : 'badge' | 194 | isActive && recipeFilter === 'all' |
195 | ? 'badge badge--primary' | ||
196 | : 'badge' | ||
195 | } | 197 | } |
196 | onClick={() => resetSearch()} | 198 | onClick={() => resetSearch()} |
197 | > | 199 | > |
diff --git a/src/components/settings/services/EditServiceForm.js b/src/components/settings/services/EditServiceForm.js index 73136529a..ab43bace9 100644 --- a/src/components/settings/services/EditServiceForm.js +++ b/src/components/settings/services/EditServiceForm.js | |||
@@ -505,9 +505,7 @@ class EditServiceForm extends Component { | |||
505 | </div> | 505 | </div> |
506 | <div className="settings__controls"> | 506 | <div className="settings__controls"> |
507 | {/* Delete Button */} | 507 | {/* Delete Button */} |
508 | <div> | 508 | <div>{action === 'edit' && deleteButton}</div> |
509 | {action === 'edit' && deleteButton} | ||
510 | </div> | ||
511 | 509 | ||
512 | {/* Save Button */} | 510 | {/* Save Button */} |
513 | {isSaving || isValidatingCustomUrl ? ( | 511 | {isSaving || isValidatingCustomUrl ? ( |
diff --git a/src/components/ui/ColorPickerInput.tsx b/src/components/ui/ColorPickerInput.tsx index 8a4d3129a..710d05586 100644 --- a/src/components/ui/ColorPickerInput.tsx +++ b/src/components/ui/ColorPickerInput.tsx | |||
@@ -8,7 +8,7 @@ interface IProps { | |||
8 | field: Field; | 8 | field: Field; |
9 | className?: string; | 9 | className?: string; |
10 | focus?: boolean; | 10 | focus?: boolean; |
11 | }; | 11 | } |
12 | 12 | ||
13 | class ColorPickerInput extends Component<IProps> { | 13 | class ColorPickerInput extends Component<IProps> { |
14 | static defaultProps = { | 14 | static defaultProps = { |
@@ -34,16 +34,13 @@ class ColorPickerInput extends Component<IProps> { | |||
34 | this.inputElement?.focus(); | 34 | this.inputElement?.focus(); |
35 | } | 35 | } |
36 | 36 | ||
37 | handleChangeComplete = (color: { hex: string; }) => { | 37 | handleChangeComplete = (color: { hex: string }) => { |
38 | const { field } = this.props; | 38 | const { field } = this.props; |
39 | field.value = color.hex | 39 | field.value = color.hex; |
40 | }; | 40 | }; |
41 | 41 | ||
42 | render() { | 42 | render() { |
43 | const { | 43 | const { field, className } = this.props; |
44 | field, | ||
45 | className, | ||
46 | } = this.props; | ||
47 | 44 | ||
48 | let { type } = field; | 45 | let { type } = field; |
49 | type = 'text'; | 46 | type = 'text'; |
@@ -57,8 +54,8 @@ class ColorPickerInput extends Component<IProps> { | |||
57 | })} | 54 | })} |
58 | > | 55 | > |
59 | <SliderPicker | 56 | <SliderPicker |
60 | color={ field.value } | 57 | color={field.value} |
61 | onChangeComplete={ this.handleChangeComplete } | 58 | onChangeComplete={this.handleChangeComplete} |
62 | id={field.id} | 59 | id={field.id} |
63 | type={type} | 60 | type={type} |
64 | className="franz-form__input" | 61 | className="franz-form__input" |
diff --git a/src/components/ui/FullscreenLoader/index.js b/src/components/ui/FullscreenLoader/index.js index 983e7ea6c..f8c6b92ee 100644 --- a/src/components/ui/FullscreenLoader/index.js +++ b/src/components/ui/FullscreenLoader/index.js | |||
@@ -23,7 +23,7 @@ class FullscreenLoader extends Component { | |||
23 | className: null, | 23 | className: null, |
24 | spinnerColor: null, | 24 | spinnerColor: null, |
25 | children: null, | 25 | children: null, |
26 | title: null | 26 | title: null, |
27 | }; | 27 | }; |
28 | 28 | ||
29 | render() { | 29 | render() { |
diff --git a/src/components/ui/loader/index.tsx b/src/components/ui/loader/index.tsx index 4d52f320e..45f81ff3b 100644 --- a/src/components/ui/loader/index.tsx +++ b/src/components/ui/loader/index.tsx | |||
@@ -41,6 +41,4 @@ class LoaderComponent extends Component<IProps> { | |||
41 | } | 41 | } |
42 | } | 42 | } |
43 | 43 | ||
44 | export default injectStyle(styles, { injectTheme: true })( | 44 | export default injectStyle(styles, { injectTheme: true })(LoaderComponent); |
45 | LoaderComponent, | ||
46 | ); | ||
diff --git a/src/components/ui/select/index.tsx b/src/components/ui/select/index.tsx index 1ce6c674b..805836130 100644 --- a/src/components/ui/select/index.tsx +++ b/src/components/ui/select/index.tsx | |||
@@ -463,6 +463,4 @@ class SelectComponent extends Component<IProps> { | |||
463 | } | 463 | } |
464 | } | 464 | } |
465 | 465 | ||
466 | export default injectStyle(styles, { injectTheme: true })( | 466 | export default injectStyle(styles, { injectTheme: true })(SelectComponent); |
467 | SelectComponent, | ||
468 | ); | ||
diff --git a/src/components/ui/textarea/index.tsx b/src/components/ui/textarea/index.tsx index 6796ab83d..d4ea424be 100644 --- a/src/components/ui/textarea/index.tsx +++ b/src/components/ui/textarea/index.tsx | |||
@@ -121,6 +121,4 @@ class TextareaComponent extends Component<IProps> { | |||
121 | } | 121 | } |
122 | } | 122 | } |
123 | 123 | ||
124 | export default injectSheet(styles, { injectTheme: true })( | 124 | export default injectSheet(styles, { injectTheme: true })(TextareaComponent); |
125 | TextareaComponent, | ||
126 | ); | ||
diff --git a/src/components/ui/wrapper/index.tsx b/src/components/ui/wrapper/index.tsx index e7477a25c..d733d050e 100644 --- a/src/components/ui/wrapper/index.tsx +++ b/src/components/ui/wrapper/index.tsx | |||
@@ -33,6 +33,4 @@ class WrapperComponent extends Component<IProps> { | |||
33 | } | 33 | } |
34 | } | 34 | } |
35 | 35 | ||
36 | export default injectStyle(styles, { injectTheme: true })( | 36 | export default injectStyle(styles, { injectTheme: true })(WrapperComponent); |
37 | WrapperComponent, | ||
38 | ); | ||