Skip to content
This repository has been archived by the owner on Sep 22, 2021. It is now read-only.

Open mailto: links #692

Open
wants to merge 338 commits into
base: version_2
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
338 commits
Select commit Hold shift + click to select a range
9b34551
Updated the zoom level modifier
Thomas101 Aug 25, 2016
b5916a3
Some preliminary work for different spellchecker languages #139
Thomas101 Aug 27, 2016
cae85ad
Tray -> Menubar for osx #265
Thomas101 Aug 27, 2016
c7ccab9
Updated keyboard shortcuts for windows and linux #262
Thomas101 Aug 27, 2016
4a4f06a
Added offline startup screen
Thomas101 Aug 27, 2016
85ce46c
Added dictionaries to the spellchecker #139
Thomas101 Aug 27, 2016
a5b9d13
Added unred badge on windows taskbar #235
Thomas101 Aug 27, 2016
7c9b775
Added project info to settings screen
Thomas101 Aug 27, 2016
f418ae6
fix build script to optimise react production builds
Thomas101 Aug 28, 2016
4e62ed6
Changed the update mechanism to use a seperate location from the gith…
Thomas101 Aug 28, 2016
a694c57
Updated first run instructions for osx #253
Thomas101 Aug 28, 2016
111a184
Removed some unused packaging code
Thomas101 Aug 28, 2016
ecabf2c
Version bump
Thomas101 Aug 28, 2016
4710b91
Updated readme
Thomas101 Aug 28, 2016
49927ae
Disable multiple mailbox controls when only mailbox #272
Thomas101 Aug 30, 2016
7ee4c41
Add restart button when changing settings that require restart #280
Thomas101 Aug 30, 2016
d3c2758
Added ignore gpu blacklist commandline switch to fix linux blank page…
Thomas101 Aug 30, 2016
09de19a
Fix to languages list. change electron-prebuilt to be electron
Thomas101 Aug 30, 2016
777b1c0
Added privacy links
Thomas101 Aug 30, 2016
bc388d5
Changed name of windows package
Thomas101 Sep 1, 2016
bc63048
removed hacky zoom level set
Thomas101 Sep 4, 2016
caef90c
Added build scripts to make life easier
Thomas101 Sep 4, 2016
8c05d1a
Test electron build fix2
Thomas101 Sep 4, 2016
6b38703
Revert broken commit
Thomas101 Sep 4, 2016
6c3a3f1
Changed spellchecker for prebuilt native version fixes #275 #277. Als…
Thomas101 Sep 4, 2016
b722799
Refactored dictionary storage to allow storage of multiple dictionari…
Thomas101 Sep 4, 2016
4e4617f
Change spellchecker on the fly #288
Thomas101 Sep 4, 2016
b4c65f9
Added dictionary excludes list for contractions #279
Thomas101 Sep 4, 2016
72903ea
Added show link address #135
Thomas101 Sep 4, 2016
6bb138b
Ability to inject custom content from the models #273. No UI to suppo…
Thomas101 Sep 4, 2016
9837106
Custom js and custom css for mailboxes. #273
Thomas101 Sep 5, 2016
db34568
Deb packaging #294 #224. Unread badges for ubuntu #289
Thomas101 Sep 6, 2016
2b552c7
Added tray dpi multiplier for higher dpi monitors #281
Thomas101 Sep 7, 2016
12bebce
Multiple languages on the spellchecker #288
Thomas101 Sep 8, 2016
0e629bf
Open at login #189
Thomas101 Sep 8, 2016
35f6b56
Update README.md
Thomas101 Sep 8, 2016
c57b852
Add Gitter badge
gitter-badger Sep 8, 2016
add07fc
Merge pull request #298 from gitter-badger/gitter-badge
Thomas101 Sep 8, 2016
ce2a4c2
Update README.md
Thomas101 Sep 8, 2016
ce379c7
Packager fixes. Removed some dev code. Version bump
Thomas101 Sep 9, 2016
a0c0aa5
Import fix
Thomas101 Sep 9, 2016
b03e857
Moving images into .github
Thomas101 Sep 10, 2016
08bc054
Update README.md
Thomas101 Sep 10, 2016
b259e37
Added contributing. Removed no longer needed images
Thomas101 Sep 10, 2016
4e09b3e
Fixed broken image links
Thomas101 Sep 10, 2016
ec56545
Updated packager to rename deb files automagically
Thomas101 Sep 10, 2016
d9d9368
Icons in settings. Restore account avatar to default #299
Thomas101 Sep 11, 2016
4215f46
Style fix when titlebar off and sidebar off
Thomas101 Sep 11, 2016
06a16c0
Fix copying icon in packager
Thomas101 Sep 11, 2016
1bef8ca
Removed open in background for platforms that don't support it #300
Thomas101 Sep 11, 2016
1bd9a64
Patches for spellchecker to support different character sets. Fix for…
Thomas101 Sep 18, 2016
c4d3846
Removed logging
Thomas101 Sep 18, 2016
0df381a
Improvements to the context menu to fix #312
Thomas101 Sep 18, 2016
b51d574
Kill search highlighting on search cancel #311
Thomas101 Sep 18, 2016
ced994f
Add hungarian, malay, lithuanian and estonian dictionaries #308
Thomas101 Sep 18, 2016
65b25ee
Open at login OSX #189
Thomas101 Sep 18, 2016
d6afbea
Updated to electron 1.4.0. Updated some etra deps
Thomas101 Sep 18, 2016
4289289
Open at login win32 #189
Thomas101 Sep 18, 2016
8e6ad79
artificially persist transient cookies in the hope it might help with…
Thomas101 Sep 18, 2016
a6b6b3e
Fix replace mispelling #312
Thomas101 Sep 19, 2016
9c43beb
Option to persist cookies artificially. Hopefully fixes #134
Thomas101 Sep 19, 2016
bddbac8
Added the mapping between dictionaries to fix #316
Thomas101 Sep 19, 2016
236030d
Persist cookie fix when you delete an account
Thomas101 Sep 19, 2016
a240e19
Added userscripts link. Version bump to 1.3.9
Thomas101 Sep 20, 2016
fd5f7ac
Style fix for google apps accouns
Thomas101 Sep 21, 2016
926725e
Style fix for google apps accounts
Thomas101 Sep 21, 2016
3725ada
Fixed file input buttons not being fully file input buttons #321
Thomas101 Sep 21, 2016
1f1a763
Added latvian dictionary #323
Thomas101 Sep 21, 2016
2873cbd
Added inspect to context menu #326
Thomas101 Sep 22, 2016
d14fd5d
Updated to the latest electron. Open downloaded file when clicking on…
Thomas101 Sep 22, 2016
5440332
Linux focus app on tray click when os doesn't support application ind…
Thomas101 Sep 22, 2016
d319171
Update check
Thomas101 Sep 24, 2016
b4c97d3
Handle the downloads in an entirely custom way to ensure the user mai…
Thomas101 Sep 25, 2016
2d54d3d
Added always start minimized option #330
Thomas101 Sep 25, 2016
983af9b
Make wmail respond to hide command when running #330
Thomas101 Sep 25, 2016
3903946
Possible fix for #216
Thomas101 Sep 25, 2016
be6bb0f
Changed depricated selector: to role in appMenu to close #335
Thomas101 Sep 28, 2016
13b95e8
Refactored the webviewinjection to be modular and es6
Thomas101 Sep 28, 2016
c5d48bf
Update deps
Thomas101 Sep 28, 2016
6df741f
Updated deps. Updated tray to have mailboxes in seperate submenus
Thomas101 Oct 2, 2016
d39004b
Removed defunct code
Thomas101 Oct 2, 2016
6f782d6
Updated the cookie persistence code to be more efficient
Thomas101 Oct 2, 2016
d00959e
Added check for updates option #342
Thomas101 Oct 2, 2016
6d4768d
Added framework for default tray icon themeing and added support for …
Thomas101 Oct 5, 2016
5c70f82
Version bump
Thomas101 Oct 5, 2016
e0a36a5
Update README.md
Thomas101 Oct 5, 2016
fb4dd6e
Update README.md
Thomas101 Oct 6, 2016
dd4c4d3
Added reauthenticate button for accounts using artifical cookie persi…
Thomas101 Oct 6, 2016
a616c39
Fix for opening wmail hidden after it was maximised when last opened …
Thomas101 Oct 6, 2016
425619d
Change the output filenames for 32bit and 64bit distros. #355
Thomas101 Oct 6, 2016
5560721
Fixed select all and paste and match style #357
Thomas101 Oct 7, 2016
55bfb5a
Work on adding http auth
Thomas101 Oct 10, 2016
9f07fd2
Fix for opening remote urls #360
Thomas101 Oct 11, 2016
5ae2ea2
Fix for deb installer where isn’t available
Thomas101 Oct 14, 2016
6eedb75
Updated packages
Thomas101 Oct 16, 2016
d31848c
Moved tooltip in sidebar #365
Thomas101 Oct 16, 2016
c52a732
Reload now ignores cache
Thomas101 Oct 16, 2016
f4eabfa
Updated deps
Thomas101 Oct 20, 2016
d5fdee6
Revert "Updated the cookie persistence code to be more efficient"
Thomas101 Oct 20, 2016
bb519c8
Reverted cookie persist code to 1.3.9. Changed persist time to be 30 …
Thomas101 Oct 20, 2016
60c2d90
Be as agressive as possible to try and keep the zoom level set #284
Thomas101 Oct 20, 2016
5585f20
Better performance when no zoom is set #284
Thomas101 Oct 20, 2016
a849be6
removed some dead code
Thomas101 Oct 20, 2016
d6f84a0
Version bump
Thomas101 Oct 20, 2016
8d4c50d
Version bump for prerelease
Thomas101 Oct 20, 2016
c4f711b
Unread badge fix for users with more than 999 unread emails. #368
Thomas101 Oct 24, 2016
9c61c42
Added unread count to titlebar 383
Thomas101 Oct 24, 2016
3d957d5
Added libappindicator1 dependency to deb #340
Thomas101 Oct 24, 2016
a146565
Added memory info button for diagnosing high memory usage #369
Thomas101 Oct 24, 2016
2a023dd
Added option to disable smooth scrolling #218
Thomas101 Oct 24, 2016
ddaefd3
Looks like google changed the way they handle proxy servers #370
Thomas101 Oct 24, 2016
49941b4
Updated unread badges to round at 1000+ and concat to 1k+ etc #368
Thomas101 Oct 26, 2016
dc30383
Added cmd+click option to account menu items. Added account options t…
Thomas101 Oct 26, 2016
3d7f402
Added titlebar to make account picker more obvious in settings #393
Thomas101 Oct 26, 2016
bc70545
Added delete mailbox button to settings screen #393
Thomas101 Oct 26, 2016
2c21cde
Write data with write-file-atomic to be more resilient when writing f…
Thomas101 Oct 26, 2016
c998037
Changed tray icon to show + when the unread count is over 99 #340
Thomas101 Oct 26, 2016
d3deb65
Removed debug code from last commit
Thomas101 Oct 26, 2016
591a987
Unread count fix to reduce across threads before reporting #373 #388
Thomas101 Oct 26, 2016
5a0fd97
Fix all inbox unread mode
Thomas101 Oct 26, 2016
d1c524f
Removed requirement for email in google api calls
Thomas101 Oct 26, 2016
4f40f71
Refactored mailbox sync to preserve usage quotas #389
Thomas101 Oct 26, 2016
bb6bbd2
Code tidyup to the mailboxes
Thomas101 Oct 26, 2016
16f65bd
Version bump
Thomas101 Oct 26, 2016
1d20de0
0 messages fix
Thomas101 Oct 26, 2016
f800d4d
Patch for no messages returned
Thomas101 Oct 26, 2016
b842e84
Version bump
Thomas101 Oct 26, 2016
1fc7ec2
Better handling when opening gmail windows using shift+click #363
Thomas101 Oct 27, 2016
81f36ae
Second attempt at fixing smooth scrolling disablement by pushing the …
Thomas101 Oct 29, 2016
ee9d02e
Fix for pressing the close button causing the app to quit when the wi…
Thomas101 Oct 29, 2016
bd2d9cb
Fixed sync errors not being reported #389
Thomas101 Oct 29, 2016
543c992
Beginning work on custom notifications for linux #327
Thomas101 Oct 29, 2016
c55da4a
Hopefully better unread counts #389
Thomas101 Oct 29, 2016
ee28b97
Version bump 2.0.4
Thomas101 Oct 29, 2016
fa815e6
Revert to using primary label for counts #389
Thomas101 Oct 29, 2016
d8d5593
Removed some dead code just in time for 2.0.4 prerelease
Thomas101 Oct 29, 2016
a2fb8bf
Patch to not refetch the threads #389
Thomas101 Oct 29, 2016
7e39af3
Third attempt at disabling smooth scrolling #218
Thomas101 Oct 30, 2016
854fce3
Testing
Thomas101 Oct 31, 2016
3c4903f
Crawl important and primary inboxes from the dom rather than trying t…
Thomas101 Oct 31, 2016
1494cc8
Dont notify when marking something unread after #411
Thomas101 Oct 31, 2016
79b93f5
Version bump 2.0.5
Thomas101 Oct 31, 2016
606b6f6
Merge branch 'master' into windows_native_packager
Thomas101 Oct 31, 2016
f8ee1cb
Unread patch when logged out of account
Thomas101 Oct 31, 2016
ac7f208
Merge branch 'windows_native_packager'
Thomas101 Nov 1, 2016
4698105
Changed the windows installer generation process, hopefully to be mor…
Thomas101 Nov 1, 2016
fd1ccda
Updated the packager to remove native code from wmail-spellchecker fo…
Thomas101 Nov 1, 2016
9e08849
Experimenting with toggle focus #407
Thomas101 Nov 1, 2016
ec7bfa9
Show and hide the window from the tray #407
Thomas101 Nov 1, 2016
de0c0fe
More work on notifications #327
Thomas101 Nov 7, 2016
cec1545
Always grab the gmail count off the UI rather than the api as this se…
Thomas101 Nov 7, 2016
62dfa43
Notifications fix
Thomas101 Nov 7, 2016
4cc3d08
Ignore case on email headers #416
Thomas101 Nov 7, 2016
c5217c8
More work on linux notifications
Thomas101 Nov 8, 2016
6cc1a35
Version bump to 2.0.6
Thomas101 Nov 8, 2016
a8a253d
Added option to enable & disable using zoom for dsf to see if it help…
Thomas101 Nov 12, 2016
37e0b9e
Option to take gmail count directly from the UI #427 #425
Thomas101 Nov 12, 2016
9b86e46
Updated gmail.js to fix parsing with import inbox #421
Thomas101 Nov 12, 2016
be95037
Version bump 2.0.7
Thomas101 Nov 12, 2016
7a167e4
Updated License information
Thomas101 Dec 7, 2016
1afd5ed
Dependency update. Fixed style issues. Updated sub-package.json files
Thomas101 Dec 7, 2016
23fa1c0
Update README.md
Thomas101 Dec 7, 2016
e150a79
Update README.md
Thomas101 Dec 7, 2016
377fcd6
Fix for receiving deluge of emails when you re-open machine from stan…
Thomas101 Dec 23, 2016
1bf4d21
Dependency updates
Thomas101 Dec 23, 2016
cff756a
Tightened up the loop that indicates to the gmail sync code when unre…
Thomas101 Dec 23, 2016
bc2ba57
Disabled image dragging from sidelist #468
Thomas101 Dec 23, 2016
e519058
Added compose to tray along with the integration into gmail and inbox…
Thomas101 Dec 23, 2016
7988402
Handle mailto from command line #66 #465
Thomas101 Dec 23, 2016
e86e5cd
Added mailto guard
Thomas101 Dec 23, 2016
a1eefd6
Finally aded mailto:// link handling on osx and windows #66 #465
Thomas101 Dec 23, 2016
933e25a
Removed dev stuff from package. Added mailto handler to gnome desktop…
Thomas101 Dec 24, 2016
6700386
Refactored sidelist for some future work and making more use of built…
Thomas101 Dec 24, 2016
9d97c00
- Refactored the google sync store to remove race condition
Thomas101 Dec 24, 2016
2e74fee
Move Building from Source in FAQs
Thomas101 Dec 26, 2016
2253970
Update README.md
Thomas101 Dec 26, 2016
06fef79
Update README.md
Thomas101 Dec 26, 2016
fc5f1dd
Added the desktop file into the linux tar. Ugradeded material-ui lib.…
Thomas101 Dec 26, 2016
f8d8cc5
npm scripts compatibility for Windows
m-tr Dec 27, 2016
20b53fb
Added ability to take count from inbox ui - hopefully to improve unre…
Thomas101 Dec 27, 2016
a7dd62b
Style fixes to sidebar
Thomas101 Dec 27, 2016
7e9fb97
Merge pull request #472 from m-tr/npm_scripts_fixes
Thomas101 Dec 27, 2016
2d073b6
Added mailbox creation wizard
Thomas101 Dec 31, 2016
f1cf15d
Gmail compose fix. Modularised some gmail and inbox code
Thomas101 Dec 31, 2016
13fee02
Added inbox api protection against dom not being ready
Thomas101 Dec 31, 2016
7bed719
Font awesome added. Added app setup wizard
Thomas101 Dec 31, 2016
0d2055c
Updatedthe into screen
Thomas101 Dec 31, 2016
3dca45f
Dependency update
Thomas101 Dec 31, 2016
f7a57da
Typos and style fixes to wizards
Thomas101 Dec 31, 2016
33e2e4b
Popover fixes
Thomas101 Dec 31, 2016
51631eb
Changed the setup process to be more streamlined
Thomas101 Jan 1, 2017
77995ab
Preliminary work on mailbox services
Thomas101 Jan 1, 2017
d1b3ff0
Refactored the mailbox window. Added more framework for supporting mo…
Thomas101 Jan 2, 2017
0151231
Initial version of google services working
Thomas101 Jan 2, 2017
46bd45f
Improved settings for mailboxes with services. Enabled and disable sl…
Thomas101 Jan 3, 2017
0c81399
Some active state on the service tabs
Thomas101 Jan 3, 2017
ab9b9a1
Added timer hold for detecting mail changes
Thomas101 Jan 3, 2017
f2476f4
Refactored the services so they don't contain all the gmail code
Thomas101 Jan 3, 2017
d6c9353
Style fixes
Thomas101 Jan 4, 2017
489f25d
Added dimension
Thomas101 Jan 4, 2017
d7d421f
Version bump 2.0.8
Thomas101 Jan 4, 2017
aae291b
Update README.md
Thomas101 Jan 4, 2017
74aef01
Added compact setting to services UI and added non-compact ui (default)
Thomas101 Jan 8, 2017
b9fc1a0
Added services configuration to mail setup wizard
Thomas101 Jan 8, 2017
657f3c4
Dependency updates. Added version info into settings dialog #495
Thomas101 Jan 8, 2017
d73eecd
Defaulted Ignore GPU Blacklist to be false
Thomas101 Jan 8, 2017
26378cf
Open google docs from google drive in new window #489
Thomas101 Jan 8, 2017
7b843bd
Disable ability to take unread count from inbox UI for all unread mes…
Thomas101 Jan 8, 2017
c82a248
Fix to ginbox unread count scraping
Thomas101 Jan 8, 2017
64fc8de
Updated mailto parsing to handle formatted addresses. e.g. in the for…
Thomas101 Jan 8, 2017
5331098
Made the account context menu anchor to the clicked service rather th…
Thomas101 Jan 8, 2017
a4bb05d
Version bump 2.0.9
Thomas101 Jan 8, 2017
fc64238
fixed spelling derp
chuckreynolds Jan 9, 2017
2ddca0a
More reslient way to fix zoom levels. No more sporadic flashing #284
Thomas101 Jan 10, 2017
ec17612
Merge pull request #515 from chuckreynolds/patch-1
Thomas101 Jan 10, 2017
06bb903
#499: Add Goolge Hangouts service tab
inikolaev Jan 10, 2017
5fcb4be
add cmd/ctrl + { and } keyboard shortcuts
theRealWardo Jan 10, 2017
78dafe8
Update README.md
Thomas101 Jan 12, 2017
bbe5209
#499: Add src attribute which can be set by props
Jan 19, 2017
21ae75d
#499: Resume at previous URL
Jan 19, 2017
6edf51a
#499: Remove unused variable
Jan 19, 2017
5f67ebe
Upgrade to electron 1.6.0
Thomas101 Feb 8, 2017
deab2f6
Updated electron. Vrsion bump 2.1.1
Thomas101 Feb 8, 2017
c514cb5
Add a tooltip to sleepable
gkatsev Feb 8, 2017
1e4b2f9
Update README.md
Thomas101 Feb 22, 2017
4d83e1e
Update CONTRIBUTING.md
Thomas101 Feb 22, 2017
4649b19
Updated dependencies. Moved packager into its own repository. Fix for…
Thomas101 Feb 22, 2017
b8082e8
Changed Ctrl+Alt shortcuts to be Ctrl+Shift on linux and windows #607
Thomas101 Feb 22, 2017
7390518
Move http code into rendering thread to resolve proxy issues with not…
Thomas101 Feb 22, 2017
e4dcf14
Tray click toggles app visibility on windows. #565
Thomas101 Feb 22, 2017
51dfff6
Focus main window when opening mailto link #509
Thomas101 Feb 22, 2017
6217d84
Removed Google Inbox DOM scraping in favour of using the API. Fixed #510
Thomas101 Feb 23, 2017
ae3720a
Merge pull request #521 from inikolaev/499-google-hangouts
Thomas101 Feb 23, 2017
1facf61
Added hangouts to the account wizard
Thomas101 Feb 23, 2017
f1aeaca
Merge pull request #575 from gkatsev/sleepable-tooltip
Thomas101 Feb 23, 2017
04fa4f3
Restyled tooltip. Added some more explainer for sleepable services
Thomas101 Feb 23, 2017
c2e886c
Merge pull request #523 from theRealWardo/master
Thomas101 Feb 23, 2017
693b958
Disable services on non-prerelease as these aren't quite ready
Thomas101 Feb 23, 2017
5d0d916
Added WMail news
Thomas101 Feb 24, 2017
7935e7f
Version bump 2.2.0 release
Thomas101 Feb 24, 2017
0cca9cd
Version bump 2.2.1 prerelease
Thomas101 Feb 24, 2017
eb618b2
Revert "More reslient way to fix zoom levels. No more sporadic flashi…
Thomas101 Feb 28, 2017
a1ced7c
Fixed race condition in tray icon. Added option to re-authenticate ac…
Thomas101 Feb 28, 2017
c4368fc
Readded the inbox configuration screen when adding an account. Better…
Thomas101 Mar 1, 2017
1375466
Version bump to 2.3.0
Thomas101 Mar 1, 2017
9d35da5
Version bump 2.3.1 prerelease
Thomas101 Mar 1, 2017
c03d188
Added github images
Thomas101 Apr 6, 2017
e20a4e5
Updated readme
Thomas101 Apr 6, 2017
9475401
Update README.md
Thomas101 Apr 6, 2017
e389fc5
Update README.md
Thomas101 Feb 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Open at login #189
  • Loading branch information
