Commit graph

111 commits

Author SHA1 Message Date
Christopher Willis-Ford
9b224115a5 fix infinite load screen introduced with Electron 6 changes 2020-01-16 08:16:23 -08:00
Ben Wheeler
43f7cd5028 add canEditTitle and projectTitle props 2019-10-28 21:56:37 -04:00
Ben Wheeler
f9e77bc508 ScratchDesktopHOC manages project title, rather than wrapping with TitledHOC 2019-10-25 15:04:09 -04:00
Christopher Willis-Ford
1df51faa95 detect project save based on content type
Also, if saving a file is canceled, only try to cancel project save
telemetry if the save was a project save.

Also also, don't skip showing the save dialog just because a file
doesn't have an extension. Instead, just skip trying to determine
filters for the extension in this case.
2019-09-16 11:23:13 -07:00
apple502j
9ef9d8fce3
Check extension before setting title 2019-09-13 22:29:21 +09:00
Christopher Willis-Ford
d960057260 telemetry: add 'platform' and improve 'version' 2019-08-05 15:46:29 -07:00
Christopher Willis-Ford
740872d14a fix lint problems 2019-08-05 15:39:33 -07:00
Christopher Willis-Ford
232f2f4310 fix "about" window in dev mode 2019-08-05 15:39:33 -07:00
Christopher Willis-Ford
53812d79c7 fix "about" window in packaged context 2019-07-28 18:40:58 -07:00
Christopher Willis-Ford
9746fc1dee add content to "about" window 2019-07-28 17:32:14 -07:00
Christopher Willis-Ford
3cba6fea38 add support for an "about" window 2019-07-28 15:23:38 -07:00
Chris Willis-Ford
b452eba142
Merge pull request #60 from cwillisf/show-loading-screen-sooner
Show main window ASAP, even if it's just a loading screen
2019-07-26 23:47:00 -07:00
Christopher Willis-Ford
68bb1f4acc apply Scratch 3.0 color and font styles to loading screen 2019-07-25 18:46:31 -07:00
Christopher Willis-Ford
00175f521d set project title from save file name 2019-07-18 14:45:01 -07:00
Christopher Willis-Ford
f57320e718 Show splash screen ASAP, load render JS async 2019-07-17 17:09:25 -07:00
Christopher Willis-Ford
5b028a1d3d correctly format code metadata in telemetry events 2019-07-17 17:01:10 -07:00
Christopher Willis-Ford
414a1f0cfd move index.js to app.jsx and add new index.js shim
Note that the code inside app.jsx is exactly what used to be in index.js
so this change causes no functional difference and just represents
preparation for upcoming changes. It simplifies at least two upcoming
changes: one wants the app code to be in a different file and the other
is simplified by JSX syntax.
2019-07-17 16:56:56 -07:00
Christopher Willis-Ford
02b06b29a4 fix telemetry init and enforce queue length limit 2019-07-09 13:59:39 -07:00
Christopher Willis-Ford
d93cd7ae33 Remember last save location 2019-01-09 10:41:33 -08:00
Christopher Willis-Ford
1113ba0c18 Support more file types in save dialog override 2019-01-09 10:41:33 -08:00
Christopher Willis-Ford
c0b8752fdc Override 'will-download' event to use native save window 2019-01-09 10:41:20 -08:00
Paul Kaplan
a7519d167d
Merge pull request #20 from LLK/fix-mac-shortcuts
Include menu with default keyboard shortcuts to allow mac to work
2018-12-27 15:01:38 -05:00
Paul Kaplan
87d9a5e448 Include menu with default keyboard shortcuts to allow mac to work 2018-12-27 13:49:26 -05:00
Ben Wheeler
9c7aceea70 attempt to open _blank link targets in OS's default browser, not electron 2018-12-26 13:59:02 -08:00
Christopher Willis-Ford
4c838c01be Revert "Add last-resort hook to stop link navigation"
This reverts commit c8f6b38df2. It caused
the menus (like File -> Save) not to work.
2018-12-21 12:38:16 -08:00
Christopher Willis-Ford
4848d7548a Add version field to telemetry events 2018-12-21 11:31:02 -08:00
Christopher Willis-Ford
22dd1821f4 Supply defaults for telemetry event fields 2018-12-21 11:31:02 -08:00
Christopher Willis-Ford
34d96bf49c Add onProjectTelemetryEvent handler for GUI 2018-12-21 11:31:02 -08:00
Christopher Willis-Ford
77b8a13d64 Populate telemetry events 2018-12-21 11:31:02 -08:00
Christopher Willis-Ford
6486201bf9 Improve appWillClose() reliability 2018-12-21 11:31:02 -08:00
Christopher Willis-Ford
64da5dff27 Hook up telemetry opt-in/out modal 2018-12-21 11:31:02 -08:00
Christopher Willis-Ford
30cafbf508 Enable telemetry persistence 2018-12-21 11:31:02 -08:00
Christopher Willis-Ford
64c2755c70 First draft telemetry client
To do: queue and client ID persistence
2018-12-21 11:31:00 -08:00
Christopher Willis-Ford
5517f9a184 Set isScratchDesktop 2018-12-21 10:26:54 -08:00
Christopher Willis-Ford
c8f6b38df2 Add last-resort hook to stop link navigation
Links which cause the browser to navigate to another page should be
removed or disabled in Scratch Desktop to prevent Electron from
navigating away from the editor. If we miss disabling or removing such a
link, this last-resort hook will disable navigation after the user
clicks a link.
2018-12-14 14:57:55 -08:00
Christopher Willis-Ford
6bf5d4a41a Improve main window behavior and code readability
- Closing behavior on Mac is now consistent with other platforms
- The main window is not shown until ready
- Minor code reorg to separate concerns and improve readability
2018-12-14 13:07:24 -08:00
Christopher Willis-Ford
356b4475b6 Add icon 2018-12-13 12:01:08 -08:00
Christopher Willis-Ford
64a06d5b8f Obey scratch-gui's onbeforeunload result
The `scratch-gui` project saver uses `onbeforeunload` to request
confirmation before navigating away from an unsaved project.
Unfortunately Electron suppresses the confirmation dialog that browsers
would normally display. Instead, Electron offers a `will-prevent-unload`
event in the main process: this event fires when `onbeforeunload`
requests a confirmation dialog.

