Commit graph

2816 commits

Author SHA1 Message Date
lilia
c83dbc1bf0
Rename window.env to window.config
Also normalize to camelCase for configs.

// FREEBIE
2017-09-14 16:53:38 -07:00
lilia
75f4c3c522
Update CONTRIBUTING.md
Add how-to for storageProfile config

// FREEBIE
2017-09-14 16:53:38 -07:00
lilia
bc80e5e3b6
Add local.json to gitignore 2017-09-14 16:53:38 -07:00
lilia
6574958087
Remove check for open windows
We now live in a single-window world.

// FREEBIE
2017-09-14 16:53:38 -07:00
lilia
e4e41140c4
Refactor app view
Introduce a top level view for navigating between the inbox and the
installer, enabling an in-window relink flow. Navigation is driven
through the openInbox and openInstaller global events.

// FREEBIE
2017-09-14 16:53:37 -07:00
lilia
3f5505907f
Fix setUnreadCount 2017-09-14 16:53:37 -07:00
lilia
75dbc27cfa
Fix i18n of timer options
It is important to return something falsey in the case where there is
no translation.

// FREEBIE
2017-09-14 16:53:37 -07:00
lilia
590284e4cb
Open links in the default browser 2017-09-14 16:53:37 -07:00
lilia
72c3dc286c
Remove onLaunched handler
This is now handled outside the renderer.

// FREEBIE
2017-09-14 16:53:37 -07:00
lilia
83a020cc5e
Move focus listeners to their own file
// FREEBIE
2017-09-14 16:53:37 -07:00
lilia
9f47ff9040
Adjust initial window size 2017-09-14 16:53:37 -07:00
lilia
0839a358d3
Fix scroll overflow in installer layout
Make it slightly more responsive at smaller window sizes.

// FREEBIE
2017-09-14 16:53:37 -07:00
lilia
8015dc73e3
Add local config overrides to .gitignore
// FREEBIE
2017-09-14 16:53:37 -07:00
lilia
4963af60c9
Use default output dir: ./dist 2017-09-14 16:53:37 -07:00
lilia
d12c94d44e
Update CONTRIBUTING.md 2017-09-14 16:53:36 -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
34042415e9
Database logging cancels persistent debug log storage
Database logging is helpful as a debugging tool, but it creates an
infinite loop with the debug log, which wants to write to the database,
which wants to write to the log, which wants to write to the database,
which wants to write to the log, which wants to write to the database,
which wants to write to the log, which wants to write to the database...

// FREEBIE
2017-09-14 16:53:36 -07:00
lilia
550b926a15
Log on preload 2017-09-14 16:53:36 -07:00
lilia
6a49036da9
Bump to 1.0.1 2017-09-14 16:53:36 -07:00
lilia
a381d9c975
Fix focus detection 2017-09-14 16:53:36 -07:00
lilia
81a40bb548
Remove spaces from windows installer name
Spaces in the file name get escaped to %20. Then the percent sign gets
escaped again on the way to s3 upload, such that the object name on s3
ends up as %2520. To fix this, we can simply omit spaces from our
artifact names.

// FREEBIE
2017-09-14 16:53:36 -07:00
lilia
5650748961
Fix pre-populated device name 2017-09-14 16:53:36 -07:00
lilia
32be90c728
Fix missing icons on linux
Move these to where the build expects them to be.

In theory electron-builder should generate these from a build/icon.icns
but that doesn't seem to be working.

// FREEBIE
2017-09-14 16:53:36 -07:00
lilia
9e39442ea8
Setup publishing to s3 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
25b0fbd949
Fix exceptions on window close
The stopListening function was being passed the close event as an
argument, which caused it to throw.

// FREEBIE
2017-09-14 16:53:36 -07:00
lilia
49cdc98386
Fix lightbox 2017-09-14 16:53:35 -07:00
lilia
a99890d254
Generate ico and icns from png
`npm run icon-gen` builds icon files from png files in the images
directory, outputting to build/icon.{ico,icns} (the expected location
for electron-builder).

// FREEBIE
2017-09-14 16:53:35 -07:00
lilia
3b287185ef
Fix autoUpdater error in development 2017-09-14 16:53:35 -07:00
lilia
acd19fd759
Fix inbox styles 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
88893079d2
Fix restart 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
45bf7330ac
Scope install styles to install element 2017-09-14 16:53:35 -07:00
lilia
285b5ce062
Get install flow working in main window
// FREEBIE
2017-09-14 16:53:35 -07:00
lilia
beb058aed6
Add productName to package.json
This defines the display name of the packaged app. It can contain
spaces.

// 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
584d29f4a4
Exclude some files from inclusion in packaged app
This adds and extends the default `files` config from electron-builder
such that it adds all and only the necessary files to our app.asar.

// FREEBIE
2017-09-14 16:53:34 -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
6686621b0b
Fix file dialog 2017-09-14 16:53:34 -07:00
lilia
5a6e65d11b
Merge index.html into background.html
Nothing stops us from rendering the inbox in the background page, since
it is no longer a background page at all. TODO: intercept window close
events to hide this window instead of closing it unless the app is quit
explicitly.

// FREEBIE
2017-09-14 16:53:34 -07:00
lilia
859d49b3f4
Use relative paths
// FREEBIE
2017-09-14 16:53:34 -07:00
lilia
95e809636a
Quick fix for undefined references to chrome.* 2017-09-14 16:53:34 -07:00
lilia
83d827c127
Configure electron-builder
// FREEBIE
2017-09-14 16:53:34 -07:00
lilia
995ccda9e4
Add electron and electron-builder dev dependencies
// FREEBIE
2017-09-14 16:53:34 -07:00
lilia
e6e8f02fb7
Populate required fields in package.json
// FREEBIE
2017-09-14 16:53:34 -07:00