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>
Fixes#2149: Syntax validation errors when command mappings contain special characters like [ and ].
Sitemaps now support icon rules and AND conditions in icon, color and visibility rules.
Mappings now also support an icon.
This PR introduces support to configure this in the sitemap editor.
It also contains a fix for staticIcon support.
Depends on https://github.com/openhab/openhab-core/pull/3850.
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
This adds the ability to copy a UI rule.
The rule editor behaves as if the rule was a new one, but is pre-populated with the copied rule.
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
This PR fixes an error in the context definition of the `oh-clock` used
in the `oh-clock` card that was causing the clock cards to fail to
render in the updated configuration definition.
See the forum discussion:
https://community.openhab.org/t/oh4-oh-clock-card-empty-since-oh4-1-m2/150518
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
Fixes#1926.
Awaiting https://github.com/openhab/openhab-core/pull/3838.
Load the UoM dimensions for UoM Item types from the REST API instead of
hard-coding them into the UI.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This allows the local running instance of the UI to listen to an Item
for commands. Specifically it will understand the following commands.
- navigate
- popup
- popover
- sheet
- close (closes all popups/sheets/popover)
- back
- reload
- notification
Commands with arguments use a colon delimiter, mirroring widget actions
in the UI, for example:
- `navigate:/pages/page`
- `popup:widget:customWidget`
- `notification:Text:Title:Sub Title:Title Right:5000`
Users can select the item in the about menu, since other local
options are set there it seemed to be the best place.
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
Closes#2001.
Adds Quantity support for more math blocks:
- math_single had to be reimplemented
- math_minmax was added
Note that there is a special case on min/max if the inputs are not of
equal type an error will be shown to user.
In the special case of variables Blockly does its best to detect the
right code to be generated for the min/max block:
- both are variables -> then numerical input is expected
- one of inputs is a variable: then blockly uses the type of the other
non-var-block to base the generation on (either number or quantity
comparison)
- note that no type conversion of the inputs is done
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
Regression from #2090.
Fixes `Uncaught TypeError: Cannot read properties of undefined (reading
'length')` being thrown if the step property is an integer value, e.g. 1
or 1.0.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Applied to Chart/Image/Viodeo/Mapview/Webview elements.
Chart and Image elements are also now clickable.
Clicking allows toggling between header row shown and header row hidden.
Fix#2065
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Sitemaps are now also sorted by label/name.
Dark theme is now properly handled.
In case several sitemaps have the same label, the sitemap name is
concatenated in parenthesis.
Fix#2101
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Fixes#927.
When attempting to open an `oh-` Vue component, e.g.
`oh-colorpicker-card`, as action modal, it was not possible to configure
it, even though `actionModalConfig` was set.
This was because `oh-` componens take their configuration from the
computed `config` of the widget-mixin instead of the Vue component
`props`.
This PR fixes that by using the `actionModalConfig` for the computed
`config` of `oh-` components in action modals.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Changes introduced into #2087 in combination with #2093 create duplicity
in showing non-semantic tags in the model page
(component/model/item-details.vue).
Non-semantic tags are displayed both in the Item and when edit mode is
enabled, in the accordion tag input in item-form.
Signed-off-by: David Kesl <david_git@keslovi.cz>
The RelativeCI action was using the CLI with an inline API key.
This PR replaces the RelativeCI CLI with the action agent running on workflow_run
event and in the context of the default branch (secrets are not leaked to forks).
Signed-off-by: Viorel Cojocaru <vio@beanon.com>
Closes#2092.
- Adds possibility to display Item name and non-semantic tags in Semantic model tree view.
- Adds search for Items also based on Item name and tags depending on selected view options.
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: David Kesl <david_git@keslovi.cz>
Closes#2086
- Adds Non-semantic tags to Items list (e.g. /settings/items/)
consistently with similar list of Rules / Scripts / Pages.
- Extends `getItemTypeAndMetaLabel` with relatesTo part of Semantic
classification and moves it to a mixin.
- Fixes incorrect calculation of vue virtual box height on Items list.
- Replaces custom tag input with accordion tag input (inspired by
https://github.com/openhab/openhab-webui/pull/2078) and show number of
tags (inspired by https://github.com/openhab/openhab-webui/pull/2083).
- Moves the custom tag input to `item-form.vue`, so it is available also
in Model view, when creating Item from Thing etc.
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: David Kesl <david_git@keslovi.cz>
Fixes#2089.
Possibly regression from #1875.
Stepper formatValue was calculating displayed number of decimals from the value of the step property, not it's length.
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
When generating the sitemap DSL from a UI configured sitemap with color
conditions, if the color in the condition has a leading space, it will
be included in the color string.
While this does not have an impact on the sitemap functionality (it
works), it is an issue if one would copy this sitemap to a sitemap file.
This PR strips the blanks from the color.
See #2082 and the example provided there.
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Closes#2077.
This PR adds ability to add / change / remove Tags to Pages via MainUI.
It is using existing tag-input.vue component similar as UI for Items and
Rules.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: David Kesl <davidkesl76@gmail.com>
Adds routes for `/overview`, `/locations`, `/equipment` and
`/properties` so a home page reload keeps the tab and routing to
individual tabs is possible.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Follow-up for #1997.
- Addresses
https://github.com/openhab/openhab-webui/pull/1997/files#r1313446378:
Use filled icon for the add-on store.
- Fixes#2049: Fix sidebar highlighting for add-on settings and add-on
store pages.
- Fixes#2028: Fix tab is resetted to bindings when reloading the add-on
store (by using seperate routes for all tabs, therefore addresses
https://github.com/openhab/openhab-webui/pull/1997#issuecomment-1703221977).
- Closes#2048: Expand system settings by default on large screens where
three columns are used.
- Localize the "Show All" buttons.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Co-authored-by: Yannick Schaus <github@schaus.net>
The block can now take both “get item item xxx” or (new) “item xxx” directly.
I have also added some hint in the help tooltip that clarifies
how to work with the block when using it through variables because
Blockly has to make an assumption due to the fact that it cannot detect
what is provided in the variable.
See https://community.openhab.org/t/less-then-greater-then-comparison-return-value-seems-to-be-inverted/148910/9.
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
Closes#2067.
This PR introduces CO2 measument badge to the location card in MainUI.
It is same logic as other measuments badges, i.e. average from items
with Measurement and CO2 Semantic tags.
---------
Signed-off-by: David Kesl <davidkesl76@gmail.com>
The openHAB demo's profile page takes ages to render because of the huge
sessions list. This should fix that problem.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes#2006.
With the attempt in #2029 failing due to #2054, this finally fixes an
issue where the semantic model pages (Equipment, Properties) were
missing translations.
This was due to a race condition, where the semantic model pages were
built before the tags were loaded.
This PR fixes this by watching for semantic model updates (i.e.
subscripting to the underlying Vuex mutation) and loading/building the
model pages after such an update.
Futher improvements:
- Initial loading of semantic tags is put in parallel with other API
requests performed on app init.
- Vuex semantics: A mutation is used for setting the semantic tags from
the action.
- Debug logging is added to both the semantic tag and the semantic model
page loading.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
When set on a sitemap element, Basic UI ignores the item state when
initially requesting the OH icon and do not request it again when the
item state is updated.
Depends on openhab/openhab-core#3735
Related to openhab/openhab-android#3404
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Header line for video element contains icon and label.
Header line for image element contains icon, label and a button to
switch between no upscale and upscale of the image. Header line for
chart element contains icon, label and 4 buttons:
- one button to show or hide the legend
- one button to change the time range
- one button to switch between no upscale and upscale of the chart
- one button to refresh the chart
Fix handling of iconcolor and labelcolor parameters for mapview and
webview elements.
For image and chart elements, the header line is always present so that
user has an access to its buttons.
For video, mapview and webview elements, if the label is empty, the
header line is hidden.
For chart and image elements, there is now no upscale applied by default
(tablet/phone devices) but a button allows upscaling.
Closes#1939Fixes#1367
Also related to #1930
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Fixes#1713.
- Fix command not sent when current Item state is null.
- Fix style can not be set.
- Fix a (cosmetic) error thrown when defaultColor has no value.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>