diff options
author | Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com> | 2021-05-26 21:05:50 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-26 21:05:50 +0530 |
commit | 296ce5ce62bcde6888df291f97105fa912ed7d35 (patch) | |
tree | b28e7d2373f1020c1183469aa3a9feafecede569 /src/lib | |
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/lib')
-rw-r--r-- | src/lib/Menu.js | 7 | ||||
-rw-r--r-- | src/lib/TouchBar.js | 5 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 2131a97be..621be9a12 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -1,4 +1,5 @@ | |||
1 | import { clipboard, remote, shell } from 'electron'; | 1 | import { clipboard, shell } from 'electron'; |
2 | import { app, Menu, dialog, systemPreferences } from '@electron/remote'; | ||
2 | import { autorun, observable } from 'mobx'; | 3 | import { autorun, observable } from 'mobx'; |
3 | import { defineMessages } from 'react-intl'; | 4 | import { defineMessages } from 'react-intl'; |
4 | import { | 5 | import { |
@@ -16,10 +17,6 @@ import { ferdiVersion } from '../helpers/userAgent-helpers'; | |||
16 | 17 | ||
17 | const osName = require('os-name'); | 18 | const osName = require('os-name'); |
18 | 19 | ||
19 | const { | ||
20 | app, Menu, dialog, systemPreferences, | ||
21 | } = remote; | ||
22 | |||
23 | const menuItems = defineMessages({ | 20 | const menuItems = defineMessages({ |
24 | edit: { | 21 | edit: { |
25 | id: 'menu.edit', | 22 | id: 'menu.edit', |
diff --git a/src/lib/TouchBar.js b/src/lib/TouchBar.js index 32f546644..11eaec306 100644 --- a/src/lib/TouchBar.js +++ b/src/lib/TouchBar.js | |||
@@ -1,6 +1,6 @@ | |||
1 | import os from 'os'; | 1 | import os from 'os'; |
2 | import semver from 'semver'; | 2 | import semver from 'semver'; |
3 | import { remote } from 'electron'; | 3 | import { TouchBar, getCurrentWindow } from '@electron/remote'; |
4 | import { autorun } from 'mobx'; | 4 | import { autorun } from 'mobx'; |
5 | 5 | ||
6 | import { isMac } from '../environment'; | 6 | import { isMac } from '../environment'; |
@@ -22,14 +22,13 @@ export default class FranzTouchBar { | |||
22 | } | 22 | } |
23 | 23 | ||
24 | _build() { | 24 | _build() { |
25 | const currentWindow = remote.getCurrentWindow(); | 25 | const currentWindow = getCurrentWindow(); |
26 | 26 | ||
27 | if (this.stores.router.location.pathname.startsWith('/payment/')) { | 27 | if (this.stores.router.location.pathname.startsWith('/payment/')) { |
28 | return; | 28 | return; |
29 | } | 29 | } |
30 | 30 | ||
31 | if (this.stores.user.isLoggedIn) { | 31 | if (this.stores.user.isLoggedIn) { |
32 | const { TouchBar } = remote; | ||
33 | const { TouchBarButton, TouchBarSpacer } = TouchBar; | 32 | const { TouchBarButton, TouchBarSpacer } = TouchBar; |
34 | 33 | ||
35 | const buttons = []; | 34 | const buttons = []; |