electron

Using Firebase with Electron

我怕爱的太早我们不能终老 提交于 2019-12-18 10:54:40
问题 I'm trying to use Firebase with Electron. When installing it just like I would on a web page it doesn't work because Electron pages are hosted locally and don't have a hostname . This is the error I'm getting... Uncaught Error: This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console. I can't add an empty (or wildcard) authorized domain to the Firebase console so I'm therefore stuck. Does anybody have any ideas

Creating an Electron app using Visual Studio (not VSCode) w/ Node.js tools

谁说胖子不能爱 提交于 2019-12-18 10:54:07
问题 I'm trying to use Visual Studio (not VSCode) to create a simple Electron app. I'm doing so via the Node.js tools for Visual Studio (v1.1) extension. I'm using the basic quick start app which works fine if I launch via npm start, but if I launch via Visual Studio, I get the following error on start up: 'Cannot find module 'electron' on the first line: const electron = require('electron'); Can I tell Visual Studio to launch the Electron app first before starting it's node.js debugger? Has

Installing electron globally on Ubuntu with NPM

别来无恙 提交于 2019-12-18 09:38:32
问题 Attempting to resolve this question and getting the following error when installing electron globally with NPM: ole@mki:~/angular-electron$ sudo npm install electron -g /usr/bin/electron -> /usr/lib/node_modules/electron/cli.js > electron@1.7.12 postinstall /usr/lib/node_modules/electron > node install.js /usr/lib/node_modules/electron/install.js:48 throw err ^ Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/electron/dist' npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR!

Polymer @import theme file with :host in styles has no affect

淺唱寂寞╮ 提交于 2019-12-18 07:00:23
问题 Back with another Polymer question, I have a Polymer/Electron app that I'm trying to style. I want to create a theme.css that contains a :host block with my entire theme in it that I can then import into my modules stylesheet but I've tried a few different things and tried finding anything in the documentation to no avail. So far, I have tried in, and outside of the <template> definition: <link rel="stylesheet" href="./account-list.css"> with an @import <style>@import 'my-theme.css';</style>

Where an electron application's sessionStorage and localStorage stored?

老子叫甜甜 提交于 2019-12-18 04:54:21
问题 I am running an electron app, where in its renderer process I use HTML5 localStorage. I'm interested to know where in my file-system is this localStorage actually stored (I believe it is in SQLite format). I saw the answer for where is a browser localStorage stored, here: Where the sessionStorage and localStorage stored? I'm asking this because I would like to be able to run 2 instances of this electron application, so that each application will have different settings in which I save in

使用 VS2017 和 js 进行桌面程序开发 - electron 之 Hello Word

ⅰ亾dé卋堺 提交于 2019-12-18 01:42:05
现在基于 js 和 web浏览器核心构建的 C/S 程序越来越多,比如微信桌面版(基于 duilib 和 cef )、VS CODE(基于 electron )等,出于了解的目的,最近学习了 electron。electron具体是什么,可以做什么,这里不做过多的介绍,网上很多相关的介绍,这里主要介绍在VS2017下怎么进行 electron 应用程序的开发。 一、环境搭建 安装 node.js 及 npm。 安装 vs2017 ,必须安装 node.js web开发包。 二、创建空白 Node.js 控制台应用程序项目 创建好的项目结构入下: 三、编写 electron Hello Word 参照 https://github.com/electron/electron/blob/master/docs/tutorial/quick-start.md : 1、打开 package.json 加入: "dependencies": { "electron": "^1.6.6" } 最后内容如下: { "name": "electron-hello-word", "version": "0.0.0", "description": "ElectronHelloWord", "main": "app.js", "author": { "name": "Starts_2000" },

FontAwesome fails to load fonts locally and in electron app

元气小坏坏 提交于 2019-12-17 23:42:47
问题 I have downloaded FontAwesome using npm and then copied the css-file and the fonts into the right folders in the root-diretory of my electron-application using grunts copy task. So far so good. Everything is where it is supposed to be. Now, when i am referencing FontAwesome in my app, the icons do not get loaded. These are the errors that I get in the console: Failed to decode downloaded font: file:///path/to/fonts/fontawesome-webfont.woff2?v=4.4.0 OTS parsing error: Failed to convert WOFF 2

electron 5.0.0 “Uncaught ReferenceError: require is not defined”

纵然是瞬间 提交于 2019-12-17 23:30:00
问题 I had initially been using electron stable (4.x.x), and was able to use require in both my browser and renderer processes. I upgraded to electron beta (5.0.0) because I needed a newer version of node and encountered this error message in my renderer process, Uncaught ReferenceError: require is not defined . Googling and looking through the electron docs, I found comments saying the error could be caused by setting webPreferences.nodeIntegration to false when initializing the BrowserWindow ; e

Electron PDF viewer

假如想象 提交于 2019-12-17 16:27:31
问题 I have an Electron app that loads URL from PHP server. And the page contains an iFrame having a source to PDF. The PDF page seems absolutely ok in a normal web browser but asks for download in Electron. Any help? My codes for html page is <h1>Hello World!</h1> Some html content here... <iframe src="http://mozilla.github.io/pdf.js/web/compressed.tracemonkey-pldi-09.pdf" width="1200" height="800"></iframe> And my js code is something like mainWindow = new BrowserWindow({width: 800, height: 600}

How to deploy an Electron app as an executable or installable in Windows?

末鹿安然 提交于 2019-12-17 10:19:21
问题 I want to generate a unique .exe file to execute the app or a .msi to install the application. How to do that? 回答1: You can package your program using electron-packager and then build a single setup EXE file using InnoSetup. 回答2: You can also try with the electron-boilerplate. Which has 'release' task of gulp and it will create single ready to go executable file for all cross platform. You only need to build application from all three platform to generate particular platform executable.So you