Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support separate WebUI user / view modes #6916

Closed
wants to merge 12 commits into from

Conversation

spacebares
Copy link
Contributor

looks like this:
https://github.com/blakeblackshear/frigate/assets/57186372/46937caa-a7a9-4661-a6d7-4dd427295787

default behavior can be set like

ui:
  show_advanced_options: True

- fix AppBar render order, its tooltips are visible now
@netlify
Copy link

netlify bot commented Jun 25, 2023

Deploy Preview for frigate-docs ready!

Name Link
🔨 Latest commit 3ed1ab8
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/64ab1db98419d400081c546c
😎 Deploy Preview https://deploy-preview-6916--frigate-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@spacebares
Copy link
Contributor Author

lint complains about web/src/context/index.jsx 19:6 warning React Hook useEffect has a missing dependency: 'showAdvOptions'. Either include it or remove the dependency array but if i add that in then when you refresh page it forgets cookie.

maybe this whole thing is coded wrong, i haven't a clue, react is a wonder to behold...

@NickM-27
Copy link
Sponsor Collaborator

I think this is better presented as Admin Mode and the configuration option can be default_mode with options admin or user

@spacebares
Copy link
Contributor Author

that would imply more than simple on/off. Could be user/advanced/admin/debug etc.
To support multiple view options have to rewrite this, i have some ideas.. maybe a new component that hides its children and it does all the work in there. So if you want something controlled by the view mode you just throw it in the component as a child.. i think that might work. Will try some things.

@spacebares
Copy link
Contributor Author

web/src/context/index.jsx Outdated Show resolved Hide resolved
Copy link
Sponsor Collaborator

@NickM-27 NickM-27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool, I think that's what Blake had in mind and it's great how easily it can be expanded to other things in the future

web/src/components/AppBar.jsx Outdated Show resolved Hide resolved
@NickM-27 NickM-27 changed the title toggle viewing of advanced options Support separate WebUI user / view modes Jun 28, 2023
@spacebares
Copy link
Contributor Author

menu looks like this atm:
image

but i was thinking about:
1ZDSi6ZJzG

not sure which one to pick, 🤔

@NickM-27
Copy link
Sponsor Collaborator

I prefer the former, makes it much more obvious which is the currently selected mode and takes up less space

the event thumbnail renders over AppBar in events page... tried a bunch of things, counlt work around it...

with this revert, the "More Options" tooltip for AppBar menu is broken again
- view mode will default to admin if config does fail to load for w/e reason
- rename viewMode to currentViewMode
@spacebares spacebares marked this pull request as ready for review July 7, 2023 19:24
@johnmarksilly
Copy link
Contributor

Dropdown inside a menu is not ideal though. A separate icon button for "user pref" might be better. Profile icon in header expands to the view modes.

@NickM-27
Copy link
Sponsor Collaborator

Thank you for your pull request, we are currently rewriting the UI for the next version of frigate and this PR can't be merged. This functionality is being considered for the new UI.

@NickM-27 NickM-27 closed this Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants