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

Configurable visibility of semantic model cards (with visible / visibleTo) #2143

Closed
wuschi opened this issue Oct 20, 2023 · 0 comments · Fixed by #2144
Closed

Configurable visibility of semantic model cards (with visible / visibleTo) #2143

wuschi opened this issue Oct 20, 2023 · 0 comments · Fixed by #2144
Labels
enhancement New feature or request main ui Main UI

Comments

@wuschi
Copy link
Contributor

wuschi commented Oct 20, 2023

The problem

Currently it's not possible to show/hide the model cards (the ones generated from the semantic model) for roles or users.

With widget components, this can be achieved by defining the config options visible and visibleTo.

Your suggestion

model-card.vue already uses the widget-mixin.js mixin, which provides the visible computed property based on those config options, but this computed property is not used in the template.
The template should be modified accordingly.

Your environment

openHAB 4.1.0
Build #3680

Additional information

See this community thread for further examples

@wuschi wuschi added enhancement New feature or request main ui Main UI labels Oct 20, 2023
wuschi added a commit to wuschi/openhab-webui that referenced this issue Oct 20, 2023
Only render model-card if `visible` computed property is `true`.
Hide divs in model-tabs which do not have a visible model-card.
Closes openhab#2143

Signed-off-by: Thomas Wunschel <thomas.wunschel@twistsolutions.de>
wuschi added a commit to wuschi/openhab-webui that referenced this issue Oct 20, 2023
Only render model-card if `visible` computed property is `true`.
Hide divs in model-tabs which do not have a visible model-card.
Closes openhab#2143

Signed-off-by: Thomas Wunschel <thomas.wunschel@twistsolutions.de>
Signed-off-by: Thomas Wunschel <4302898+wuschi@users.noreply.github.com>
florian-h05 pushed a commit that referenced this issue Oct 29, 2023
Closes #2143.

Only render model-card if `visible` computed property is `true`.
Hide divs in model-tabs which do not have a visible model-card.

Signed-off-by: Thomas Wunschel <thomas.wunschel@twistsolutions.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request main ui Main UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant