aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-08 00:01:37 +0000
committerLibravatar GitHub <noreply@github.com>2021-08-08 05:31:37 +0530
commit97d51a7763b14c92ee71ff9a012311dd9498d803 (patch)
treebd36005031ecb1148f27aa541e7a92a5e3aa4c0c /src/components
parent5.6.1-nightly.17 [skip ci] (diff)
downloadferdium-app-97d51a7763b14c92ee71ff9a012311dd9498d803.tar.gz
ferdium-app-97d51a7763b14c92ee71ff9a012311dd9498d803.tar.zst
ferdium-app-97d51a7763b14c92ee71ff9a012311dd9498d803.zip
refactor: path-references refactoring and using 'import' instead of 'require' (#1752)
* refactor references to 'userData' and 'appData' directories to move hardcoding into single location * convert to es6 for lower memory usage as per https://codesource.io/the-difference-between-import-and-require-in-javascript/
Diffstat (limited to 'src/components')
-rw-r--r--src/components/services/content/ServiceWebview.js4
-rw-r--r--src/components/services/tabs/TabBarSortableList.js9
2 files changed, 2 insertions, 11 deletions
diff --git a/src/components/services/content/ServiceWebview.js b/src/components/services/content/ServiceWebview.js
index 4edbde5e2..3b499a5db 100644
--- a/src/components/services/content/ServiceWebview.js
+++ b/src/components/services/content/ServiceWebview.js
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3import { observer } from 'mobx-react'; 3import { observer } from 'mobx-react';
4import { observable, reaction } from 'mobx'; 4import { observable, reaction } from 'mobx';
5import ElectronWebView from 'react-electron-web-view'; 5import ElectronWebView from 'react-electron-web-view';
6import path from 'path'; 6import { join } from 'path';
7 7
8import ServiceModel from '../../../models/Service'; 8import ServiceModel from '../../../models/Service';
9 9
@@ -59,7 +59,7 @@ class ServiceWebview extends Component {
59 isSpellcheckerEnabled, 59 isSpellcheckerEnabled,
60 } = this.props; 60 } = this.props;
61 61
62 const preloadScript = path.join(__dirname, '../../../', 'webview', 'recipe.js'); 62 const preloadScript = join(__dirname, '..', '..', '..', 'webview', 'recipe.js');
63 63
64 return ( 64 return (
65 <ElectronWebView 65 <ElectronWebView
diff --git a/src/components/services/tabs/TabBarSortableList.js b/src/components/services/tabs/TabBarSortableList.js
index f12d90602..117d799d7 100644
--- a/src/components/services/tabs/TabBarSortableList.js
+++ b/src/components/services/tabs/TabBarSortableList.js
@@ -64,15 +64,6 @@ class TabBarSortableList extends Component {
64 showMessageBadgesEvenWhenMuted={showMessageBadgesEvenWhenMuted} 64 showMessageBadgesEvenWhenMuted={showMessageBadgesEvenWhenMuted}
65 /> 65 />
66 ))} 66 ))}
67 {/* <li>
68 <button
69 className="sidebar__add-service"
70 onClick={() => openSettings({ path: 'recipes' })}
71 data-tip={`${intl.formatMessage(messages.addNewService)} (${ctrlKey}+N)`}
72 >
73 <span className="mdi mdi-plus" />
74 </button>
75 </li> */}
76 </ul> 67 </ul>
77 ); 68 );
78 } 69 }