galloween / custom-sidebar-v2 Goto Github PK
View Code? Open in Web Editor NEWHome Assistant (HACS) plugin that allows you to rearrange, hide, and add sidebar menu items. Refactor of https://github.com/Villhellm/custom-sidebar
Home Assistant (HACS) plugin that allows you to rearrange, hide, and add sidebar menu items. Refactor of https://github.com/Villhellm/custom-sidebar
Adding user specific exceptions and having them hidden does not hide them for that user??
........
],
"exceptions": [
{
"user": [
"Su"
],
"base_order": false,
"order": [
{
"item": "overview",
"order": 1
},
{
"item": "energy",
"hide": true
},
{
"item": "map",
"hide": true
},
{
"item": "logbook",
"hide": true
},
{
"item": "history",
"hide": true
},
{
"item": "media browser",
"hide": true
}
]
}
]
}
This component seems to be causing me nothing but trouble...
The only way I can get the sidebar to update when I make changes in sidebar-order.json
is in Incognito Mode (I use Chrome). I've tried clearing data for that site, force refreshing, etc... And it seems that if I'm ever able to get it to update, it's only in Incognito.
My sidebar-order.json
here: https://pastebin.com/fcqXhmgD
Is there any particular reason why this one doesn't seem to want to update for me?
The title says it all, stopped working with HA release 2023.4.
I want to change the order for the App Configuration panel on iOS devices, but "app configuration"
is not enough. Do you know what the title for the App Configuration is?
I have this configured in my sidebar-order.json
{ "new_item": true, "item": "OpenEVSE", "href": "http://192.168.0.77", "icon:": "mdi:car-electric", "order": 8 }
And it is not showing the icon, I have tried clearing the browser cache, reboot HA, etc and the same.
Also is there a way to have the new_item objects open up in a new browser window?
Hi, first of all thanks for refactoring this plugin and make it working with the latest version of HA :-)
I noticed everything works fine for admin users but not for non administrators. The issue seems related to getSidebarItem()
when called upon startup returning undefined
since looking for "data-panel
" equals to "config
" which is not there for a non admin user (https://github.com/galloween/custom-sidebar-v2/blob/main/dist/custom-sidebar-v2.js#L145).
As a workaround a tried picking up the latest element (e.g. .at(-1)
) of window.$customSidebarV2.SideBarElement
which works but I'm sure it breaks out other things.
Thanks!
Could you add an exception for admins, so that administrator items can be customized independently?
My default customizations hide some sidebar items, but I would like to make an exception to show all sidebar items for administrators.
Thanks!
The badge from the Settings-menu are repeated to all new_item
's in sidebar-order.json
.
In my case Settings is the place where the badge displaying 3 shall be.
This is how it looks if I remove everything in sidebar-order.json
:
my sidebar-order.json
:
"order": [
{
"new_item": true,
"item": "Automations",
"href": "/config/automation",
"icon": "mdi:home-automation",
"order": 1,
"bottom" : true
},
{
"new_item": true,
"item": "Integrations",
"href": "/config/integrations",
"icon": "mdi:puzzle",
"order": 2,
"bottom" : true
},
{
"item": "HACS",
"order": 3,
"bottom" : true
},
{
"new_item": true,
"item": "Z-Wave JS UI",
"href": "http://example.com:8091/",
"icon": "mdi:z-wave",
"target": "_blank",
"order": 4,
"bottom" : true
},
{
"item": "Developer Tools",
"order": 5,
"bottom" : true
},
{
"item": "Settings",
"order": 6,
"bottom" : true
}
]
}```
2022.4.0b0 introduces updates this is also introducing a badge with the number of updates for configuration.
but with custom sidebar, those updates are showing up on all custom entries and the badge is also offset a little, which is not showing the complete number.
like below
When this plugin is used (and it's amazing, as I have some external links I want added that are not iframe-friendly), I've noticed that new items don't have tooltips, while HASS-default items do.
Suggestion would be to add a tooltip
property to allow for custom tooltips, or use the name / id somehow
Hi, just stumbled across your project and installed it using HACS.
This is my config/configuration.yml
frontend:
themes: !include_dir_merge_named themes
extra_module_url:
- /hacsfiles/custom-sidebar-v2/custom-sidebar-v2.js
and this my config/www/sidebar-order.json
{
"order": [
{
"new_item": true,
"item": "Google",
"href": "https://mrdoob.com/projects/chromeexperiments/google-gravity/",
"icon": "mdi:earth",
"target": "_blank",
"order": 4
},
{
"item": "media-browser"
"hide": true
}
],
"exceptions": [
{
"user": ["eltern"],
"order": [
{
"item": "history",
"hide": true
}
]
}
]
}
Restarting the server and hard reloading with cache cleaning does not show any results, neither on the main account nor on the user account.
Am I missing some step here or is there any way I could troubleshoot this?
Hi is it possible to have it load a little faster? Maybe first load the config and after that check for any errors?
I want to remove certain tabs for some users but because this is hiding the tabs and not removing it when the default tabs show for just a second I would go and check the code and find the hidden items.
Hi, is it possible to show this is an iframe, in the same way as the iframe panel support from Home Assistant?
{
"new_item": true,
"item": "Google",
"href": "https://mrdoob.com/projects/chromeexperiments/google-gravity/",
"icon": "mdi:earth",
"target": "_blank"
},
Wonder if would be possible/sensible adding a defaultPanel
configuration setting which will automatically browse to a defined panel/page upon loading of the plugin. In this way when accessing HA from a new device or with a new user, he is moved away ASAP from the default Overview dashboard which is displacing for new/guest users.
Thanks!
This config works perfectly in my desktop browser:
{
"order": [
{
"item": "lovelace",
"order": 0
},
{
"item": "lovelace-administration",
"order": 1
},
{
"item": "mobile-view",
"order": 2
},
{
"item": "shopping-list",
"order": 3
},
{
"item": "a0d7b954_grafana",
"order": 4
},
{
"item": "energy",
"order": 5
},
{
"item": "logbook",
"order": 6
},
{
"item": "history",
"order": 7
},
{
"item": "map",
"order": 8
},
{
"item": "redirect-logs",
"bottom": true,
"order": 9
},
{
"item": "redirect-server-controls",
"bottom": true,
"order": 10
},
{
"item": "redirect-devices",
"bottom": true,
"order": 11
},
{
"item": "hacs",
"bottom": true,
"order": 12
},
{
"item": "redirect-addons",
"bottom": true,
"order": 13
},
{
"item": "alarmo",
"bottom": true,
"order": 14
},
{
"item": "developer-tools",
"bottom": true,
"order": 14
},
{
"item": "settings",
"bottom": true,
"order": 14
},
{
"item": "media",
"hide": true
}
]
}
However it is all over the place in the iOS Home Assistant companion app:
I have reset the frontend cache and reloaded but it made no difference.
After pressing Ctrl + f5 it removes my custom setting for the side bar and shows the overview, electric, map etc again. Clearing cache and cookies fixes this? I guess this only hides the options but can't be applied again after the clearing of Ctrl + f5?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.