aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-05-26 21:05:50 +0530
committerLibravatar GitHub <noreply@github.com>2021-05-26 21:05:50 +0530
commit296ce5ce62bcde6888df291f97105fa912ed7d35 (patch)
treeb28e7d2373f1020c1183469aa3a9feafecede569 /src/lib
parentAdded new entry in context menu: 'Download image' (#1449) (diff)
downloadferdium-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.js7
-rw-r--r--src/lib/TouchBar.js5
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 @@
1import { clipboard, remote, shell } from 'electron'; 1import { clipboard, shell } from 'electron';
2import { app, Menu, dialog, systemPreferences } from '@electron/remote';
2import { autorun, observable } from 'mobx'; 3import { autorun, observable } from 'mobx';
3import { defineMessages } from 'react-intl'; 4import { defineMessages } from 'react-intl';
4import { 5import {
@@ -16,10 +17,6 @@ import { ferdiVersion } from '../helpers/userAgent-helpers';
16 17
17const osName = require('os-name'); 18const osName = require('os-name');
18 19
19const {
20 app, Menu, dialog, systemPreferences,
21} = remote;
22
23const menuItems = defineMessages({ 20const 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 @@
1import os from 'os'; 1import os from 'os';
2import semver from 'semver'; 2import semver from 'semver';
3import { remote } from 'electron'; 3import { TouchBar, getCurrentWindow } from '@electron/remote';
4import { autorun } from 'mobx'; 4import { autorun } from 'mobx';
5 5
6import { isMac } from '../environment'; 6import { 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 = [];