Commit Graph

98 Commits

Author SHA1 Message Date
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
Scott Lamb 4addf3c90c npm upgrade 2022-03-16 15:46:42 -07:00
Scott Lamb 3c1171e405 link to JS equality rules 2022-03-07 13:48:47 -08:00
Scott Lamb 93792fcc57 better document TimerangeSelector
I haven't figured out how to expose its state in the URL (for #202),
but documenting how it works today seems like a good first step.
2022-03-07 13:13:32 -08:00
Scott Lamb 08109d61ce clean up App.tsx
This structure (described in
https://github.com/scottlamb/moonfire-nvr/issues/202#issue-1161741347)
has less activity-specific logic in App.tsx itself and avoids duplicate
route handling.

This fixes the `No routes matched location "/"` mentioned in #202.
2022-03-07 11:55:44 -08:00
Scott Lamb 782eb2f0d8 add some URL parameters for the list view
This is still missing the time range, which is more complex than the
others. Small steps.
2022-03-04 15:21:37 -08:00
Scott Lamb bcc59e9109 plumb more api response through to list view
This keeps a coarser-grained `toplevel` property rather than `user`
and `session`. It also synthesizes a `streams` field within it with ids.
This makes it easier to put the streams in the URL by id.
2022-03-04 12:03:47 -08:00
Scott Lamb 90c9a31ad0 upgrade almost all frontend deps
typescript isn't at the latest because eslint warns about it.
2022-03-04 08:55:06 -08:00
Scott Lamb 274dc09ec3 upgrade typescript to 4.5.5
I found one significant breaking change: caught exceptions are now
unknown rather than any. Rework the error handling a bit to match.
2022-03-03 14:49:14 -08:00
Scott Lamb a82453e73a upgrade to create-react-scripts v5
I had to disable more of the Login tests to get this to work.
Frustrating, but I just can't figure out how to fake jest timers,
msw, and the testing libraries to all get along anymore.
2022-03-03 14:39:08 -08:00
Scott Lamb 8a65a09c7f upgrade msw version 2022-03-03 12:56:46 -08:00
Scott Lamb bc29e8b23c fix eslint 8 complaints
I'm working on this upgrade now.
https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-presence-queries.md
2022-03-03 12:37:39 -08:00
Scott Lamb d40715c210 fix some type errors in VideoList.test.tsx
For whatever reason, these aren't caught in my current setup. I'm trying
to upgrade the whole frontend mess (typescript version, react-scripts
version) and they're caught then.
2022-03-03 12:28:27 -08:00
Damian Krysta e90d804f1a FIX build - add OR empty string
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
Damian Krysta 4d3d72c7b5 EDIT - remove or condition
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
Damian Krysta f8ff07d2ad EDIT Multiview - fix none in cam selector
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
Damian Krysta 41dfae336e EDIT - Run prettier
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
Damian Krysta 28208b7bb4 CHANGE router type
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
Damian Krysta 3240c20eae FIX tests
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
Damian Krysta 56918bf5c2 Add store in url for layout and all cameras
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
Damian Krysta 552f6bf19d FIX lint
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
Damian Krysta 3988c3922d ADD set search param after selected cam
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
Damian Krysta 2d517c28dc ADD react router and reading from query params
Signed-off-by: Damian Krysta <damian@krysta.dev>
2022-03-02 10:07:46 -08:00
dependabot[bot] c9b1e49f3d Bump url-parse from 1.5.3 to 1.5.10 in /ui
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.3 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.3...1.5.10)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-02 09:22:42 -08:00
dependabot[bot] 4d848b64cd Bump follow-redirects from 1.14.7 to 1.14.8 in /ui
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-16 11:01:22 -08:00
dependabot[bot] 6ec1848d00 Bump node-fetch from 2.6.1 to 2.6.7 in /ui
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 09:37:47 -08:00
dependabot[bot] 137f23db05 Bump nanoid from 3.1.23 to 3.2.0 in /ui
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.23 to 3.2.0.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.23...3.2.0)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 09:14:24 -08:00
dependabot[bot] b6a1670b92 Bump follow-redirects from 1.14.1 to 1.14.7 in /ui
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.1 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.1...v1.14.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-15 00:07:39 -08:00
dependabot[bot] da1e14b8c1 Bump tmpl from 1.0.4 to 1.0.5 in /ui
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-23 11:01:31 -08:00
dependabot[bot] 2da81f6e24 Bump url-parse from 1.5.1 to 1.5.3 in /ui
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-23 10:21:11 -08:00
Scott Lamb 4a7f22723c Merge branch 'master' into new-schema 2021-10-21 12:26:31 -07:00
Scott Lamb 74b9f36a75 upgrade to @mui v5 release
This requires a bunch of package name changes. See
[https://mui.com/blog/material-ui-is-now-mui/] for their rationale.
[https://mui.com/guides/migration-v4/] lists the changes:

```
@material-ui/core -> @mui/material
@material-ui/system -> @mui/system
@material-ui/unstyled -> @mui/core
@material-ui/styles -> @mui/styles
@material-ui/icons -> @mui/icons-material
@material-ui/lab -> @mui/lab
@material-ui/types -> @mui/types
@material-ui/styled-engine -> @mui/styled-engine
@material-ui/styled-engine-sc ->@mui/styled-engine-sc
@material-ui/private-theming -> @mui/private-theming
@material-ui/codemod -> @mui/codemod
@material-ui/docs -> @mui/docs
@material-ui/envinfo -> @mui/envinfo
```

We only use a few of these.
2021-09-24 10:57:29 -07:00
Scott Lamb c42314edb5 UI preferences: #153 #155 2021-09-01 15:08:09 -07:00
Scott Lamb 7e5bc42646 improve init segment fetch error msg
Fixes #146, in combination with earlier commit 4892ed7.
2021-08-31 16:41:43 -07:00
Scott Lamb d2c7b62771 fix #157: problem with live multi-camera selection
When you select the first camera in the drop-down on a grid square
that isn't the top left, then select a camera in the top-left, it
behaves strangely.

The root cause is that I had a dumb mistake in how I assigned React
keys. I used the camera index when a camera is selected, and the
inverse of the selected index when one is. But 0 == -0!
2021-08-31 16:20:24 -07:00
dependabot[bot] 0a38044b02 Bump tar from 6.1.0 to 6.1.11 in /ui
Bumps [tar](https://github.com/npm/node-tar) from 6.1.0 to 6.1.11.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v6.1.0...v6.1.11)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-31 15:17:30 -07:00
Scott Lamb b8b5038f71 better error msg on live view when misconfigured
Improves (but doesn't fix) #119 and #120.
2021-08-13 12:02:42 -07:00
Scott Lamb b388aab250 better error message for live view on iOS (#121) 2021-08-13 08:50:06 -07:00
Scott Lamb 27395ecd4e UI: improve aspect ratio handling
As written in the changelog: Live streams formerly worked around a
Firefox pixel aspect ratio bug by forcing all videos to 16:9, which
dramatically distorted 9:16 camera views. Playback didn't, so anamorphic
videos looked correct on Chrome but slightly stretched on Firefox. Now
both live streams and playback are fully correct on all browsers.
2021-08-12 13:33:19 -07:00
Scott Lamb 164c8c5b21 clarify support for node 12 and 14
* run node 12, 14, and 16 (next to be supported) on CI. This will catch
  node version-specific problems like that solved in dad9bdc.
* mention 12 and 14 in build instructions and link to instructions for
  installing that version.
* follow this in Dockerfile, installing version 14. This addresses
  a "Cannot find module 'worker_threads'" error introduced in
  39a63e0, which (inadvisedly) upgraded gzipper 4->5 in addition to
  the material-ui upgrade.
* use utf-8 encoding rather than ascii in live part parser. Those
  builds apparently don't support ascii. iThey must use "small-icu" or
  have ICU disabled, as described here:
  https://nodejs.org/api/util.html#util_encodings_supported_when_node_js_is_built_with_the_small_icu_option
2021-08-11 23:45:17 -07:00
Scott Lamb 6426745c8c link to material-ui issue about date picker sizing 2021-08-11 15:06:03 -07:00