diff options
-rw-r--r-- | CHANGELOG.md | 6 | ||||
-rw-r--r-- | src/webview/recipe.js | 8 | ||||
-rw-r--r-- | src/webview/spellchecker.ts | 6 |
3 files changed, 16 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8676dc3ab..56d6af379 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md | |||
@@ -1,3 +1,9 @@ | |||
1 | # [v5.6.1-nightly.51](https://github.com/getferdi/ferdi/compare/v5.6.1-nightly.50...v5.6.1-nightly.51) (2021-09-06) | ||
2 | |||
3 | ### Internal | ||
4 | |||
5 | - Remove dependency of recipes requiring `electron` and `electron/remote` modules (#1869 & getferdi/recipes#674) 💖 @vraravam | ||
6 | |||
1 | # [v5.6.1-nightly.50](https://github.com/getferdi/ferdi/compare/v5.6.1-nightly.48...v5.6.1-nightly.50) (2021-09-05) | 7 | # [v5.6.1-nightly.50](https://github.com/getferdi/ferdi/compare/v5.6.1-nightly.48...v5.6.1-nightly.50) (2021-09-05) |
2 | 8 | ||
3 | ### Bug Fixes | 9 | ### Bug Fixes |
diff --git a/src/webview/recipe.js b/src/webview/recipe.js index 1981c8731..10fdbe606 100644 --- a/src/webview/recipe.js +++ b/src/webview/recipe.js | |||
@@ -1,5 +1,6 @@ | |||
1 | /* eslint-disable import/first */ | 1 | /* eslint-disable import/first */ |
2 | import { contextBridge, ipcRenderer } from 'electron'; | 2 | import { contextBridge, desktopCapturer, ipcRenderer } from 'electron'; |
3 | import { BrowserWindow, getCurrentWebContents } from '@electron/remote'; | ||
3 | import { join } from 'path'; | 4 | import { join } from 'path'; |
4 | import { autorun, computed, observable } from 'mobx'; | 5 | import { autorun, computed, observable } from 'mobx'; |
5 | import { pathExistsSync, readFileSync } from 'fs-extra'; | 6 | import { pathExistsSync, readFileSync } from 'fs-extra'; |
@@ -107,6 +108,11 @@ contextBridge.exposeInMainWorld('ferdi', { | |||
107 | displayNotification: (title, options) => | 108 | displayNotification: (title, options) => |
108 | notificationsHandler.displayNotification(title, options), | 109 | notificationsHandler.displayNotification(title, options), |
109 | getDisplayMediaSelector, | 110 | getDisplayMediaSelector, |
111 | getCurrentWebContents, | ||
112 | BrowserWindow, | ||
113 | ipcRenderer, | ||
114 | // TODO: When the discord recipe is changed to use the screenshare.js, this can be removed | ||
115 | desktopCapturer, | ||
110 | }); | 116 | }); |
111 | 117 | ||
112 | ipcRenderer.sendToHost( | 118 | ipcRenderer.sendToHost( |
diff --git a/src/webview/spellchecker.ts b/src/webview/spellchecker.ts index aa9a2350f..30b4ef075 100644 --- a/src/webview/spellchecker.ts +++ b/src/webview/spellchecker.ts | |||
@@ -4,8 +4,8 @@ import { DEFAULT_APP_SETTINGS, isMac } from '../environment'; | |||
4 | 4 | ||
5 | const debug = require('debug')('Ferdi:spellchecker'); | 5 | const debug = require('debug')('Ferdi:spellchecker'); |
6 | 6 | ||
7 | const webContents = getCurrentWebContents(); | 7 | const { session } = getCurrentWebContents(); |
8 | const [defaultLocale] = webContents.session.getSpellCheckerLanguages(); | 8 | const [defaultLocale] = session.getSpellCheckerLanguages(); |
9 | debug('Spellchecker default locale is', defaultLocale); | 9 | debug('Spellchecker default locale is', defaultLocale); |
10 | 10 | ||
11 | export function getSpellcheckerLocaleByFuzzyIdentifier(identifier: string) { | 11 | export function getSpellcheckerLocaleByFuzzyIdentifier(identifier: string) { |
@@ -31,5 +31,5 @@ export function switchDict(locale: string) { | |||
31 | 31 | ||
32 | locales.push(defaultLocale, DEFAULT_APP_SETTINGS.fallbackLocale); | 32 | locales.push(defaultLocale, DEFAULT_APP_SETTINGS.fallbackLocale); |
33 | 33 | ||
34 | webContents.session.setSpellCheckerLanguages(locales); | 34 | session.setSpellCheckerLanguages(locales); |
35 | } | 35 | } |