Christopher Willis-Ford
2ba74d7ac0
work around Electron dialog title bug
...
In previous versions of this app, Electron automaticaly put "Scratch"
in the title bar for these dialogs.
See https://github.com/electron/electron/issues/30223
2021-11-10 07:04:31 -08:00
Christopher Willis-Ford
c5caa7acc5
disable contextIsolation for now
...
We should try to re-enable this once we have time to do the necessary
refactoring
2021-11-09 09:34:03 -08:00
Christopher Willis-Ford
603d926856
Use ${productName} in privacy policy window title
2021-01-28 11:17:53 -08:00
Christopher Willis-Ford
728d705b1a
fix merge & rearrange components to satisfy lint
2021-01-26 14:17:22 -08:00
Christopher Willis-Ford
3d0963fbd7
Merge branch 'develop' into fix-telemetry-modal
2021-01-26 12:39:58 -08:00
Christopher Willis-Ford
7f8d0d7084
remove now-unused clearDidOptIn
2020-12-15 15:28:39 -08:00
Christopher Willis-Ford
bcc9ff5c1e
avoid IPC sendSync in render()
2020-12-15 15:25:03 -08:00
Christopher Willis-Ford
c110b13aff
clarify HOC names and move props to match
...
Previously the two HOCs in app.jsx were named according to their place
in the component structure, which didn't provide any information about
their functionality or meaning. Now they are named according to the
components they wrap, which should help with future maintenance in that
it will guide which props belong in each.
2020-12-09 14:02:17 -08:00
Christopher Willis-Ford
6e840825cc
apply feedback from design team
2020-12-02 14:24:58 -08:00
Christopher Willis-Ford
d56a3c5810
keep telemetry modal state in sync with main process
2020-12-02 14:07:27 -08:00
Christopher Willis-Ford
afb29bfdef
use openTelemetryModal instead of showTelemetryModal
2020-12-02 14:07:25 -08:00
Christopher Willis-Ford
25072c0046
pass about menu items to GUI
2020-12-02 14:05:55 -08:00
Christopher Willis-Ford
19a47ecde8
split HOC in two: one inside AppStateHOC, one out
...
`ScratchDesktopOuterComponent` is now responsible for
`showTelemetryModal` which only works if it comes from outside the
`AppStateHOC` since it's used in the `AppStateHOC` constructor. The
outer component also handles a few static props, like
`isScratchDesktop`.
`ScratchDesktopInnerComponent` handles everything else, most notably
anything that interacts with the state established by `AppStateHOC`.
2020-11-17 15:55:43 -08:00
Christopher Willis-Ford
4fe9e5b703
fix lint: long lines
2020-10-07 18:23:50 -07:00
Christopher Willis-Ford
10b2bae670
update privacy policy to October 5, 2020 copy
2020-10-07 18:17:54 -07:00
Christopher Willis-Ford
371bd60a7d
move ReactDOM.render() into index.js
...
This also means we no longer need to disable eslint's
"no-unused-expressions" rule for each route in index.js
2020-10-06 14:34:04 -07:00
Christopher Willis-Ford
73819d8eb7
view built-in privacy policy from telemetry dialog
2020-10-06 14:34:04 -07:00
Christopher Willis-Ford
ca7eeb9b7a
add privacy policy link to 'about' dialog
2020-10-06 14:34:03 -07:00
Christopher Willis-Ford
fb26baeac1
app.jsx cleanup
2020-10-06 14:34:03 -07:00
Christopher Willis-Ford
3b1dd4e008
open external links in system browser
2020-10-06 14:34:01 -07:00
Christopher Willis-Ford
8fc98e1c37
add new window for privacy policy
2020-10-06 14:34:01 -07:00
Christopher Willis-Ford
93a94d8253
move About window styling into a CSS file
2020-10-06 14:34:01 -07:00
Chris Willis-Ford
b05c2c1602
Merge pull request #150 from cwillisf/load-project-from-cli-attempt-2
...
Support loading project file from command line (attempt 2)
2020-09-29 13:56:30 -07:00
Christopher Willis-Ford
7c6e8a97cc
Merge branch 'develop' into redo-rename
2020-09-21 10:46:47 -07:00
Christopher Willis-Ford
0fa4c4b2ed
handle initial project load errors
2020-09-15 14:52:08 -07:00
Christopher Willis-Ford
a9933242e0
use project state system to load initial project
2020-09-15 14:32:36 -07:00
Christopher Willis-Ford
05e8b26a34
WIP: actually load project from command line
...
Doing it this way works for the initial load but overrides later actions
like File -> New.
2020-09-04 13:26:36 -07:00
Christopher Willis-Ford
e2f39580df
make command line args available to render process
2020-09-04 12:13:29 -07:00
Christopher Willis-Ford
e9e3f06289
save files more safely (temp then move)
2020-08-25 15:28:58 -07:00
Christopher Willis-Ford
75589099f1
fix MAS file overwrite by deleting existing file
...
From the code comments:
If the file exists the browser will first download to a temp file then rename to the userChosenPath.
The MAS sandbox allows accessing userChosenPath but not the temp file, so overwriting fails on MAS.
Deleting the file first could be considered risky but works around the sandbox problem.
Security bookmarks might work to fix the problem but they're only supported by async showSaveDialog.
Since we need to use showSaveDialogSync (see WARNING below) this workaround might be the best option.
2020-08-25 14:50:03 -07:00
Chris Willis-Ford
5773d5b17c
Merge pull request #134 from cwillisf/allow-dev-tools-in-release-builds
...
allow opening dev tools in release builds
2020-08-21 07:40:27 -07:00
Christopher Willis-Ford
d1195c5332
make Scratch Link connections work w/o DNS
...
This effectively hardcodes `device-manager.scratch.mit.edu` to
`127.0.0.1` within Scratch Desktop.
Note that using "host-rules" instead of "host-resolver-rules" doesn't
work: it results in ERR_CERT_COMMON_NAME_INVALID because the browser
expects Scratch Link's certificate to list "127.0.0.1" as its host name.
Using "host-resolver-rules" means that the IP is used for the connection
only, and not for certificate validation.
See here for more details:
https://www.electronjs.org/docs/api/command-line-switches#--host-rulesrules
https://www.electronjs.org/docs/api/command-line-switches#--host-resolver-rulesrules
2020-08-12 15:54:28 -07:00
Christopher Willis-Ford
c811ade1a2
allow opening dev tools in release builds
2020-08-04 11:00:28 -07:00
Christopher Willis-Ford
8578d60311
Revert "Revert "Merge pull request #131 from cwillisf/rename-to-scratch""
...
This reverts commit 0817fddce1
.
2020-08-04 10:43:27 -07:00
Christopher Willis-Ford
0817fddce1
Revert "Merge pull request #131 from cwillisf/rename-to-scratch"
...
This reverts commit 71cc32e5bf
, reversing
changes made to 43daa269df
.
2020-08-04 10:41:32 -07:00
Christopher Willis-Ford
97167537eb
rename 'Scratch Desktop' to 'Scratch' / 'the Scratch app'
2020-07-27 11:43:49 -07:00
Christopher Willis-Ford
73a2d3e015
allow reusing render process / fix deprecation warning
2020-05-22 16:16:22 -07:00
Christopher Willis-Ford
229c42469d
use minilog for logging, like scratch-gui
2020-05-20 17:05:00 -07:00
Christopher Willis-Ford
5a1526c1e5
update all dependencies, resolve npm audit alerts
...
minor code changes required for uuid, eslint-config-scratch, and
uglifyjs-webpack-plugin
2020-05-13 14:12:14 -07:00
Christopher Willis-Ford
fdd7a8463f
fix makeFullUrl for file:// on Windows
2020-03-30 18:09:03 -07:00
Christopher Willis-Ford
7ee12dcdd8
don't return await
2020-03-17 18:59:07 -07:00
Christopher Willis-Ford
6e1bfc33f3
only call systemPreferences.askForMediaAccess if it exists
2020-03-17 18:55:40 -07:00
Christopher Willis-Ford
74968704c8
improve user experience around mic/camera permission
...
- ask for permission when trying to use a feature, not on startup
- if permission is denied, explain the consequence and provide a hint
for fixing it
2020-03-17 18:55:40 -07:00
Christopher Willis-Ford
af73790306
macOS: request camera and microphone access
...
Note `audio-input` and `camera` were already in `entitlements.plist`
Supporting changes:
- Add `allow-jit` entitlement since documentation says it's needed.
- Only use sandbox for MAS build, not for non-MAS macOS build.
NOTE: both still use the hardened runtime, as required on Catalina.
- Remove `entitlements.inherit.plist` since it matches default settings.
- Add to `electron-builder.yaml` English descriptions for why the app
requests access to the microphone and camera. I'm not yet sure if
there's a way to localize these.
- Minor tweaks in `electron-builder.yaml`.
2020-03-17 18:55:40 -07:00
Christopher Willis-Ford
8222b715a7
fix lint from TitledHOC changes
2020-03-17 18:54:56 -07:00
Chris Willis-Ford
85ce509434
Merge pull request #98 from cwillisf/dark-dev-dont-hang
...
work around startup hang in dev on Win10 dark mode
2020-02-05 12:57:18 -08:00
Christopher Willis-Ford
af029b6937
fix telemetry modal
2020-01-31 16:45:56 -08:00
Christopher Willis-Ford
d1c47e8bd0
work around startup hang in dev on Win10 dark mode
...
Also, add a few improvements to the way DevTools extensions get
installed.
2020-01-27 14:51:50 -08:00
Christopher Willis-Ford
5f5f24e722
fix unwanted menu bar on Windows
2020-01-16 18:05:53 -08:00
Christopher Willis-Ford
0b6652cde3
fix save & quit dialogs for Electron 6 API changes
2020-01-16 16:28:46 -08:00