electron

How to make Electron WebView fill specified size?

匿名 (未验证) 提交于 2019-12-03 00:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I've tried adding an Electron WebView to a basic app and set minwidth and minheight on it as shown below. When it loads though it always ends up as 784px X 150px <webview id = "webpage" src = "https://www.duckduckgo.com/" autosize = "on" minwidth = "800px" minheight = "1200px" ></webview> 回答1: This is an issue other people have reported too, here in atom discussion page under "Webview autosize" title : https://discuss.atom.io/t/webview-autosize/16915/6 It seems that 'autosize' doesn't say the last word about the resulting window

Electron & ReactJS, Use BrowserWindow for GitHub oAuth authentication

a 夏天 提交于 2019-12-03 00:45:44
I have set up github's Electron with ReactJs. So I got a BrowserWindow and a react app playing nicely in that window. What I'm trying to achieve is to get authenticated with GitHub. So when a user presses the Login with Github button, a new BrowserWindow opens and goes to the github authorize app url. The issue I have has to do with the callback and how I will get the code returned from the callback. I've done it with Apache Cordova and the InAppBrowser but it was different since I was able to use localhost as a callback. What I've done so far with electron is opening the new BrowserWindow but

electron 01 编译 (vs2017 windows10)

匿名 (未验证) 提交于 2019-12-03 00:43:02
按照官网说明 http://electronjs.org/docs/development/build-instructions-windows 需要安装 Visual Studio 2017 Python 2.7 Node.js Git 如果编译libchromiumcontent,要下载chromium源码。需要vpn。参考 https://blog.csdn.net/longji/article/details/54632083 # 代码下载比较快 git clone https: //github.com/electron/electron.git Bootstrap 脚本也是必须下载的构建依赖,来创建项目文件. 需要注意的是我们使用ninja创建 Electron,这样的话就不需要生成 Visual Studio 项目了。 # 如果本地有多个python环境,把python2.7的环境变量设置到最前面 # set PATH=C: \python \Python 27;C: \python \Python 27 \Scripts ; %PATH% cd electron # 因为这个bootstrap.py是带.py后缀的,所以前面不带python也可以。 # script\bootstrap.py -v 的运行时间稍微长一下,要下载vendor依赖。 # 为了生产vs工程

How to run express within electron?

≯℡__Kan透↙ 提交于 2019-12-03 00:42:34
I have been able to successfully run express within the electron app via repositories such as https://github.com/theallmightyjohnmanning/electron-express https://github.com/frankhale/electron-with-express However, I was advised not to do so due to the GNU GENERAL PUBLIC LICENSE that they impose. I am trying to create a commercial app that will monetize. Hence, a liscene like MIT might do, but not sure about GNU. Anyhow, I have been trying to follow his procedure: https://gist.github.com/maximilian-ruppert/a446a7ee87838a62099d But is running into some issues. Heres what I have done so far. #

Electron.js How to minimize/close window to system tray and restore window back from tray?

◇◆丶佛笑我妖孽 提交于 2019-12-03 00:42:17
问题 I want my Electron.js application to live on system tray and whenever the user wants to do something they can restore from the system tray do something and minimize/close it back to system tray. How do i do that? I've seen the tray section from the documentation but doesn't help much to achieve what i want. Here is what i got so far on the main.js file var application = require('app'), BrowserWindow = require('browser-window'), Menu = require('menu'), Tray = require('tray'); application.on(

electron windows 版本升级

匿名 (未验证) 提交于 2019-12-03 00:40:02
近段时间项目需要用到electron 版本升级是避免不了的 对自己版本升级做一个备忘 第一步 :我使用到了autoUpdate 所以首先得加载 npm install electron-updater --save 第二步设置package.json(这里只贴跟升级相关的)在build下面加入以下代码 "publish": [ { "provider": "generic", "url": "http://www.xxx.com/download/"//你的远程下载地址 } ], "directories": { "output": "build"//文件打包的目录文件 这个可有可无 }, 注意:这个url是你的远程下载地址 也就是版本更新的时候的请求地址 你会将你升级的exe文件和yml文件放进这个目录下面 这里不要配置错误了 第三步:在electron的main.js (electron-vue 下面的index.js)加入以下代码 import { autoUpdater } from 'electron-updater' import { app, BrowserWindow, ipcMain } from 'electron' // 检测更新,在你想要检查更新的时候执行,renderer事件触发后的操作自行编写 function updateHandle () { let

electron 读取注册表,以调用Photoshop为例

匿名 (未验证) 提交于 2019-12-03 00:26:01
或者直接在npm:https://github.com/ironSource/node-regedit 第二步,首先理解windows注册表的4个分类: 就会出现下面的目录列表: 我们所寻找的软件安装路径会在HKEY_LOCAL_MACHINE下面简称:HKLM,下面是代码 搞定! 文章来源: electron 读取注册表,以调用Photoshop为例

Electron获取系统windows对象

匿名 (未验证) 提交于 2019-12-03 00:21:02
// 开发环境:Angular5+Electron // 遇到问题: 在angular5页面中如何获得windows对象 解决如下: import { Injectable } from '@angular/core'; import * as childProcess from 'child_process'; // add this import BrowserWindow = Electron.BrowserWindow; import Shell = Electron.Shell; @Injectable() export class ElectronService { window: BrowserWindow; this.window = window.require('electron').remote.getCurrentWindow(); . shell = require ( 'electron' ). shell ; } 文章来源: Electron获取系统windows对象

使用ubuntu钉钉

匿名 (未验证) 提交于 2019-12-03 00:11:01
目前,公司内部很多人都在使用Ubuntu操作系统,但像钉钉这样的应用没有提供Ubuntu版本。网页版钉钉有很多不好用的地方: 在网页端来新消息之后只有提示音却没有弹窗通知,如果没听见提示音可能错失一些消息 无法全屏,网页版界面太拥挤 钉钉作为一个网页存在,在浏览器中很不容易找到,每次想用钉钉时,都需要在一堆标签页中寻找半天,远不如直接从任务栏中打开方便,也无法使用alt+tab快捷键快速切换。 electron是非常流行的前端技术,它本身就是chromium和操作系统的集成。利用electron,可以将前端技术用于开发桌面程序。electron起源于github推出的编辑器atom,但是atom太卡了,完全不是sublime的对手。微软见状,对atom做了许多优化,起名vscode,目前vscode几乎是最流行的编辑器了。 使用electron可以对钉钉网页版包装一层,让钉钉网页版完全变成“单机版”的体验。简言之,编写一个专门运行网页版钉钉的浏览器,改一下这个浏览器的图标,就可以得到一个桌面版钉钉。 安装步骤 下载安装文件夹: 下载地址 解压压缩包。如果直接运行dingding 1.0.0.AppImage也是可以的,但是那样就没有钉钉的图标了。添加图标的原理就是创建如下内容的dingding.desktop,并将此文件复制到/usr/share/applications目录下。

Electron GUI

匿名 (未验证) 提交于 2019-12-03 00:03:02
Electron 是由Github开发,用HTML,CSS和JavaScript来构建跨平台桌面应用程序的一个开源库。 Electron通过将 Chromium 和 Node.js 合并到同一个运行时环境中,并将其打包为Mac,Windows和Linux系统下的应用来实现这一目的。 Electron于2013年作为构建Github上可编程的文本编辑器 Atom 的框架而被开发出来。这两个项目在2014春季开源。 目前它已成为开源开发者、初创企业和老牌公司常用的开发工具。 官网地址: https://electronjs.org/ 来源:51CTO 作者: 像风一样自由D 链接:https://blog.csdn.net/sinat_41292836/article/details/100732292