remember window position

This commit is contained in:
Dan Flettre
2016-08-24 00:58:18 -05:00
parent 6541291e0d
commit aedbc3c32f
4 changed files with 41 additions and 11 deletions

View File

@@ -18,7 +18,7 @@ console.log('Production: %s portable: %s test: %s',
IS_PRODUCTION, IS_PORTABLE, IS_TEST)
if (IS_PORTABLE) console.log('Portable path: %s', PORTABLE_PATH)
module.exports = {
let cfg = {
ANNOUNCEMENT_URL: 'https://webtorrent.io/desktop/announcement',
AUTO_UPDATE_URL: 'https://webtorrent.io/desktop/update',
CRASH_REPORT_URL: 'https://webtorrent.io/desktop/crash-report',
@@ -93,9 +93,19 @@ module.exports = {
WINDOW_WEBTORRENT: 'file://' + path.join(__dirname, '..', 'static', 'webtorrent.html'),
WINDOW_MIN_HEIGHT: 38 + (120 * 2), // header height + 2 torrents
WINDOW_MIN_WIDTH: 425
WINDOW_MIN_WIDTH: 425,
UI_HEADER_HEIGHT: 38,
UI_TORRENT_HEIGHT: 100
}
cfg.DEFAULT_BOUNDS = {
width: 500,
height: cfg.UI_HEADER_HEIGHT + (cfg.UI_TORRENT_HEIGHT * (cfg.DEFAULT_TORRENTS.length + 1))
}
module.exports = cfg
function getConfigPath () {
if (IS_PORTABLE) {
return PORTABLE_PATH