Thomas101 committed Sep 8, 2016
commit 0e629bf4739ce67836a3491c3a43524a61a78d08
2 changes: 1 addition & 1 deletion src/app/package.json
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@
"node-fetch": "1.6.0",
"os-locale": "1.4.0",
"request": "2.74.0",
"wmail-spellchecker": "Thomas101/wmail-spellchecker#1.0.2",
"uuid": "2.0.2",
"wmail-spellchecker": "Thomas101/wmail-spellchecker#1.0.2",
"yargs": "5.0.0"
},
"devDependencies": {
26 changes: 24 additions & 2 deletions src/app/src/app/main.js
Original file line number Diff line number Diff line change
@@ -23,16 +23,23 @@
const constants = require('../shared/constants')
const storage = require('./storage')
const settingStore = require('./stores/settingStore')
const OSSettings = require('../shared/models/settings/OSSettings')
const argv = require('yargs').parse(process.argv)

Object.keys(storage).forEach((k) => storage[k].checkAwake())

/* ****************************************************************************/
// Commandline switches
// Commandline switches & launch args
/* ****************************************************************************/

if (settingStore.app.ignoreGPUBlacklist) {
app.commandLine.appendSwitch('ignore-gpu-blacklist', 'true')
}
const openHidden = (function () {
if (process.platform === 'darwin' && app.getLoginItemSettings().wasOpenedAsHidden) { return true }
if (argv.hidden) { return true }
return false
})()

/* ****************************************************************************/
// Global objects
@@ -153,7 +160,7 @@

app.on('ready', () => {
appMenu.updateApplicationMenu()
windowManager.mailboxesWindow.start()
windowManager.mailboxesWindow.start(openHidden)
})

app.on('window-all-closed', function () {
@@ -166,6 +173,21 @@
windowManager.mailboxesWindow.show()
})

/* ****************************************************************************/
// Store Events
/* ****************************************************************************/

settingStore.on('changed:os', (evt) => {
if (evt.prev.loginOpenMode !== evt.next.loginOpenMode && process.platform === 'darwin') {
const mode = evt.next.loginOpenMode
const MODES = OSSettings.LOGIN_OPEN_MODES
app.setLoginItemSettings({
openAtLogin: mode === MODES.ON || mode === MODES.ON_BACKGROUND,
openAsHidden: mode === MODES.ON_BACKGROUND
})
}
})

/* ****************************************************************************/
// Exceptions
/* ****************************************************************************/
26 changes: 19 additions & 7 deletions src/app/src/app/stores/settingStore.js
Original file line number Diff line number Diff line change
@@ -25,28 +25,40 @@ class SettingStore {

// Listen for changes
persistence.on('changed:app', () => {
this.language = new AppSettings(persistence.getJSONItem('app', {}))
this.emit('changed', {})
const prev = this.language
this.app = new AppSettings(persistence.getJSONItem('app', {}))
this.emit('changed', { })
this.emit('changed:app', { prev: prev, next: this.app })
})
persistence.on('changed:language', () => {
const prev = this.language
this.language = new LanguageSettings(persistence.getJSONItem('language', {}))
this.emit('changed', {})
this.emit('changed', { })
this.emit('changed:language', { prev: prev, next: this.language })
})
persistence.on('changed:os', () => {
const prev = this.os
this.os = new OSSettings(persistence.getJSONItem('os', {}))
this.emit('changed', {})
this.emit('changed', { })
this.emit('changed:os', { prev: prev, next: this.os })
})
persistence.on('changed:proxy', () => {
const prev = this.proxy
this.proxy = new ProxySettings(persistence.getJSONItem('proxy', {}))
this.emit('changed', {})
this.emit('changed', { })
this.emit('changed:proxy', { prev: prev, next: this.proxy })
})
persistence.on('changed:tray', () => {
const prev = this.tray
this.tray = new TraySettings(persistence.getJSONItem('tray', {}))
this.emit('changed', {})
this.emit('changed', { })
this.emit('changed:tray', { prev: prev, next: this.tray })
})
persistence.on('changed:ui', () => {
const prev = this.ui
this.ui = new UISettings(persistence.getJSONItem('ui', {}))
this.emit('changed', {})
this.emit('changed', { })
this.emit('changed:ui', { prev: prev, next: this.ui })
})
}
}
21 changes: 11 additions & 10 deletions src/app/src/app/windows/MailboxesWindow.js
Original file line number Diff line number Diff line change
@@ -28,16 +28,13 @@ class MailboxesWindow extends WMailWindow {
this.sessionManager = new MailboxesSessionManager(this)
}

