apple2js/js
Ian Flanigan 52a1c65fe4
Create a FileChooser component using showOpenFilePicker (#116)
* Create a FileChooser component using showOpenFilePicker

Before, `FileModal` always used a file input control for selecting
local files. This allowed the emulator to read from the file, but
precluded writing back to the file.

With this change, the `FileModal` delegates to the new `FileChooser`
component. The `FileChooser` will use `showOpenFilePicker` if it is
available and a regular file input if it's not.

Using `showOpenFilePicker` has the advantage of allowing the emulator
to write back to the file (if the user grants permission). While the
emulator does not yet take advantage of this write capability, that
will come.

* Addressed comments

*   useState() instead of direct DOM manipulation
*   backed out eslint changes in favor of suppressing the warning
2022-05-28 10:52:48 -07:00
..
applesoft Enforce strict equality (#115) 2022-05-18 08:19:45 -07:00
cards Enforce strict equality (#115) 2022-05-18 08:19:45 -07:00
components Create a FileChooser component using showOpenFilePicker (#116) 2022-05-28 10:52:48 -07:00
formats Enforce strict equality (#115) 2022-05-18 08:19:45 -07:00
intbasic Enforce strict equality (#115) 2022-05-18 08:19:45 -07:00
roms Enforce strict equality (#115) 2022-05-18 08:19:45 -07:00
ui Enforce strict equality (#115) 2022-05-18 08:19:45 -07:00
apple2.ts Turn on exactOptionalPropertyTypes (#110) 2022-05-11 17:20:49 -07:00
apple2io.ts Enforce strict equality (#115) 2022-05-18 08:19:45 -07:00
base64.ts Enforce strict equality (#115) 2022-05-18 08:19:45 -07:00
canvas.ts Enforce strict equality (#115) 2022-05-18 08:19:45 -07:00
cpu6502.ts Prohibit any 2022-05-17 19:08:28 -07:00
debugger.ts Preact UI (#106) 2022-05-10 06:52:06 -07:00
entry.tsx Preact UI (#106) 2022-05-10 06:52:06 -07:00
entry2.ts TypeScript remnants (#94) 2021-12-22 10:37:21 -08:00
entry2e.ts TypeScript remnants (#94) 2021-12-22 10:37:21 -08:00
gl.ts Enforce strict equality (#115) 2022-05-18 08:19:45 -07:00
main2.ts Lazy load ROMs (#81) 2021-06-13 17:06:16 -07:00
main2e.ts Preact mouse support (#111) 2022-05-11 17:21:21 -07:00
mmu.ts Enforce strict equality (#115) 2022-05-18 08:19:45 -07:00
options.ts Apply semi rule to interfaces (#109) 2022-05-10 08:04:20 -07:00
prefs.ts Preact UI (#106) 2022-05-10 06:52:06 -07:00
ram.ts Clean up copyright notices (#93) 2021-12-21 12:35:26 -08:00
symbols.ts More typescript conversion (#46) 2020-11-24 08:48:14 -08:00
types.ts Prohibit any 2022-05-17 19:08:28 -07:00
util.ts Prohibit any 2022-05-17 19:08:28 -07:00
videomodes.ts Apply semi rule to interfaces (#109) 2022-05-10 08:04:20 -07:00