GithubHelp home page GithubHelp logo

Comments (10)

Jinx735 avatar Jinx735 commented on July 19, 2024 1

Yeah, already did that. Just hoped it’s possible to block certain settings and not all of them. But I guess that’s not possible.

from custom-sidebar.

Jinx735 avatar Jinx735 commented on July 19, 2024 1

Yeah, works great, Thanks again πŸ‘

from custom-sidebar.

elchininet avatar elchininet commented on July 19, 2024

Hi @Jinx735,
That is expected, this is just a JavaScript plugin that is loaded on top of Home Assistant when the page is loaded, it is not an integration or an addon that changes Home Assistant behaviours. If you use the change order feature of Home Assistant, the native component of the sidebar is rerendered and therefore all the changes that the plugin made are destroyed, but everything will be back to normal if you refresh the page (the same with the language).

from custom-sidebar.

Jinx735 avatar Jinx735 commented on July 19, 2024

Alright, just wanted to make sure πŸ‘πŸ˜‚

from custom-sidebar.

elchininet avatar elchininet commented on July 19, 2024

Everything that is JavaScript could be bypassed so nothing about JavaScript plugins should be taken as an RBAC feature, but you could use kiosk-mode and hide the accounts for the desired user, so they will not have access to that panel πŸ˜‰

from custom-sidebar.

elchininet avatar elchininet commented on July 19, 2024

Hi @Jinx735,

I was looking at the Home Assistant frontend code and they edit the sidebar with an event, in theory, it is possible to stop the propagation of this event. So it is possible to ignore if the user makes a long press in the sidebar title or if the user presses the button to edit the sidebar. πŸ˜‰

But I am not sure about the language one, could you post a video of the issue with the language to see if looking at the frontend code I can figure it out a workaround?

from custom-sidebar.

Jinx735 avatar Jinx735 commented on July 19, 2024

Sure, here you go

profil-home-assistant-personlich-microsoft-edge-2024-02-12-23-00-07_5Lf4NVKh.mp4

from custom-sidebar.

elchininet avatar elchininet commented on July 19, 2024

That could be avoided. That is because you are matching by text, and the text is different per language of course. Try to match by data-panel or by href and it will work for all the languages.

from custom-sidebar.

elchininet avatar elchininet commented on July 19, 2024

Hi @Jinx735,

I have released a new minor version, in this version it is possible to set a new option in the root of the configuration:

sidebar_editable: false

If this option is set to false, long presses on the sidebar title will be ignored and the button to edit the sidebar will be disbaled in the profile dashboard.

Give it a try.

from custom-sidebar.

elchininet avatar elchininet commented on July 19, 2024

Super, thanks for confirming πŸ‘πŸΌ

from custom-sidebar.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.