60 Commits

Author SHA1 Message Date
Feross Aboukhadijeh
cc9ba385bf Show main window before ipcReady
It doesn't flicker anymore if we remove this option, and the app feels
no slower.
2016-06-01 00:25:18 -07:00
Feross Aboukhadijeh
c82bdbd39d Fixes for PR #607 2016-05-31 12:12:25 -07:00
Mathias Rasmussen
556d0cb1c5 Make add button accept non .torrent files 2016-05-31 03:04:02 +02:00
Feross Aboukhadijeh
62cb304971 Move unrelated code out of menu.js and ipc.js 2016-05-29 01:09:42 -07:00
Feross Aboukhadijeh
d4efebd694 Remove focusWindow function
Not needed -- win.show() automatically focuses, unminimizes, and shows
the window.
2016-05-28 19:10:55 -07:00
Feross Aboukhadijeh
001601bc5f Major refactor -- split windows into separate files 2016-05-27 00:01:30 -07:00
Feross Aboukhadijeh
f238b2d105 VLC tweaks
- Start video on top, so it's not obscured by other windows.

- Don't show "video title" which is just "http://localhost:xxxx"

- return after error
2016-05-19 19:43:43 -07:00
Feross Aboukhadijeh
290a25c393 OS X: Bounce the Downloads stack when download completes
(If the download is inside the Downloads folder.)
2016-05-13 12:25:03 -07:00
Feross Aboukhadijeh
6589e134b3 code style 2016-05-13 12:23:59 -07:00
Feross Aboukhadijeh
0b82c83d44 style: remove extraneous parameters 2016-05-12 17:09:10 -07:00
Feross Aboukhadijeh
b1a7543d37 Perf: Use electron.* getter inline, rather than upfront 2016-05-12 17:00:34 -07:00
Feross Aboukhadijeh
dbef07e334 Merge pull request #492 from feross/accelerator
Shortcuts improvements
2016-05-12 16:57:48 -07:00
Feross Aboukhadijeh
5dd5e8661b Remove require('screen')
This is deprecated usage and was just removed in Electron v1.
2016-05-12 16:57:09 -07:00
Feross Aboukhadijeh
2005ee4d0b shortcuts.js: Consistent exported method naming
Exposed methods whose sole purpose is notify the module of an event
firing, should start with "on".
2016-05-12 16:52:13 -07:00
Feross Aboukhadijeh
1eb5504029 move console.time/timeEnd to same file 2016-05-11 17:56:20 +02:00
Feross Aboukhadijeh
18b126e0d2 Remove unnecessary IPC 2016-05-09 16:14:46 +02:00
Feross Aboukhadijeh
facb07cbb1 Add "Show in Folder" to context menu
Based on @watson's PR #463.

Differences:

