aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2023-05-28 13:48:21 +0530
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2023-05-28 13:48:21 +0530
commit99ca310c73024b51fed1f3077375eed7827f2c20 (patch)
tree2bd15986f448129a2291acba90ccc6bf68a233e0 /src/features
parentDisable in-app auto-updates for portable windows installation (fixes #1088) (... (diff)
downloadferdium-app-99ca310c73024b51fed1f3077375eed7827f2c20.tar.gz
ferdium-app-99ca310c73024b51fed1f3077375eed7827f2c20.tar.zst
ferdium-app-99ca310c73024b51fed1f3077375eed7827f2c20.zip
Fix issues reported by sonarqube linter
Diffstat (limited to 'src/features')
-rw-r--r--src/features/appearance/index.ts6
-rw-r--r--src/features/todos/components/TodosWebview.tsx2
-rw-r--r--src/features/todos/containers/TodosScreen.tsx2
-rw-r--r--src/features/todos/store.ts2
-rw-r--r--src/features/webControls/components/WebControls.tsx13
-rw-r--r--src/features/workspaces/components/WorkspaceDrawerItem.tsx9
-rw-r--r--src/features/workspaces/components/WorkspaceItem.tsx2
-rw-r--r--src/features/workspaces/components/WorkspaceSwitchingIndicator.tsx9
-rw-r--r--src/features/workspaces/components/WorkspacesDashboard.tsx2
-rw-r--r--src/features/workspaces/store.ts4
10 files changed, 24 insertions, 27 deletions
diff --git a/src/features/appearance/index.ts b/src/features/appearance/index.ts
index b6e944724..da75bf57b 100644
--- a/src/features/appearance/index.ts
+++ b/src/features/appearance/index.ts
@@ -165,12 +165,6 @@ function generateServiceRibbonWidthStyle(
165 sidebarSizeBias = 44; 165 sidebarSizeBias = 44;
166 break; 166 break;
167 } 167 }
168 case 55: {
169 fontSize = 11;
170 tabItemHeightBias = 13;
171 sidebarSizeBias = 37;
172 break;
173 }
174 case 80: { 168 case 80: {
175 fontSize = 11; 169 fontSize = 11;
176 tabItemHeightBias = 3; 170 tabItemHeightBias = 3;
diff --git a/src/features/todos/components/TodosWebview.tsx b/src/features/todos/components/TodosWebview.tsx
index 4b53df956..7b1b17e64 100644
--- a/src/features/todos/components/TodosWebview.tsx
+++ b/src/features/todos/components/TodosWebview.tsx
@@ -196,7 +196,7 @@ class TodosWebview extends Component<IProps, IState> {
196 )} 196 )}
197 {isTodoUrlValid && ( 197 {isTodoUrlValid && (
198 <Webview 198 <Webview
199 // className={classes.webview} // TODO - [TS DEBT] style not found 199 // className={classes.webview} // TODO: [TS DEBT] style not found
200 onDidAttach={() => { 200 onDidAttach={() => {
201 const { setTodosWebview } = this.props; 201 const { setTodosWebview } = this.props;
202 setTodosWebview(this.webview); 202 setTodosWebview(this.webview);
diff --git a/src/features/todos/containers/TodosScreen.tsx b/src/features/todos/containers/TodosScreen.tsx
index 17f61bd95..8941a4b39 100644
--- a/src/features/todos/containers/TodosScreen.tsx
+++ b/src/features/todos/containers/TodosScreen.tsx
@@ -31,7 +31,7 @@ class TodosScreen extends Component<IProps> {
31 this.props.stores!.services.isTodosServiceActive || false 31 this.props.stores!.services.isTodosServiceActive || false
32 } 32 }
33 isVisible={todosStore.isTodosPanelVisible} 33 isVisible={todosStore.isTodosPanelVisible}
34 // togglePanel={todoActions.toggleTodosPanel} // TODO - [TECH DEBT][PROP NOT USED IN COMPONENT] check it later 34 // togglePanel={todoActions.toggleTodosPanel} // TODO: [TECH DEBT][PROP NOT USED IN COMPONENT] check it later
35 handleClientMessage={todoActions.handleClientMessage} 35 handleClientMessage={todoActions.handleClientMessage}
36 setTodosWebview={webview => todoActions.setTodosWebview(webview)} 36 setTodosWebview={webview => todoActions.setTodosWebview(webview)}
37 width={todosStore.width} 37 width={todosStore.width}
diff --git a/src/features/todos/store.ts b/src/features/todos/store.ts
index 94be4db6a..882fa6a1e 100644
--- a/src/features/todos/store.ts
+++ b/src/features/todos/store.ts
@@ -149,7 +149,7 @@ export default class TodoStore extends FeatureStore {
149 @action stop() { 149 @action stop() {
150 super.stop(); 150 super.stop();
151 debug('TodoStore::stop'); 151 debug('TodoStore::stop');
152 // this.reset(); // TODO - [TECH DEBT][PROP NOT IN CLASS] check it later 152 // this.reset(); // TODO: [TECH DEBT][PROP NOT IN CLASS] check it later
153 this.isFeatureActive = false; 153 this.isFeatureActive = false;
154 } 154 }
155 155
diff --git a/src/features/webControls/components/WebControls.tsx b/src/features/webControls/components/WebControls.tsx
index 74b343948..e76fca6a2 100644
--- a/src/features/webControls/components/WebControls.tsx
+++ b/src/features/webControls/components/WebControls.tsx
@@ -34,10 +34,11 @@ const messages = defineMessages({
34 }, 34 },
35}); 35});
36 36
37const buttonTransition = 37const buttonTransition = window?.matchMedia(
38 window && window.matchMedia('(prefers-reduced-motion: no-preference)') 38 '(prefers-reduced-motion: no-preference)',
39 ? 'opacity 0.25s' 39)
40 : 'none'; 40 ? 'opacity 0.25s'
41 : 'none';
41 42
42const styles = theme => ({ 43const styles = theme => ({
43 root: { 44 root: {
@@ -211,7 +212,7 @@ class WebControls extends Component<IProps, IState> {
211 }); 212 });
212 navigate(inputUrl); 213 navigate(inputUrl);
213 214
214 if (this.inputRef && this.inputRef.current) { 215 if (this.inputRef?.current) {
215 this.inputRef.current.blur(); 216 this.inputRef.current.blur();
216 } 217 }
217 } else if (event.key === 'Escape') { 218 } else if (event.key === 'Escape') {
@@ -220,7 +221,7 @@ class WebControls extends Component<IProps, IState> {
220 inputUrl: url, 221 inputUrl: url,
221 }); 222 });
222 223
223 if (this.inputRef && this.inputRef.current) { 224 if (this.inputRef?.current) {
224 this.inputRef.current.blur(); 225 this.inputRef.current.blur();
225 } 226 }
226 } 227 }
diff --git a/src/features/workspaces/components/WorkspaceDrawerItem.tsx b/src/features/workspaces/components/WorkspaceDrawerItem.tsx
index 0ad56d1ae..74ca2797d 100644
--- a/src/features/workspaces/components/WorkspaceDrawerItem.tsx
+++ b/src/features/workspaces/components/WorkspaceDrawerItem.tsx
@@ -19,10 +19,11 @@ const messages = defineMessages({
19 }, 19 },
20}); 20});
21 21
22const itemTransition = 22const itemTransition = window?.matchMedia(
23 window && window.matchMedia('(prefers-reduced-motion: no-preference)') 23 '(prefers-reduced-motion: no-preference)',
24 ? 'background-color 300ms ease-out' 24)
25 : 'none'; 25 ? 'background-color 300ms ease-out'
26 : 'none';
26 27
27const styles = theme => ({ 28const styles = theme => ({
28 item: { 29 item: {
diff --git a/src/features/workspaces/components/WorkspaceItem.tsx b/src/features/workspaces/components/WorkspaceItem.tsx
index b097a8298..6c4dd649b 100644
--- a/src/features/workspaces/components/WorkspaceItem.tsx
+++ b/src/features/workspaces/components/WorkspaceItem.tsx
@@ -1,4 +1,4 @@
1/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ // TODO - [TS DEBT] Need to check and remove it 1/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
2import { Component, ReactElement } from 'react'; 2import { Component, ReactElement } from 'react';
3import { observer } from 'mobx-react'; 3import { observer } from 'mobx-react';
4import withStyles, { WithStylesProps } from 'react-jss'; 4import withStyles, { WithStylesProps } from 'react-jss';
diff --git a/src/features/workspaces/components/WorkspaceSwitchingIndicator.tsx b/src/features/workspaces/components/WorkspaceSwitchingIndicator.tsx
index c9af22c96..e1cc0f785 100644
--- a/src/features/workspaces/components/WorkspaceSwitchingIndicator.tsx
+++ b/src/features/workspaces/components/WorkspaceSwitchingIndicator.tsx
@@ -14,10 +14,11 @@ const messages = defineMessages({
14 }, 14 },
15}); 15});
16 16
17const wrapperTransition = 17const wrapperTransition = window?.matchMedia(
18 window && window.matchMedia('(prefers-reduced-motion: no-preference)') 18 '(prefers-reduced-motion: no-preference)',
19 ? 'width 0.5s ease' 19)
20 : 'none'; 20 ? 'width 0.5s ease'
21 : 'none';
21 22
22const styles = theme => ({ 23const styles = theme => ({
23 wrapper: { 24 wrapper: {
diff --git a/src/features/workspaces/components/WorkspacesDashboard.tsx b/src/features/workspaces/components/WorkspacesDashboard.tsx
index 06738b38c..c5f8909c1 100644
--- a/src/features/workspaces/components/WorkspacesDashboard.tsx
+++ b/src/features/workspaces/components/WorkspacesDashboard.tsx
@@ -147,7 +147,7 @@ class WorkspacesDashboard extends Component<IProps> {
147 icon="alert" 147 icon="alert"
148 type="danger" 148 type="danger"
149 ctaLabel={intl.formatMessage(messages.tryReloadWorkspaces)} 149 ctaLabel={intl.formatMessage(messages.tryReloadWorkspaces)}
150 // ctaLoading={getUserWorkspacesRequest.isExecuting} // TODO - [TECH DEBT][PROP NOT USED IN COMPONENT] need to check and update 150 // ctaLoading={getUserWorkspacesRequest.isExecuting} // TODO: [TECH DEBT][PROP NOT USED IN COMPONENT] need to check and update
151 ctaOnClick={getUserWorkspacesRequest.retry} 151 ctaOnClick={getUserWorkspacesRequest.retry}
152 > 152 >
153 {intl.formatMessage(messages.workspacesRequestFailed)} 153 {intl.formatMessage(messages.workspacesRequestFailed)}
diff --git a/src/features/workspaces/store.ts b/src/features/workspaces/store.ts
index d63feb1f8..53e3b62ed 100644
--- a/src/features/workspaces/store.ts
+++ b/src/features/workspaces/store.ts
@@ -28,7 +28,7 @@ export default class WorkspacesStore extends FeatureStore {
28 28
29 @observable nextWorkspace: Workspace | undefined; 29 @observable nextWorkspace: Workspace | undefined;
30 30
31 @observable workspaceBeingEdited: any = null; // TODO - [TS DEBT] fix type later 31 @observable workspaceBeingEdited: any = null; // TODO: [TS DEBT] fix type later
32 32
33 @observable isSwitchingWorkspace = false; 33 @observable isSwitchingWorkspace = false;
34 34
@@ -36,7 +36,7 @@ export default class WorkspacesStore extends FeatureStore {
36 36
37 @observable isSettingsRouteActive = false; 37 @observable isSettingsRouteActive = false;
38 38
39 stores: any; // TODO - [TS DEBT] fix type later 39 stores: any; // TODO: [TS DEBT] fix type later
40 40
41 actions: Actions | undefined; 41 actions: Actions | undefined;
42 42