aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
Diffstat (limited to 'src/features')
-rw-r--r--src/features/announcements/api.js4
-rw-r--r--src/features/planSelection/containers/PlanSelectionScreen.js4
-rw-r--r--src/features/quickSwitch/Component.js6
-rw-r--r--src/features/serviceProxy/index.js8
-rw-r--r--src/features/workspaces/components/WorkspaceDrawerItem.js6
5 files changed, 9 insertions, 19 deletions
diff --git a/src/features/announcements/api.js b/src/features/announcements/api.js
index e5c5a7d6f..2ab5a15b2 100644
--- a/src/features/announcements/api.js
+++ b/src/features/announcements/api.js
@@ -1,4 +1,4 @@
1import { remote } from 'electron'; 1import { app } from '@electron/remote';
2import Request from '../../stores/lib/Request'; 2import Request from '../../stores/lib/Request';
3 3
4const debug = require('debug')('Ferdi:feature:announcements:api'); 4const debug = require('debug')('Ferdi:feature:announcements:api');
@@ -6,7 +6,7 @@ const debug = require('debug')('Ferdi:feature:announcements:api');
6export const announcementsApi = { 6export const announcementsApi = {
7 async getCurrentVersion() { 7 async getCurrentVersion() {
8 debug('getting current version of electron app'); 8 debug('getting current version of electron app');
9 return Promise.resolve(remote.app.getVersion()); 9 return Promise.resolve(app.getVersion());
10 }, 10 },
11 11
12 async getChangelog(version) { 12 async getChangelog(version) {
diff --git a/src/features/planSelection/containers/PlanSelectionScreen.js b/src/features/planSelection/containers/PlanSelectionScreen.js
index e4d85cda5..fba65506e 100644
--- a/src/features/planSelection/containers/PlanSelectionScreen.js
+++ b/src/features/planSelection/containers/PlanSelectionScreen.js
@@ -1,7 +1,7 @@
1import React, { Component } from 'react'; 1import React, { Component } from 'react';
2import { observer, inject } from 'mobx-react'; 2import { observer, inject } from 'mobx-react';
3import PropTypes from 'prop-types'; 3import PropTypes from 'prop-types';
4import { remote } from 'electron'; 4import { dialog, app } from '@electron/remote';
5import { defineMessages, intlShape } from 'react-intl'; 5import { defineMessages, intlShape } from 'react-intl';
6 6
7import FeaturesStore from '../../../stores/FeaturesStore'; 7import FeaturesStore from '../../../stores/FeaturesStore';
@@ -10,8 +10,6 @@ import PlanSelection from '../components/PlanSelection';
10import ErrorBoundary from '../../../components/util/ErrorBoundary'; 10import ErrorBoundary from '../../../components/util/ErrorBoundary';
11import { planSelectionStore } from '..'; 11import { planSelectionStore } from '..';
12 12
13const { dialog, app } = remote;
14
15const messages = defineMessages({ 13const messages = defineMessages({
16 dialogTitle: { 14 dialogTitle: {
17 id: 'feature.planSelection.fullscreen.dialog.title', 15 id: 'feature.planSelection.fullscreen.dialog.title',
diff --git a/src/features/quickSwitch/Component.js b/src/features/quickSwitch/Component.js
index 58479e7ef..c5c320f52 100644
--- a/src/features/quickSwitch/Component.js
+++ b/src/features/quickSwitch/Component.js
@@ -1,5 +1,5 @@
1import React, { Component, createRef } from 'react'; 1import React, { Component, createRef } from 'react';
2import { remote } from 'electron'; 2import { getCurrentWindow } from '@electron/remote';
3import PropTypes from 'prop-types'; 3import PropTypes from 'prop-types';
4import { observer, inject } from 'mobx-react'; 4import { observer, inject } from 'mobx-react';
5import { reaction } from 'mobx'; 5import { reaction } from 'mobx';
@@ -244,8 +244,8 @@ export default @injectSheet(styles) @inject('stores', 'actions') @observer class
244 if (isModalVisible && !this.state.wasPrevVisible) { 244 if (isModalVisible && !this.state.wasPrevVisible) {
245 // Set focus back on current window if its in a service 245 // Set focus back on current window if its in a service
246 // TODO: Find a way to gain back focus 246 // TODO: Find a way to gain back focus
247 remote.getCurrentWindow().blurWebView(); 247 getCurrentWindow().blurWebView();
248 remote.getCurrentWindow().webContents.focus(); 248 getCurrentWindow().webContents.focus();
249 249
250 // The input "focus" attribute will only work on first modal open 250 // The input "focus" attribute will only work on first modal open
251 // Manually add focus to the input element 251 // Manually add focus to the input element
diff --git a/src/features/serviceProxy/index.js b/src/features/serviceProxy/index.js
index e78607667..f74f5f0b2 100644
--- a/src/features/serviceProxy/index.js
+++ b/src/features/serviceProxy/index.js
@@ -1,9 +1,5 @@
1import { autorun, observable } from 'mobx'; 1import { autorun, observable } from 'mobx';
2import { remote } from 'electron'; 2import { session } from '@electron/remote';
3
4// import { DEFAULT_FEATURES_CONFIG } from '../../config';
5
6const { session } = remote;
7 3
8const debug = require('debug')('Ferdi:feature:serviceProxy'); 4const debug = require('debug')('Ferdi:feature:serviceProxy');
9 5
@@ -16,8 +12,6 @@ export default function init(stores) {
16 debug('Initializing `serviceProxy` feature'); 12 debug('Initializing `serviceProxy` feature');
17 13
18 autorun(() => { 14 autorun(() => {
19 // const { isServiceProxyEnabled, isServiceProxyIncludedInCurrentPlan } = stores.features.features;
20
21 config.isEnabled = true; 15 config.isEnabled = true;
22 config.isIncludedInCurrentPlan = true; 16 config.isIncludedInCurrentPlan = true;
23 17
diff --git a/src/features/workspaces/components/WorkspaceDrawerItem.js b/src/features/workspaces/components/WorkspaceDrawerItem.js
index 18f424d8a..2e58b70d6 100644
--- a/src/features/workspaces/components/WorkspaceDrawerItem.js
+++ b/src/features/workspaces/components/WorkspaceDrawerItem.js
@@ -1,4 +1,4 @@
1import { remote } from 'electron'; 1import { Menu, getCurrentWindow } from '@electron/remote';
2import React, { Component } from 'react'; 2import React, { Component } from 'react';
3import PropTypes from 'prop-types'; 3import PropTypes from 'prop-types';
4import { observer } from 'mobx-react'; 4import { observer } from 'mobx-react';
@@ -7,8 +7,6 @@ import classnames from 'classnames';
7import { defineMessages, intlShape } from 'react-intl'; 7import { defineMessages, intlShape } from 'react-intl';
8import { ctrlKey } from '../../../environment'; 8import { ctrlKey } from '../../../environment';
9 9
10const { Menu } = remote;
11
12const messages = defineMessages({ 10const messages = defineMessages({
13 noServicesAddedYet: { 11 noServicesAddedYet: {
14 id: 'workspaceDrawer.item.noServicesAddedYet', 12 id: 'workspaceDrawer.item.noServicesAddedYet',
@@ -113,7 +111,7 @@ class WorkspaceDrawerItem extends Component {
113 ])} 111 ])}
114 onClick={onClick} 112 onClick={onClick}
115 onContextMenu={() => ( 113 onContextMenu={() => (
116 onContextMenuEditClick && contextMenu.popup(remote.getCurrentWindow()) 114 onContextMenuEditClick && contextMenu.popup(getCurrentWindow())
117 )} 115 )}
118 data-tip={`${shortcutIndex <= 9 ? `(${ctrlKey}+Alt+${shortcutIndex})` : ''}`} 116 data-tip={`${shortcutIndex <= 9 ? `(${ctrlKey}+Alt+${shortcutIndex})` : ''}`}
119 > 117 >