Commit graph

114 commits

Author SHA1 Message Date
lilia
590284e4cb
Open links in the default browser 2017-09-14 16:53:37 -07:00
lilia
9f47ff9040
Adjust initial window size 2017-09-14 16:53:37 -07:00
lilia
7e1bee1082
Configure app/build using node config
Add environment-specific configs under `./config` and integrate with the
build system. Also changes package.json `files` from blacklist to
whitelist.

// FREEBIE
2017-09-14 16:53:36 -07:00
lilia
449c3e2428
Don't auto-open devtools in prod 2017-09-14 16:53:36 -07:00
lilia
e112217095
Add standard menus 2017-09-14 16:53:36 -07:00
lilia
3b287185ef
Fix autoUpdater error in development 2017-09-14 16:53:35 -07:00
lilia
86d703bc87
Fix debug log 2017-09-14 16:53:35 -07:00
lilia
63657db3be
Quick fix for i18n
Just use the english locale for now. Load locale data from the
filesystem in the main process and pass it to the renderer preload
script via ipc. Note that we need the locale data to be available by the
time view scripts are loaded.

// FREEBIE
2017-09-14 16:53:35 -07:00
lilia
2bbd0d58c6
Separate development and production environments
Set NODE_ENV at run time or build time to switch the app between dev and
production modes.

At build time, the current NODE_ENV will be included in the packaged
app's package.json file. At runtime we read NODE_ENV from package.json,
but also allow the local environment variable to override. A query
string parsed by a preload script exposes the value to the renderer,
which then determines whether we use the staging or production server.
Additionally, different environments have different user data
directories.

// FREEBIE
2017-09-14 16:53:35 -07:00
lilia
b176bd756c
Ensure app is single-instance
Remove some comments.

// FREEBIE
2017-09-14 16:53:35 -07:00
lilia
f4df38735c
Enable sandbox
// FREEBIE
2017-09-14 16:53:35 -07:00
lilia
28e5c04633
Set AUMID to appId
It is also important to set the Application User Model ID (AUMID) to the
appId of the application, in order for notifications on Windows 8/8.1 to
function and for Window 10 notifications to display the app icon within
the notifications by default. The AUIMD should be set within the Main
process and before any BrowserWindows have been opened, it is normally
the first piece of code executed.

https://github.com/electron-userland/electron-builder/wiki/NSIS#guid-vs-application-name

// FREEBIE
2017-09-14 16:53:34 -07:00
lilia
dcc6f599a2
Auto-update hourly 2017-09-14 16:53:34 -07:00
lilia
2cf7ea0a94
Hello Electron
In package.json, define our main entry point for electron, and add a
node script to start it up.

Add main.js from Electron/electron-quick-start with two modifications.
1. Load background.html instead of index.html
2. Disable node integration in the renderer

At this point we can load the background page in a window
with `npm start`, though it currently breaks on missing chrome app APIs.

// FREEBIE
2017-09-14 16:53:28 -07:00