thomasloven / lovelace-card-mod

🔹 Add CSS styles to (almost) any lovelace card
MIT License
1.08k stars 168 forks source link

FR: *Default* order and visibility of sidebar panels #225

Closed kulmegil closed 1 year ago

kulmegil commented 1 year ago

Problem: Currently Frontend SettingsSidebar order option is enforcing. Browser_mod resets them each time page is reloaded. Order/visibility cannot be changed by users without admin role at all.

What I want is to set (non enforcing) defaults - for "new" browsers. Those can be changed later by any user at his/her discretion.

Solution: Make option set default visibility/order for a "new" browser. This might be a separate option or a flag to existing setting.

The "new" browser is where:

Technical: Not sure if there is a special API for that but:

const hasModifiedSidebarPanels = !!(localStorage.sidebarHiddenPanels || localStorage.sidebarPanelOrder);

Sidebar settings are stored in browsers localStorage. Those 2 keys are undefined until user modifies sidebar first time and remains defined even if initial order or visibility are restored from sidebar editing gui.

kulmegil commented 1 year ago

Upsi... wrong repo. It was meant for browser_mod obviously