aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/services/content/ServiceView.tsx2
-rw-r--r--src/components/settings/settings/EditSettingsForm.tsx2
-rw-r--r--src/components/ui/AppLoader/index.tsx2
-rw-r--r--src/components/ui/input/scorePassword.ts2
-rw-r--r--src/components/ui/select/index.tsx21
5 files changed, 8 insertions, 21 deletions
diff --git a/src/components/services/content/ServiceView.tsx b/src/components/services/content/ServiceView.tsx
index 37dcafbe4..d89cd0610 100644
--- a/src/components/services/content/ServiceView.tsx
+++ b/src/components/services/content/ServiceView.tsx
@@ -64,7 +64,7 @@ class ServiceView extends Component<IProps, IState> {
64 64
65 componentWillUnmount() { 65 componentWillUnmount() {
66 this.autorunDisposer!(); 66 this.autorunDisposer!();
67 clearTimeout(this.forceRepaintTimeout!); 67 clearTimeout(this.forceRepaintTimeout);
68 // clearTimeout(this.hibernationTimer); // TODO: [TS DEBT] class property not reassigned, need to find its purpose 68 // clearTimeout(this.hibernationTimer); // TODO: [TS DEBT] class property not reassigned, need to find its purpose
69 } 69 }
70 70
diff --git a/src/components/settings/settings/EditSettingsForm.tsx b/src/components/settings/settings/EditSettingsForm.tsx
index 210c8d9e9..1672a1411 100644
--- a/src/components/settings/settings/EditSettingsForm.tsx
+++ b/src/components/settings/settings/EditSettingsForm.tsx
@@ -397,7 +397,7 @@ class EditSettingsForm extends Component<IProps, IState> {
397 debug('cacheSize:', cacheSize); 397 debug('cacheSize:', cacheSize);
398 notCleared = 398 notCleared =
399 this.state.clearCacheButtonClicked && 399 this.state.clearCacheButtonClicked &&
400 isClearingAllCache === false && 400 !isClearingAllCache &&
401 cacheSizeBytes !== 0; 401 cacheSizeBytes !== 0;
402 } else { 402 } else {
403 cacheSize = '…'; 403 cacheSize = '…';
diff --git a/src/components/ui/AppLoader/index.tsx b/src/components/ui/AppLoader/index.tsx
index 64c840aaa..4b5828ef4 100644
--- a/src/components/ui/AppLoader/index.tsx
+++ b/src/components/ui/AppLoader/index.tsx
@@ -61,7 +61,7 @@ class AppLoader extends Component<IProps, IState> {
61 className={classes.component} 61 className={classes.component}
62 spinnerColor={theme.colorAppLoaderSpinner} 62 spinnerColor={theme.colorAppLoaderSpinner}
63 > 63 >
64 {texts?.map((text, i) => ( 64 {texts.map((text, i) => (
65 <span 65 <span
66 key={text} 66 key={text}
67 className={classnames({ 67 className={classnames({
diff --git a/src/components/ui/input/scorePassword.ts b/src/components/ui/input/scorePassword.ts
index 59502e2b0..4a9f67265 100644
--- a/src/components/ui/input/scorePassword.ts
+++ b/src/components/ui/input/scorePassword.ts
@@ -33,7 +33,7 @@ export function scorePasswordFunc(password: string): number {
33 33
34 let variationCount = 0; 34 let variationCount = 0;
35 for (const key of Object.keys(variations)) { 35 for (const key of Object.keys(variations)) {
36 variationCount += variations[key] === true ? 1 : 0; 36 variationCount += variations[key] ? 1 : 0;
37 } 37 }
38 38
39 score += (variationCount - 1) * 10; 39 score += (variationCount - 1) * 10;
diff --git a/src/components/ui/select/index.tsx b/src/components/ui/select/index.tsx
index c06ac59b0..0d8520f58 100644
--- a/src/components/ui/select/index.tsx
+++ b/src/components/ui/select/index.tsx
@@ -282,23 +282,23 @@ class SelectComponent extends Component<IProps, IState> {
282 282
283 if (!open) return; 283 if (!open) return;
284 284
285 if (e.keyCode === 38 || e.keyCode === 40) { 285 if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
286 e.preventDefault(); 286 e.preventDefault();
287 } 287 }
288 288
289 if (this.componentRef?.current) { 289 if (this.componentRef?.current) {
290 if (e.keyCode === 38 && selected > 0) { 290 if (e.key === 'ArrowUp' && selected > 0) {
291 this.setState((state: IState) => ({ 291 this.setState((state: IState) => ({
292 selected: state.selected - 1, 292 selected: state.selected - 1,
293 })); 293 }));
294 } else if ( 294 } else if (
295 e.keyCode === 40 && 295 e.key === 'ArrowDown' &&
296 selected < Object.keys(options!).length - 1 296 selected < Object.keys(options!).length - 1
297 ) { 297 ) {
298 this.setState((state: IState) => ({ 298 this.setState((state: IState) => ({
299 selected: state.selected + 1, 299 selected: state.selected + 1,
300 })); 300 }));
301 } else if (e.keyCode === 13) { 301 } else if (e.key === 'Enter') {
302 this.select(Object.keys(options!)[selected]); 302 this.select(Object.keys(options!)[selected]);
303 } 303 }
304 304
@@ -311,19 +311,6 @@ class SelectComponent extends Component<IProps, IState> {
311 this.scrollContainerRef.current.scrollTop = topOffset - 35; 311 this.scrollContainerRef.current.scrollTop = topOffset - 35;
312 } 312 }
313 } 313 }
314
315 switch (e.keyCode) {
316 case 37:
317 case 39:
318 case 38:
319 case 40: // Arrow keys
320 case 32: {
321 break;
322 } // Space
323 default: {
324 break;
325 } // do not block other keys
326 }
327 } 314 }
328 315
329 render(): ReactElement { 316 render(): ReactElement {