This change adds a handler for `will-prevent-unload` which displays a
quit confirmation dialog so that the overall behavior is similar to what
happens in a regular browser.
2018-12-12 17:10:43 -08:00
Christopher Willis-Ford
fcf629ba1c Let scratch-gui handle 'onbeforeunload' 2018-12-12 17:07:04 -08:00
Christopher Willis-Ford
046c6188f9 Don't import scratch-gui internals 2018-11-08 18:48:44 -08:00
Christopher Willis-Ford
4767897f4b only import electron-devtools-installer in dev mode 2018-10-31 15:57:04 -07:00
Christopher Willis-Ford
cb0852101e Load default project on startup 2018-10-24 15:00:03 -07:00
Christopher Willis-Ford
78e6831cbb Add ElectronStorageHelper to load bundled assets 2018-10-24 09:47:59 -07:00
Christopher Willis-Ford
071ba28fc8 Fix static assets path 2018-10-24 09:47:59 -07:00
Christopher Willis-Ford
914f883c65 Eliminate redundant index.js->index.jsx shim 2018-10-24 09:47:59 -07:00
Christopher Willis-Ford
53e8723086 Fix build with/without npm ln, match scratch-gui
Match the versions of Webpack, Babel, and related plugins as used in
scratch-gui. That plus a few other tweaks means that this repository
builds the same with or without `npm ln scratch-gui`, and also means
that all syntax used in scratch-gui should build the same here.
2018-10-24 09:47:52 -07:00
Christopher Willis-Ford
99b172d893 Add React dev tools 2018-10-13 01:26:58 -07:00
Christopher Willis-Ford
751406722d eslint: Switch src/ env from shared to node 2018-10-12 23:03:16 -07:00
Christopher Willis-Ford
97db496efc Fix lint rules for src/renderer/ 2018-09-27 14:35:04 -07:00
Christopher Willis-Ford
4a8bac49dd Copy static assets from GUI, load GUI from dist/ 2018-09-27 14:35:02 -07:00
Christopher Willis-Ford
3785f7070e Get scratch-gui working, kinda, sorta...
CSS isn't loaded and it takes a LONG time to compile, but it does load
the GUI. It also requires using `npm ln` for `scratch-gui`.
2018-09-27 14:32:22 -07:00
Christopher Willis-Ford
13391df515 Use eslint-config-scratch 2018-09-27 14:28:23 -07:00
Ryan
71215e3311 fix: imports for url & path which were breaking the app (#21) 2018-02-06 06:24:35 -08:00
hacker112
427ff959db fix: Make sure that index.html can be found in paths with hashtag (#20) 2018-02-05 02:13:41 -08:00
develar
2cc0d0c32f
fix: use ELECTRON_WEBPACK_WDS_PORT env instead of hardcoded webpack-dev-server port number
Focus main window if dev tool window opened on start
2017-10-06 09:39:00 +02:00
SimulatedGREG
87437f7c26 Merge branch 'master' of github.com:electron-userland/electron-webpack-quick-start 2017-10-02 17:09:47 -07:00
SimulatedGREG
10afade1bc update landingpage to remove extraneous logs, drop -- for yarn script 2017-10-02 17:09:37 -07:00
Vladimir Krivosheev
de40d4cafc chore: fix "Necessary" spelling 2017-09-04 17:15:40 +02:00
SimulatedGREG
a10c1752b7 new welcome page 2017-08-29 16:35:30 -05:00
SimulatedGREG
3a5914f703 update .gitignore, remove index.ejs, add code comments to main process 2017-08-27 14:50:22 -05:00
SimulatedGREG
4f2531e10c 🎉 initial commit 2017-08-27 14:15:38 -05:00