diff options
author | 2021-05-26 21:05:50 +0530 | |
---|---|---|
committer | 2021-05-26 21:05:50 +0530 | |
commit | 296ce5ce62bcde6888df291f97105fa912ed7d35 (patch) | |
tree | b28e7d2373f1020c1183469aa3a9feafecede569 /src/components | |
parent | Added new entry in context menu: 'Download image' (#1449) (diff) | |
download | ferdium-app-296ce5ce62bcde6888df291f97105fa912ed7d35.tar.gz ferdium-app-296ce5ce62bcde6888df291f97105fa912ed7d35.tar.zst ferdium-app-296ce5ce62bcde6888df291f97105fa912ed7d35.zip |
Replace 'remote' with 'electron/remote' (#1448)
* Locked new version of 'recipes' submodule with corresponding changes.
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/auth/Locked.js | 6 | ||||
-rw-r--r-- | src/components/services/tabs/TabItem.js | 8 | ||||
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.js | 8 | ||||
-rw-r--r-- | src/components/settings/supportFerdi/SupportFerdiDashboard.js | 4 |
4 files changed, 8 insertions, 18 deletions
diff --git a/src/components/auth/Locked.js b/src/components/auth/Locked.js index c5e8a5aad..1fdbea595 100644 --- a/src/components/auth/Locked.js +++ b/src/components/auth/Locked.js | |||
@@ -1,4 +1,4 @@ | |||
1 | import { remote } from 'electron'; | 1 | import { systemPreferences } from '@electron/remote'; |
2 | import React, { Component } from 'react'; | 2 | import React, { Component } from 'react'; |
3 | import PropTypes from 'prop-types'; | 3 | import PropTypes from 'prop-types'; |
4 | import { observer } from 'mobx-react'; | 4 | import { observer } from 'mobx-react'; |
@@ -12,10 +12,6 @@ import { isMac } from '../../environment'; | |||
12 | 12 | ||
13 | import { globalError as globalErrorPropType } from '../../prop-types'; | 13 | import { globalError as globalErrorPropType } from '../../prop-types'; |
14 | 14 | ||
15 | const { | ||
16 | systemPreferences, | ||
17 | } = remote; | ||
18 | |||
19 | const messages = defineMessages({ | 15 | const messages = defineMessages({ |
20 | headline: { | 16 | headline: { |
21 | id: 'locked.headline', | 17 | id: 'locked.headline', |
diff --git a/src/components/services/tabs/TabItem.js b/src/components/services/tabs/TabItem.js index 24bbe7939..d4714a809 100644 --- a/src/components/services/tabs/TabItem.js +++ b/src/components/services/tabs/TabItem.js | |||
@@ -1,4 +1,6 @@ | |||
1 | import { remote } from 'electron'; | 1 | import { |
2 | Menu, dialog, app, getCurrentWindow, | ||
3 | } from '@electron/remote'; | ||
2 | import React, { Component } from 'react'; | 4 | import React, { Component } from 'react'; |
3 | import { defineMessages, intlShape } from 'react-intl'; | 5 | import { defineMessages, intlShape } from 'react-intl'; |
4 | import PropTypes from 'prop-types'; | 6 | import PropTypes from 'prop-types'; |
@@ -14,8 +16,6 @@ import { ctrlKey, cmdKey } from '../../../environment'; | |||
14 | 16 | ||
15 | const IS_SERVICE_DEBUGGING_ENABLED = (localStorage.getItem('debug') || '').includes('Ferdi:Service'); | 17 | const IS_SERVICE_DEBUGGING_ENABLED = (localStorage.getItem('debug') || '').includes('Ferdi:Service'); |
16 | 18 | ||
17 | const { Menu, dialog, app } = remote; | ||
18 | |||
19 | const messages = defineMessages({ | 19 | const messages = defineMessages({ |
20 | reload: { | 20 | reload: { |
21 | id: 'tabs.item.reload', | 21 | id: 'tabs.item.reload', |
@@ -236,7 +236,7 @@ const styles = { | |||
236 | 'is-disabled': !service.isEnabled, | 236 | 'is-disabled': !service.isEnabled, |
237 | })} | 237 | })} |
238 | onClick={clickHandler} | 238 | onClick={clickHandler} |
239 | onContextMenu={() => menu.popup(remote.getCurrentWindow())} | 239 | onContextMenu={() => menu.popup(getCurrentWindow())} |
240 | data-tip={`${service.name} ${shortcutIndex <= 9 ? `(${ctrlKey}+${shortcutIndex})` : ''}`} | 240 | data-tip={`${service.name} ${shortcutIndex <= 9 ? `(${ctrlKey}+${shortcutIndex})` : ''}`} |
241 | > | 241 | > |
242 | <img | 242 | <img |
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index eef529730..28f456608 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js | |||
@@ -1,4 +1,4 @@ | |||
1 | import { remote } from 'electron'; | 1 | import { app, systemPreferences } from '@electron/remote'; |
2 | import React, { Component, Fragment } from 'react'; | 2 | import React, { Component, Fragment } from 'react'; |
3 | import PropTypes from 'prop-types'; | 3 | import PropTypes from 'prop-types'; |
4 | import { observer } from 'mobx-react'; | 4 | import { observer } from 'mobx-react'; |
@@ -19,10 +19,6 @@ import { | |||
19 | } from '../../../config'; | 19 | } from '../../../config'; |
20 | import { isMac, isWindows } from '../../../environment'; | 20 | import { isMac, isWindows } from '../../../environment'; |
21 | 21 | ||
22 | const { | ||
23 | systemPreferences, | ||
24 | } = remote; | ||
25 | |||
26 | const messages = defineMessages({ | 22 | const messages = defineMessages({ |
27 | headline: { | 23 | headline: { |
28 | id: 'settings.app.headline', | 24 | id: 'settings.app.headline', |
@@ -665,7 +661,7 @@ export default @observer class EditSettingsForm extends Component { | |||
665 | )} | 661 | )} |
666 | {intl.formatMessage(messages.currentVersion)} | 662 | {intl.formatMessage(messages.currentVersion)} |
667 | {' '} | 663 | {' '} |
668 | {remote.app.getVersion()} | 664 | {app.getVersion()} |
669 | {noUpdateAvailable && ( | 665 | {noUpdateAvailable && ( |
670 | <> | 666 | <> |
671 | <br /> | 667 | <br /> |
diff --git a/src/components/settings/supportFerdi/SupportFerdiDashboard.js b/src/components/settings/supportFerdi/SupportFerdiDashboard.js index f6fc7c171..36c126565 100644 --- a/src/components/settings/supportFerdi/SupportFerdiDashboard.js +++ b/src/components/settings/supportFerdi/SupportFerdiDashboard.js | |||
@@ -1,10 +1,8 @@ | |||
1 | import React, { Component } from 'react'; | 1 | import React, { Component } from 'react'; |
2 | import { defineMessages, FormattedHTMLMessage, intlShape } from 'react-intl'; | 2 | import { defineMessages, FormattedHTMLMessage, intlShape } from 'react-intl'; |
3 | import { remote } from 'electron'; | 3 | import { BrowserWindow } from '@electron/remote'; |
4 | import InfoBar from '../../ui/InfoBar'; | 4 | import InfoBar from '../../ui/InfoBar'; |
5 | 5 | ||
6 | const { BrowserWindow } = remote; | ||
7 | |||
8 | const messages = defineMessages({ | 6 | const messages = defineMessages({ |
9 | headline: { | 7 | headline: { |
10 | id: 'settings.supportFerdi.headline', | 8 | id: 'settings.supportFerdi.headline', |