aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/ServicesStore.js
diff options
context:
space:
mode:
authorLibravatar Bennett <hello@vantezzen.io>2020-06-21 09:19:59 +0200
committerLibravatar GitHub <noreply@github.com>2020-06-21 12:49:59 +0530
commit0d6d623d1e34cdbff2d46229165b49289a9a0619 (patch)
tree83f6a22a08e354da58adf3ed0393f4d39bca6124 /src/stores/ServicesStore.js
parentPrepare and Release/5.6.0 beta.1 (#820) (diff)
downloadferdium-app-0d6d623d1e34cdbff2d46229165b49289a9a0619.tar.gz
ferdium-app-0d6d623d1e34cdbff2d46229165b49289a9a0619.tar.zst
ferdium-app-0d6d623d1e34cdbff2d46229165b49289a9a0619.zip
Add FAB to service dashboard (#824)
* Implement #387 * Fix lint * Upgrade to Electron 9 * Remove dependency on electron-spellchecker * Allow multiple languages to be selected * Fix lint * Don't show spellchecker language chooser for macOS * Fix _requireAuthenticatedUser throwing error on startup * Add FAB
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r--src/stores/ServicesStore.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index a8d9cc1fb..448260638 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -618,7 +618,10 @@ export default class ServicesStore extends Store {
618 const service = this.one(serviceId); 618 const service = this.one(serviceId);
619 619
620 if (service.webview) { 620 if (service.webview) {
621 service.webview.send(channel, args); 621 // Make sure the args are clean, otherwise ElectronJS can't transmit them
622 const cleanArgs = JSON.parse(JSON.stringify(args));
623
624 service.webview.send(channel, cleanArgs);
622 } 625 }
623 } 626 }
624 627
@@ -895,10 +898,14 @@ export default class ServicesStore extends Store {
895 const service = this.one(serviceId); 898 const service = this.one(serviceId);
896 899
897 if (service.webview) { 900 if (service.webview) {
901 // We need to completely clone the object, otherwise Electron won't be able to send the object via IPC
902 const shareWithWebview = JSON.parse(JSON.stringify(service.shareWithWebview));
903
898 debug('Initialize recipe', service.recipe.id, service.name); 904 debug('Initialize recipe', service.recipe.id, service.name);
899 service.webview.send('initialize-recipe', Object.assign({ 905 service.webview.send('initialize-recipe', {
906 ...shareWithWebview,
900 franzVersion: app.getVersion(), 907 franzVersion: app.getVersion(),
901 }, service.shareWithWebview), service.recipe); 908 }, service.recipe);
902 } 909 }
903 } 910 }
904 911