mayker
(maykar (pronounced "maker" with a southern accent))
23
Updates
Fix for many tabs causing overlapping icons, can now swipe through tabs as needed. @Bieniu
Fix for single tab/view layouts not displaying header. @Gratizzz
Update compact-custom-header.js and grab new companion script “cch_v002.js” You can delete the old one, be sure to add version number to resources. I will make the update process easier in the next update.
I was hoping it could be not an “either / or” but “a both / and”, like the original gist which lets you either put the config options into the .yaml OR into the URL. That way you can do it either way as your situation warrants.
For my own use-case, mobile/touchscreen detection would not actually give me what I want because I want to treat my wall-mounted tablet differently from my phone. But if you could come up with a way to differentiate views based on user-agent, that would be awesome.
1 Like
mayker
(maykar (pronounced "maker" with a southern accent))
26
Configurable user agent is the way I’m going with it. Will be in next version.
mayker
(maykar (pronounced "maker" with a southern accent))
27
You can safely delete the .js file named ch_v002 or ch_v001. I changed it to play nice with custom-updater. Be sure to grab the new one.
I apologize to anyone that followed, forked, or starred on github, but I deleted the old repository in favor of creating one to hold any and all lovelace stuff I work on. Updated link in first post.
I liked the first post to show my appreciation for this enhancement, but I thought I’d chime in here too. Great work and made my wall mounted tablet a much better device as I can get rid of all the unnecessary white space. Hope we get this added as a default or an option going forward.
Yes, already tried that, no change. It’s the same on desktop, tablet and mobile.
mayker
(maykar (pronounced "maker" with a southern accent))
33
Do any errors display? What’s your code look like? Have you tried the latest version? Do you have “javascript_version: latest” in your configuration.yaml? Are you putting this card inside a container card, panel, etc?
Very nice, I was looking for something like this for my wall mounted tablet.
On my phone however, the scrollbar for the different views is now very small (like half the screen width).
Could a configuration entry be added to not disable the name for some user agents? So that these devices have the normal HASS layout?
1 Like
mayker
(maykar (pronounced "maker" with a southern accent))
37
So, just a way to disable custom header for a certain user agent? Totally doable. Good idea. Will be in the next release.
How about being able to show / hide individual views (tabs) by user agent?
e.g. i have a view that is totally admin-related stuff like the tracker-card that shows when your compact-custom-header needs to be updated. It would be nice to be able to suppress this view’s icon from the header on the wall tablet / dashboard.
1 Like
mayker
(maykar (pronounced "maker" with a southern accent))
40
I like that a lot. You’d be able to essentially make per user (device) views. Need to think on the best way to set up config, so that for each user agent you can hide show any tab/view. Maybe something like: