electron

Managing Session Cookies with Firebase and Electron

不羁岁月 提交于 2021-01-27 13:24:29
问题 I am trying to set up session cookies in my Node server, which is the backend for an Electron app. I am trying to follow this guide. https://firebase.google.com/docs/auth/admin/manage-cookies The first thing I am confused about is where this function comes from in the "Sign In" section: const csrfToken = getCookie('csrfToken') Is 'getCookie' a function I am supposed to write myself? I am also not fully following the logic of the "create session cookie" snippet: const csrfToken = req.body

Node .on method firing too many times

二次信任 提交于 2021-01-27 07:30:34
问题 I have an Electron app that presents a directory listing to the user. When the user clicks a button my interface script, interface.js, clears the container div and sends a message to main.js. On receiving the message, main.js scans the directory into an array of filenames and returns the array to interface.js as a response. Interface.js uses a .on method that fires when the response is received and updates the container div with the contents of the array. This is my first real attempt at

Node .on method firing too many times

蓝咒 提交于 2021-01-27 07:29:21
问题 I have an Electron app that presents a directory listing to the user. When the user clicks a button my interface script, interface.js, clears the container div and sends a message to main.js. On receiving the message, main.js scans the directory into an array of filenames and returns the array to interface.js as a response. Interface.js uses a .on method that fires when the response is received and updates the container div with the contents of the array. This is my first real attempt at

Firebase analytics log event not working in production build of electron

纵然是瞬间 提交于 2021-01-27 05:52:45
问题 I used a firebase package for using realtime DB and I want to implement firebase analytics so I used the same package and write code for analytics import * as firebase from 'firebase' import 'firebase/analytics' import { fireBase } from 'configs/config' const config = { apiKey: fireBase.REACT_APP_FIREBASE_API_KEY, authDomain: fireBase.REACT_APP_FIREBASE_AUTH_DOMAIN, databaseURL: fireBase.REACT_APP_FIREBASE_DATABASE_URL, projectId: fireBase.REACT_APP_FIREBASE_PROJECT_ID, storageBucket:

Emit custom events in electron app from main to renderer

拈花ヽ惹草 提交于 2021-01-27 04:47:33
问题 So I know this works because I tried it, but it's not documented anywhere so I'm asking if it's OK to use this practice, and not worry that it would stop working in the future (Electron and nodejs are known to break things from one version to another) This is the type of practice I'm talking about: main.js app.emit('did-something', param1, param2); renderer.js (browser window) const {app} = require('electron').remote; app.on('did-something', (param1, param2) => { $('#whatever').text(param1);

How to use Native Node Modules on a React, ES6, Electron App?

和自甴很熟 提交于 2021-01-27 04:41:50
问题 I have a React, Electron app that I wish to be able to access native node modules from the ES6 compiled (using Babel and Webpack). For example, when I try to require the "fs" node module to access the filesystem I get the following error. ERROR in ./src/app.js Module not found: Error: Cannot resolve module 'fs' in C:\Users\Propietario-1\Documents\GitHub\AMPLI @ ./src/app.js 1:358-371 But when I required this from a "none compiled" js file it works. I can access the "fs" module. Any help is

How to use Native Node Modules on a React, ES6, Electron App?

北城余情 提交于 2021-01-27 04:41:34
问题 I have a React, Electron app that I wish to be able to access native node modules from the ES6 compiled (using Babel and Webpack). For example, when I try to require the "fs" node module to access the filesystem I get the following error. ERROR in ./src/app.js Module not found: Error: Cannot resolve module 'fs' in C:\Users\Propietario-1\Documents\GitHub\AMPLI @ ./src/app.js 1:358-371 But when I required this from a "none compiled" js file it works. I can access the "fs" module. Any help is

Electron close button not working

时光毁灭记忆、已成空白 提交于 2021-01-26 19:09:41
问题 I am trying to create an application using Electron (formerly Atom Shell). This application wraps an AngularJS application and interacts with endpoints created in nodejs to edit and save the HTML content. I am able to create the application with no issues. When I try to access "/saveContent" from electron causes close button (Windows close on top right corner) to become unresponsive, however minimize and maximize works fine without issue. If I access any other endpoint through electron this

Electron close button not working

我是研究僧i 提交于 2021-01-26 19:03:35
问题 I am trying to create an application using Electron (formerly Atom Shell). This application wraps an AngularJS application and interacts with endpoints created in nodejs to edit and save the HTML content. I am able to create the application with no issues. When I try to access "/saveContent" from electron causes close button (Windows close on top right corner) to become unresponsive, however minimize and maximize works fine without issue. If I access any other endpoint through electron this

TypeScript prevents me from passing the correct constraints to getUserMedia

心不动则不痛 提交于 2021-01-26 18:38:56
问题 I'm trying to get a screen to stream to my Angular 5 Electron app. I'm using the desktopCapturer provided by Electron. This is my code: loadCurrentScreensource() { desktopCapturer.getSources({ types: [ 'window', 'screen' ] }, (error, sources) => { if (error) { throw error; } console.log('Finding screen: ' + this.selectedScreenSource); console.log(sources); for (let i = 0; i < sources.length; ++i) { if (sources[i].id === this.selectedScreenSource.id) { console.log('Found screen'); const