blakeblackshear.frigate/web
Soren L. Hansen 6e53c109b6
feat: apply ingress path to app paths (#11677)
When serving Frigate at a subpath, the paths that show in the URL bar
and that wind up in your browser history are anchored at the web root.
I.e. you go to `https://example.com/frigate/`, it changes to
`https://example.com/`, and clicking around works as expected, but the
`frigate/` prefix is gone.

It's confusing if you don't know that the URL's are entirely virtual.
Also, your browser history is useless, since the URL's point to e.g.
`https://example.com/#kitchen`, but visiting that URL will not hit
`/frigate/` at all.

Most of the work is already done. Nginx injects javascript to set
`window.baseURL` based on the X-Ingress-Path header. This change passes
that to BrowserRouter, so that it'll be part of the URL's it shows.

Fixes #4526
2024-06-01 07:08:01 -06:00
..
images
public
src feat: apply ingress path to app paths (#11677) 2024-06-01 07:08:01 -06:00
themes
.eslintrc.cjs
.gitignore
.prettierrc Use prettier-plugin-tailwindcss (#11373) 2024-05-14 09:06:44 -06:00
components.json
index.html
login.html
package-lock.json Update deps (#11679) 2024-06-01 06:39:05 -06:00
package.json Update deps (#11679) 2024-06-01 06:39:05 -06:00
postcss.config.js
README.md
site.webmanifest
tailwind.config.js
tsconfig.json
tsconfig.node.json
vite.config.ts

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default {
  // other rules...
  parserOptions: {
    ecmaVersion: 'latest',
    sourceType: 'module',
    project: ['./tsconfig.json', './tsconfig.node.json'],
    tsconfigRootDir: __dirname,
  },
}
  • Replace plugin:@typescript-eslint/recommended to plugin:@typescript-eslint/recommended-type-checked or plugin:@typescript-eslint/strict-type-checked
  • Optionally add plugin:@typescript-eslint/stylistic-type-checked
  • Install eslint-plugin-react and add plugin:react/recommended & plugin:react/jsx-runtime to the extends list