- Remove the "Open Folder" link from expanded torrent view.
- Use showItemInFolder instead of openItem electron API
- Add a separator
- Use IPC to invoke electron.shell.showItemInFolder from main process
2016-05-09 01:34:35 +02:00
DC
8ebb2349dd External VLC on Windows
Turns out we can't use vlc --version because it pops up a command prompt :/
2016-05-04 04:33:35 -07:00
DC
291ea94a10 Cross platform VLC detection 2016-05-04 00:48:34 -07:00
DC
bde5dc14c3 Play unsupported files in VLC 2016-05-04 00:48:34 -07:00
DC
31ef283e7b Create Torrent dialog 2016-04-27 02:51:45 -07:00
DC
6b70554e63 Center video on current screen (#427)
Fixes #404
2016-04-22 19:59:17 -07:00
Feross Aboukhadijeh
c98f3cd040 Fix JS error on app quit (#377)
This was a rare race condition during app shutdown where a 'wt-'
message would be sent from the hidden webtorrent window to the main
window after the main window was already closed.

Fixes #373
2016-04-10 18:50:00 -07:00
Feross Aboukhadijeh
d49a8e772f Faster startup time (50ms) 2016-04-07 00:58:37 -07:00
DC
9d4c65d1b1 Queue messages for WebTorrent window until it's ready 2016-04-06 03:28:56 -07:00
DC
08a806a643 Add setBounds logging 2016-04-06 02:55:40 -07:00
Feross Aboukhadijeh
8629fc956d clear cast interval when casting stops; naming
* fix ipc logs

* minWidth 425

So title "WebTorrent (BETA)" doesn't get cut off

* clear cast interval when casting stops; naming

Fix #300
2016-04-05 23:12:23 -07:00
Feross Aboukhadijeh
2549307a7e style 2016-04-05 18:34:09 -07:00
Feross Aboukhadijeh
cf3b319fc7 Notification: Focus/unminimize/activate window on click
Before, we would only focus, but not unminimize or show, etc.
2016-04-05 18:33:48 -07:00
DC
db9e3e90c5 WebTorrent process
* Separate hidden window, with its own renderer process, for WebTorrent
  (Must be a window. You cannot run WebRTC at all in a Web Worker, and you can't
   run it well in a node process like the electron main process.)

* Disabled the create-torrent-modal for now. That gives us a consistent UX
  regardless of whether the user dragged files or folders onto the app or opened
  the Create New Torrent menu item.

* Main process routes all messages between the main and webtorrent windows.

* The renderer index.js is smaller now (but still too big), with the WebTorrent
  interface moved to webtorrent.js / it's own process.

* The UI should be faster now, and should not lag under load.
2016-04-05 15:36:26 -07:00
Feross Aboukhadijeh
3b805f6cc3 try-catch console.timeEnd()
If user refreshes after renderer crashes, the this line throws an
exception
2016-04-04 20:40:39 -07:00
Feross Aboukhadijeh
f7482fce5b remove debug dependency 2016-04-01 00:09:51 -07:00
DC
840966c7f0 Remove global shortcuts when player isn't active 2016-03-28 22:57:40 -07:00
Feross Aboukhadijeh
589880f1e3 OS X: Prevent white flash on window open
We got the window to run less JS but now it’s shown by the main process
too soon! This fixes that with a setTimeout.

Perhaps when this issue is fixed
(https://github.com/atom/electron/issues/861) we can remove the timeout.
2016-03-27 00:27:28 -07:00
Feross Aboukhadijeh
9ef1d0a605 Keyboard shortcuts: volume shortcuts should be local
`globalShortcut` will register the shortcut at the OS level, even when
the app is not focused.

Using `localShortcut` would work, but let's put it in the top menu
instead, where all the other shortcuts are.
2016-03-26 20:04:29 -07:00
Feross Aboukhadijeh
0cf89600c0 es6ify 2016-03-26 19:58:04 -07:00
grunjol
4673354703 fixes #116 Add Unity launcher icons 2016-03-25 16:31:12 -03:00
Feross Aboukhadijeh
f0df9011df add log.js module for renderer logging 2016-03-21 20:19:30 -07:00
DC
15e3e49aa4 Fix #176: close window on OSX 2016-03-21 04:06:54 -07:00
DC
fe943db448 Fix window bounds restore on OSx 2016-03-21 03:56:56 -07:00
DC
511c60671c Restore window size correctly
* Don't attempt to change size when maximized or fullscreen
* Bugfix: restore window size correctly when returning from a video so big that it that caused the window to maximize
2016-03-21 02:34:56 -07:00
Feross Aboukhadijeh
81bb8eea7b do all logging in the renderer 2016-03-19 20:32:19 -07:00
DC
381087208c Fix opening files and folders 2016-03-19 19:01:17 -07:00
Feross Aboukhadijeh
4f40e5d963 Fix Exception when dropping .torrent file onto Dock icon when app is closed
Fixes #154
2016-03-19 16:07:35 -07:00
Nate Goldman
a1be66cb96 simplify power save block calls, fix #141 2016-03-14 11:38:59 -07:00
DC
8108c407d3 Torrent details
Show file list, open folder containing downloaded files, open individual files, play/pause individual videos
2016-03-14 09:18:20 -07:00
Nate Goldman
52fc2d88c9 Block "Power Saver" mode while video is playing
fix #106
2016-03-11 16:43:36 -08:00
Feross Aboukhadijeh
713c87729a all main modules have init() function 2016-03-09 15:15:04 -08:00
DC
c176e3897a Add Torrent Link modal 2016-03-09 04:27:01 -08:00
Feross Aboukhadijeh
56536ad55e Move paste to renderer
The ‘clipboard’ module works in the renderer without using the ’remote’
package. So we can eliminate one IPC call this way :)
2016-03-08 21:06:20 -08:00