Commit Graph

138 Commits

Author SHA1 Message Date
Scott Lamb
0422593ec6 ui list view: tool tip to see why recording ended
Users are often puzzled why there are short recordings. Previously
the only way to see this was to examine Moonfire's logs. This should
be a much better experience to find it right in the UI where you're
wondering, and without the potential the logs are gone.

Fixes #302
2024-06-01 07:46:11 -07:00
Scott Lamb
93a9ad9af3 attempt at iPhone support (#121) 2024-04-16 21:20:07 -07:00
Scott Lamb
8b5f2b4b0d work on Firefox!
Fixes #286.

I dug into Firefox code a bit to understand this but got a lost. But
I guess there are different policies for what's accessible via
`video.src = ""` than for `<video src="">`. This works for now, matches
what other players such as `mpegts.js` do, and is closer to what Safari
MME (required on iPhone) needs anyway. (With MME, apparently you have to
use `video.srcObject`, or the `MediaSource`'s `sourceopen` event will
never fire.)
2024-04-16 17:08:16 -07:00
Scott Lamb
7f4b04ee8a list ui selector layout fixes
* The `DisplaySelector` wasn't getting the correct flex layout.
  Before this was done by a manual style on a `Paper` element. That
  broke when adding the inner `<CardContent>` to because that's the
  container that needs the `display: "flex"`. But really, it's clearer
  to do this with `<FormGroup>` anyway, so do that.

* Switch from `<Card><CardContent>` to `<Paper sx={{ padding: ... }}>`.
  The card content has extra padding (16 px in general, 24 at the bottom
  of the last element to fit with an action). I'm not quite sure the
  best way to remove it, and the simpler `<Paper>` seems fine for this
  use anyway.
2024-04-15 21:46:22 -07:00
michioxd
8036aa40b7 prettify code 2024-04-13 21:53:59 -07:00
michioxd
a787703a31 added jsdom to dev deps 2024-04-13 21:53:59 -07:00
michioxd
3f4cee7ead Switch to pnpm 2024-04-13 21:53:59 -07:00
michioxd
c67a5ffba5 Added more dark background for select camera and fullscreen button. 2024-04-13 21:53:59 -07:00
michioxd
305deaa1e7 Set default theme mode to based on system color scheme 2024-04-13 21:53:59 -07:00
michioxd
29cafc2f82 Fixed code that didn't meet the eslint rule. 2024-04-13 21:53:59 -07:00
michioxd
60c6247ef9 Fixed TypeError: window.matchMedia is not a function during testing via vitest. 2024-04-13 21:53:59 -07:00
michioxd
317b8e9484 Resolved know problem. 2024-04-13 21:53:59 -07:00
michioxd
91e02eba7a Add copyright/license header for each components 2024-04-13 21:53:59 -07:00
michioxd
5b5822900d Update lock file for npm 2024-04-13 21:53:59 -07:00
michioxd
b46d3acabb force color white in camera selector due to light theme 2024-04-13 21:53:59 -07:00
michioxd
6e81b27d1a Extra change for Moonfire WebUI 2024-04-13 21:53:59 -07:00
Scott Lamb
eef18372cc fix inverted cond in combining 2024-02-12 18:04:47 -08:00
Scott Lamb
1f7c4c184a seamlessly merge minor VSE changes
Improves #302.
2024-02-12 17:35:27 -08:00
dependabot[bot]
f3da22fc5c Bump vite from 5.0.10 to 5.0.12 in /ui
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.10 to 5.0.12.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.0.12/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.0.12/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-31 22:49:25 -08:00
dependabot[bot]
65b3d54466 Bump follow-redirects from 1.15.3 to 1.15.4 in /ui
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-31 22:49:11 -08:00
Scott Lamb
b47310644d update gitignore to reflect webpack->vi move 2024-01-31 20:15:04 -08:00
Scott Lamb
2bcee02ea6 use recommended userEvent style
Noticed this while looking at these `act` warnings. I didn't manage to
solve those, but at least this makes the tests more consistent with
current docs.
2023-12-30 12:26:29 -08:00
Scott Lamb
77720a09e3 fix vitest busy loops 2023-12-30 11:59:24 -08:00
Scott Lamb
e9a25322b5 upgrade msw 1->2, fix network error case
In the upgrade I managed to dust off some tests that I'd been skipping
for quite a while. It turns out one of them was pointing out a real
problem: in the network error case, we didn't display the error to the
user properly. It's really sad this reaches our code as a `TypeError`,
but it is what it is.
2023-12-18 17:08:19 -08:00
Scott Lamb
3911334fee switch to vitest 2023-12-18 17:08:09 -08:00
Scott Lamb
24880a5c2d switch from create-react-app to vite
create-react-app is apparently deprecated, so the cool kids use vite,
I guess.
2023-12-18 17:08:09 -08:00
Scott Lamb
79af39f35e add a couple missing imports
(not entirely sure why it works without them but may be complicating
an upgrade)
2023-12-17 16:21:52 -08:00
Scott Lamb
14d1879ccd fix #290 2023-12-17 15:57:52 -08:00
Scott Lamb
3de62eb70d ui test cleanups
* update `msw` 0.49 -> 1.x. (2.x is out now, but small steps.)
* wrap some `jest.{runOnlyPendingTimers,advanceTimersByTime}` calls
  in `act`.
* extend a timeout that had no slack at all
2023-12-09 14:59:40 -08:00
Scott Lamb
1f7806108c upgrade @mui/x-date-pickers to v6 beta
Fixes #256
2023-11-28 10:26:52 -08:00
Scott Lamb
e103a709a0 update caniuse list 2023-09-30 16:04:03 -07:00
Scott Lamb
9820bf8883 tweak ui dev server's websocket situation
* fix the automatic reload
* document that live view doesn't work with `PROXY_TARGET`;
  link to fresh issue
2023-09-30 16:02:52 -07:00
Scott Lamb
438de38202
rework WebSocket error return protocol
This gives much better information to the UI layer, getting rid of a
whole troubleshooting guide entry. See #119 #132 #218 #219

I also restructured the code in anticipation of a new WebSocket event
stream (#40).
2023-02-15 17:26:40 -08:00
Scott Lamb
015dfef9c9
fix #257
Apparently a `MenuItem` with a value of `undefined` is possible but
doesn't actually fire a change event. Strange. Use the string `"null"`
instead.
2023-02-13 11:05:27 -08:00
Scott Lamb
098b54c9f9
upgrade to react 18
* new root rendering api
* components are now allowed to return undefine
* testing library changes for userEvent.type
2023-01-11 22:25:56 -08:00
Scott Lamb
fbb5e6b266
upgrade typescript and msw 2023-01-11 20:55:38 -08:00
Scott Lamb
f827c0647a
npm update 2023-01-11 20:46:59 -08:00
Scott Lamb
58e19265ef
use react-hook-form-mui for AddEditDialog too 2023-01-11 14:54:18 -08:00
Scott Lamb
dc9c62e8bb
react-hook-form-mui in ChangePassword 2023-01-09 17:16:05 -08:00
Scott Lamb
dac0f44ed8
user admin UI 2023-01-08 03:30:53 -06:00
Scott Lamb
a4bc7f5218
config file reference and doc reorganization 2023-01-06 14:25:13 -06:00
Scott Lamb
a6bdf0bd80
change password dialog in UI 2022-12-27 23:28:42 -05:00
Scott Lamb
918bb05d40 update @types/node 2022-10-03 21:18:49 -07:00
Scott Lamb
96e6cbfd5f update typescript and msw
No problems seen so far.

msw version 0.46.0 is advertised as supporting ts v4.8, so I updated
them together, even though tests seemed to pass without the msw update.
2022-10-03 21:15:28 -07:00
Scott Lamb
d509d3ff40 update @mui/lab
This is now only used for LoadingButton.
2022-10-03 20:55:10 -07:00
Scott Lamb
1ad14007a5 ui: update date pickers 2022-10-03 20:51:39 -07:00
Scott Lamb
a614a8f559 update @mui/material and @mui/icons-material
This works much better with a working lockfile...
2022-10-03 17:59:28 -07:00
Scott Lamb
be9c2e5815 remake package-lock.json from scratch
This had stuff like
`node_modules/@babel/core/node_modules/@babel/code-frame` that I don't
think is right. I think the lockfile version upgrade went badly.
2022-10-03 17:56:49 -07:00
Scott Lamb
5738410bdc npx browserslist@latest --update-db 2022-10-03 08:29:11 -04:00
Scott Lamb
8d716bf4dd Stop using deprecated @mui/styles
I was struggling to upgrade the version of mui stuff (material and date
picker). I'm hoping getting rid of the deprecated stuff eases this a
bit.

I don't love that I can't just use sx on plain HTML stuff and have to
wrap it in Box, but oh well. Looks like I'm not alone, fwiw.
https://github.com/mui/material-ui/issues/23220
2022-10-03 08:29:11 -04:00