start (url) {
super.start('file://' + path.join(MAILBOXES_DIR, 'mailboxes.html'))
}

/* ****************************************************************************/
// Creation & Closing
/* ****************************************************************************/

defaultWindowPreferences () {
return Object.assign(super.defaultWindowPreferences(), {
/**
* @param url: the url to load
* @param hidden=false: true to start the window hidden
*/
start (hidden = false) {
super.start('file://' + path.join(MAILBOXES_DIR, 'mailboxes.html'), {
show: !hidden,
minWidth: 770,
minHeight: 300,
fullscreenable: true,
@@ -50,6 +47,10 @@ class MailboxesWindow extends WMailWindow {
})
}

/* ****************************************************************************/
// Creation & Closing
/* ****************************************************************************/

createWindow () {
super.createWindow.apply(this, Array.from(arguments))

12 changes: 7 additions & 5 deletions src/app/src/app/windows/WMailWindow.js
Original file line number Diff line number Diff line change
@@ -26,9 +26,10 @@ class WMailWindow extends EventEmitter {
/**
* Starts the app
* @param url: the start url
* @param windowPreferences=undefined: additional window preferences to supply
*/
start (url) {
this.createWindow(this.defaultWindowPreferences(), url)
start (url, windowPreferences = undefined) {
this.createWindow(this.defaultWindowPreferences(windowPreferences), url)
}

/* ****************************************************************************/
@@ -37,20 +38,21 @@ class WMailWindow extends EventEmitter {

/**
* The default window preferences
* @param extraPreferences = undefined: extra preferences to merge into the prefs
* @return the settings
*/
defaultWindowPreferences () {
defaultWindowPreferences (extraPreferences = undefined) {
let icon
if (process.platform === 'win32') {
icon = path.join(__dirname, '/../../../icons/app.ico')
} else if (process.platform === 'linux') {
icon = path.join(__dirname, '/../../../icons/app.png')
}

return {
return Object.assign({
title: 'WMail',
icon: icon
}
}, extraPreferences)
}

/**
7 changes: 7 additions & 0 deletions src/scenes/mailboxes/src/stores/settings/settingsActions.js
Original file line number Diff line number Diff line change
@@ -107,6 +107,13 @@ class SettingsActions {
return this.update(SEGMENTS.OS, 'openLinksInBackground', background)
}

/**
* @param mode: the login open mode
*/
setLoginOpenMode (mode) {
return this.update(SEGMENTS.OS, 'loginOpenMode', mode)
}

/* **************************************************************************/
// Proxy Server
/* **************************************************************************/
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
const React = require('react')
const { Toggle, Paper } = require('material-ui')
const { Toggle, Paper, SelectField, MenuItem } = require('material-ui')
const settingsActions = require('../../../stores/settings/settingsActions')
const styles = require('../settingStyles')
const shallowCompare = require('react-addons-shallow-compare')
const { OSSettings } = require('shared/Models/Settings')

module.exports = React.createClass({
/* **************************************************************************/
@@ -63,6 +64,17 @@ module.exports = React.createClass({
label='Open links in background'
labelPosition='right'
onToggle={(evt, toggled) => settingsActions.setOpenLinksInBackground(toggled)} />
{process.platform === 'darwin' ? (
<SelectField
fullWidth
floatingLabelText='Open at Login'
onChange={(evt, index, value) => settingsActions.setLoginOpenMode(value)}
value={os.loginOpenMode}>
<MenuItem value={OSSettings.LOGIN_OPEN_MODES.OFF} primaryText={'Don\'t open at login'} />
<MenuItem value={OSSettings.LOGIN_OPEN_MODES.ON} primaryText='Open at login' />
<MenuItem value={OSSettings.LOGIN_OPEN_MODES.ON_BACKGROUND} primaryText='Open at login (in background)' />
</SelectField>
) : undefined}
</Paper>
</div>
)
10 changes: 10 additions & 0 deletions src/shared/Models/Settings/OSSettings.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
const Model = require('../Model')

const LOGIN_OPEN_MODES = Object.freeze({
OFF: 0,
ON: 1,
ON_BACKGROUND: 2
})

class OSSettings extends Model {

static get LOGIN_OPEN_MODES () { return LOGIN_OPEN_MODES }

get alwaysAskDownloadLocation () { return this._value_('alwaysAskDownloadLocation', true) }
get defaultDownloadLocation () { return this._value_('defaultDownloadLocation', undefined) }
get notificationsEnabled () { return this._value_('notificationsEnabled', true) }
get notificationsSilent () { return this._value_('notificationsSilent', false) }
get openLinksInBackground () { return this._value_('openLinksInBackground', false) }
get loginOpenMode () { return this._value_('loginOpenMode', LOGIN_OPEN_MODES.OFF) }
}

module.exports = OSSettings