Commit Graph

1510 Commits (4b1ef3b4dc381762ab5757318ef612820b02d02d)

Author SHA1 Message Date
Florian Hotze 5703ddc416
Rule module popup: Fix margin issues and improve styling (#2620)
Second attempt after #2618.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-23 09:55:12 +02:00
Florian Hotze 0fd5428dd1
Rule module popup: Fix margin issue with Configuration block title (#2618)
Fixes margin issue by ensuring that margin is not negative.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-23 00:15:57 +02:00
Florian Hotze cd40c72e43
Thing view: Add support for HTML-formatting of channel descriptions (#2614)
Closes #2613.

This adds support to format channel (type) descriptions using `html` tags similar to thing-type descriptions.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-16 21:39:36 +02:00
Florian Hotze 418def2eb4
Sitemap edit: Fix column width wrongly applied (#2611)
Fixes #2574.

This is more a workaround than a real fix because it seems there is an issue in Framework7's CSS.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-16 16:27:51 +02:00
Wouter Born 85fd88dbe8
Fix Main UI dark mode scrollbars in Chrome (#2610)
This fixes the issue that when using Chrome the scrollbars are still very bright and not dark.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-06-16 15:07:59 +02:00
Mark Herwege e80b221940
Sitemap editor: Fix issues with AND, buttongrid and numeric commands (#2609)
Fixes https://github.com/openhab/openhab-webui/issues/2605
Also fixes issue with Buttongrid and non-numeric commands

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-06-13 16:01:19 +02:00
openhab-bot eb0a24720d
New Crowdin updates (#2577) 2024-06-03 13:59:58 +02:00
Mark Herwege 17e463d229
Add-on store: Fix region is null error (#2600)
Fixes https://github.com/openhab/openhab-core/issues/4266.

Error was introduced by #2582 and manifests itself
when no country was set in the setup wizard or the locale settings.

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-06-02 12:39:42 +02:00
Florian Hotze c148e7d897
Widget expressions: Ensure correct context & props are passed on recursion (#2599)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-02 11:55:40 +02:00
JustinGeorgi 6ceeee3b6e
Add oh-context component (#2533)
Closes #2437, Closes #2148

This PR adds a new component, the oh-context. Similar to the repeater,
this component is not rendered, but injects information into the widget
at it's tree location.

The component allows to inject these three things into the widget:
* functions - using the arrow function syntax, named functions can be
declared and reused in all subsequent expressions
* constants - constants can be defined as either single values, arrays,
or objects
* variables - variables can be defined with default values. These
variables are local in scope to the oh-context and it's descendants and
take precedence over other variables of the same name from higher
contexts.
  * Variables are not divided into global vs local explicitly. But a
oh-context used as the root component of a widget will have its
variables in the context of all the other components on that widget and
thus they essentially have a global context within that widget.
  * In contrast to the basic widget variables, oh-context variables do
have bi-directional passage between a main widget and a sub widget.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2024-06-01 18:31:27 +02:00
JustinGeorgi aa4e218961
Add a "Add from template" page for the semantic model (#2105)
This adds a button and new sub page to the semantic model.
On that sub-page the user can select from a few different basic templates for
semantic locations which can then be automatically created and added to the model.

There are a few options for customization:
1) The user can select a custom prefix that will be applied to all the items to fit or establish a desired naming scheme.
2) The user can optionally deselect extra pieces of the model that are not appropriate to their needs.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2024-05-31 19:53:08 +02:00
Mark Herwege 5ae3e37636
Add-on store: Add connection and country filter (#2582)
Closes #2050.

This implements filtering for connection type and country (related to
region/country setting) in the addon store.

By default, it will filter for all connection types and filter out
addons not supported for a specific country if info on countries is
available.

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-31 13:01:01 +02:00
Dan Cunningham 3999dea947
Tabbed pages: Add optional badges and badge color to tabbar (#2592)
Small addition that adds badge text and color to tabs on a tabbed page.

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
2024-05-27 21:36:18 +02:00
Florian Hotze 4c34b611ed
Tabbed pages: Show config in code tab & Enable expressions for title and icon (#2591)
Makes the tabbed page config editable though the code tab: Resolves #1276. Resolves #2103.
Enables expression evaluation for tab title and icon: Resolves #2571.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-05-27 20:18:00 +02:00
stefan-hoehn df8ef84ff0
[blockly] Fix Thing "is enabled" code generation (#2588)
Thing::enabled produces undefined because enabled is no valid field.
Using Thing::isEnabled instead.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-05-26 12:37:03 +02:00
Christian Kittel 21b669e3d5
[blockly] Fix event block code generation (#2587)
Fixes #2586.

Moves the bracket to the correct position.

Signed-off-by: Christian Kittel <ckittel@gmx.de>
2024-05-26 10:13:38 +02:00
Jacob Laursen fabafbf3d2
Provide on/off icons for soundvolume_mute (#2585)
Related to openhab/openhab-core#4245

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-05-25 14:33:35 +02:00
Holger Friedrich d23f407b2a
Upgrade Karaf from 4.4.5 to 4.4.6 (#2547)
Refs https://github.com/openhab/openhab-core/pull/4181.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-05-20 19:45:24 +01:00
lolodomo a76d0ed338
[BasicUI] Switch between several Button elements at a place in the grid (#2580)
Several Button elements are accepted at the same place in the grid only
when they all have visibility conditions.
In this case, the user must define proper conditions so that only one
button is visible at any time.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-19 15:05:03 +02:00
stefan-hoehn 7e59922a33
[blockly] Add typed vars (#2581)
This PR **is really a game changer** for further Blockly Usage. 

It adds typed variables which in turn allows Blockly to generate the right code.
This is what I was looking for a very long time and will also reduce
many of the issues that popped up here and there.

Fixes #2057.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-05-19 14:28:29 +02:00
lolodomo 37cfea2862
[BasicUI] Switch with buttons: value displayed if pattern on widget (#2579)
When a Switch widget leads to the rendering with buttons, the value
should not be by default also displayed at the left of the buttons
(redundant information), except if it is requested through a state
pattern defined on the widget.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-18 17:32:37 +02:00
lolodomo 2fd4267ebc
[BasicUI] New Button element as child of Buttongrid (#2573)
Related to openhab/openhab-core#4173

Depends on openhab/openhab-core#4223

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-18 16:31:32 +02:00
lolodomo bcfd55fd6e
[BasicUI] Remove a useless call to function reloadIcon (slider widget) (#2578)
Follow up #2535

The function reloadIcon is already called by the function setValue at
line 636 just before calling setValuePrivate.

The icon continues being refreshed while moving the slider except if
releaseOnly parameter is set.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-18 11:54:40 +02:00
Mark Herwege d8016b6ddf
Setup Wizard: improve suggestions refresh on network change (#2568)
- Remove the suggestion loading delay when setting the network without a change as this is not required.
- While in the wait cycle, going back to the network selection and setting the network again (with or without change)
  would lead to the progress bar alternating between short and long because 2 timer cycles
  would be running in parallel. Fix this by cancelling the existing timer if there is a network change.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-15 11:09:32 +02:00
stefan-hoehn a32fd66544
[blockly] Add timer context (#2575)
Adds the possibility to provide any information to the timer's callback
block that can be used when the callback is eventually executed.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-05-15 11:07:08 +02:00
lolodomo ce17983cdf
[BasicUI] Remove a call to window.console (#2572)
Was added when implementing #2536 for test purpose and I forgot to
remove it.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-10 10:24:42 +02:00
stefan-hoehn 5282f447fd
[blockly] Add more thing blocks (#2562)
Fixes #2552.

Add missing blocks to work with a thing or a group of things:

- oh_getthing (one particular)
- oh_getthing_state (the state of the string - to be consistent with
items)
- oh_getthings (get all things - can be used to iterate over all things)
- oh_getthing_attribute (retrieve any attribute of a thing)

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-05-07 17:58:18 +02:00
Florian Hotze 8ed66cc642
[blockly] Adjust persistence blocks to breaking changes (#2564)
This adjusts the persistence blocks for the **breaking** changes of
`org.openhab.core.persistence.extensions.PersistenceExtensions`.

For NashornJS, see https://github.com/openhab/openhab-core/pull/3736 for the changes.
For GraalJS, see
https://next.openhab.org/addons/automation/jsscripting/#itempersistence for the current API docs and
https://github.com/openhab/openhab-js/pull/331 for the changes.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-05-07 17:55:25 +02:00
Mark Herwege 6bb52b5aca
Item parser: Add missing group item aggregation functions (#2567)
See https://community.openhab.org/t/groupnor-not-working-anymore/155812.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-07 17:45:00 +02:00
dependabot[bot] 8779dcf694
Bump ejs from 3.1.9 to 3.1.10 in /bundles/org.openhab.ui/web (#2560)
Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10.

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-07 13:03:23 +02:00
Mark Herwege 5f3d6daa21
Setup wizard: Add primary IP config (#2565)
Add-on finders scan the network for devices supported by OH add-ons to suggest suitable add-ons.
These are presented in the setup-wizard (and add-ons store).

To limit network traffic, especially for IP broadcast and multicast scans,
finders could limit the traffic to one subnet.
This is especially relevant if the setup would be on servers with many
network interfaces or when using Docker. 

This commit adds setting up a primary IP address to the setup,
which will also default the broadcast address accordingly to the primary address.
Querying add-on suggestions is delayed until after this step, 
and some delay is built into the process to allow suggestions finders to scan the network.

See discussion in https://github.com/openhab/openhab-core/pull/4036.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-07 12:54:30 +02:00
Mark Herwege 3fa319248b
Sitemap editor: Add press release button support (#2553)
Related to https://github.com/openhab/openhab-core/pull/4183.
Depends on https://github.com/openhab/openhab-core/pull/4204.

This PR implements press/release button support.

Refactor code to allow proper quoting of arguments in mappings and conditions.
Quotes are now preserved, and therefore they need to be removed in core
at usage (https://github.com/openhab/openhab-core/pull/4204).

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-07 10:44:40 +02:00
lolodomo 02024c62b5
[BasicUI] Implement press & release button (#2536)
Related to openhab/openhab-core#3822

Depends on openhab/openhab-core#4183

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-06 20:55:24 +02:00
Florian Hotze 50f2a91703
Update openhab-js tern defs (#2563)
This updates the tern defs used for autocompletion to the current library version included in the addon (5.0.0)
and also cleans up the actions namespace (remove functionality that is included in superior APIs like `things`).
Reference https://github.com/openhab/openhab-js/compare/v4.7.0...v5.0.0.

Last update was in #2220.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-05-06 12:02:59 +02:00
Florian Hotze 9d89146705
Setup wizard: Fix already set i18n settings not respected (#2559)
Fixes https://github.com/openhab/openhab-core/issues/4105.

The setup wizard did not respect the i18n config file's content, which
resulted in overwriting the existing i18n settings.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-05-02 14:42:06 +02:00
Florian Hotze 6f5a59f57e
Setup wizard: Fix server-set region and location not shown on later wizard launch (#2558)
This makes the setup wizard load the region and the location from the
server.
Useful when the wizard is re-launched later.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-05-02 12:57:32 +02:00
lolodomo 93f758b75b
[BasicUI] Fix build after a method renaming in core framework (#2557)
Related to openhab/openhab-core#3652 that renamed method setPageId into
updateSubscriptionLocation

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-02 11:01:55 +02:00
Florian Hotze 14a6c9e59d
Setup wizard: Refactor add-on selection & Add descriptions for JS Scripting & Astro (#2556)
- Move the selection of additional add-ons into the addons-setup-wizard.vue component.
- Add description texts for suggested add-ons JS Scripting and Astro.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-05-01 15:02:43 +02:00
Mark Herwege faa4018536
Setup wizard: Add separate step for persistence (#2431)
This improves the first installation experience by:

- Splitting out persistence to a separate step of the setup wizard (and no persistence will be offered in the main wizard addon selection anymore).
- Allows unselecting addons from the shown list without having to open the selection popup again.
- Including Mapdb as a proposal for a persistence service to install
- Including Astro binding in the recommended addons at initial install

This also creates the groundwork to implement more fine grained suggestions in the setup wizard 
by allowing to have separate steps for types of addons or specific addons.
It is possible to set extra text for identified add-ons.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-01 12:37:58 +02:00
Florian Hotze c6e1d8bc87
Use Node v20 for Main UI build (#2434)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-30 16:55:03 +02:00
Florian Hotze 13169c1475
Add-on logo component: Make lazy loading optional (#2555)
This makes the lazy loading of the add-on logo optional (can be enabled
using a config property) in preparation to use the add-on logo component
inside the setup-wizard.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-30 15:52:29 +02:00
Mark Herwege d292cf6ae8
Sitemap editor: Fix buttongrid editor (#2554)
Fields should use all space available. In a button grid definition the
row and column fields where not visible.

I can't say what caused this, but this PR should fix this.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-04-30 13:59:01 +02:00
lolodomo b27d71392e
[BasicUI] Add special handling for "none" icon (#2534)
Same behaviour as in the Android app is now implemented for the "none"
icon. This icon means "no icon" and we don't want to request the icon
servlet. When this icon is associated to a sitemap element, the icon
servlet is no more requested. Instead, a simple empty SVG tag is
considered and inserted in the HTML page. There is also no dynamic
behaviour (with item state) applied for this icon.

Additionally, in case the loading of any OH icon fails, the IMG tag is
replaced by an empty SVG tag in the HTML page instead of updating the
IMG source with the none icon URL (triggering a potential new icon
servlet request).

Fix openhab/openhab-core#3977

Signed-off-by: Laurent Garnier <lg.hc@free.fr>

---------

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-04-27 10:48:05 +02:00
Holger Friedrich 10aeb247ae
Update Maven plugins (#2551)
Update nearly all Maven plugins:

* set minimum Maven version to 3.6.3
* build-helper-maven-plugin, 3.4.0 to 3.5.0, see
https://github.com/mojohaus/build-helper-maven-plugin/releases/tag/3.5.0
* frontend-maven-plugin, 1.13.4 to 1.15.0, see
https://github.com/eirslett/frontend-maven-plugin/blob/master/CHANGELOG.md
* license-maven-plugin, 4.2 to 4.3
* maven-clean-plugin, 3.3.1 to 3.3.2, see
https://github.com/apache/maven-clean-plugin/releases
* maven-dependency-plugin, 3.6.0 to 3.6.1, see
https://github.com/apache/maven-dependency-plugin/releases/tag/maven-dependency-plugin-3.6.1
* maven-enforcer-plugin, 3.4.0 to 3.4.1
* maven-jar-plugin, 3.3.0 to 3.4.1, see
https://github.com/apache/maven-jar-plugin/releases
* maven-javadoc-plugin, 3.2.0 to 3.6.3, see
https://github.com/apache/maven-javadoc-plugin/releases
* maven-plugin-plugin, 3.9.0 to 3.12.0, see
https://github.com/apache/maven-plugin-tools/releases/tag/maven-plugin-tools-3.12.0
* maven-site-plugin, 3.12.1 to 4.0.0-M13
* maven-source-plugin, 3.3.0 to 3.3.1
* maven-surefire-plugin, 3.1.2 to 3.2.5, see
https://github.com/apache/maven-surefire/releases
* sortpom-maven-plugin, 3.3.0 to 3.4.1
* spotless-maven-plugin, 2.38.0 to 2.43.0, see
https://github.com/diffplug/spotless/blob/main/plugin-maven/CHANGES.md

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-26 10:57:54 +02:00
Florian Hotze 3396a4f639
Charts: Fix initial period wrongly calculated for future charts (#2548)
Follow-up fix for #2545.

When the initial period was different from `D`, the period initial
endTime calculation was wrong.
This lead to the initial period being calculated wrong: One day was
always into the future, the rest of the period to the past.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-23 14:01:45 +02:00
Florian Hotze e9c5ad505f
Charts: Add option to extend initial period to future & Refactor prop defs (#2545)
This adds a new option to charts which allows to extend the initial period to the future by default.
Until now, when a chart was opened its period always extended to the past.
This is especially useful with the new timeseries support for Items as it allows to display forecasts.

Also refactor the chart property definitions to use the helpers.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-21 17:13:39 +02:00
lolodomo 0c7aa4d07d
[BasicUI] Fix slider behaviour and implement two different modes (#2535)
Fix #2525
Also related to openhab/openhab-core#4084 and openhab/openhab-core#3430

Two behaviour modes are now supported.
- If releaseOnly parameter is set, the new value is sent to the item
only when the slider is released.
- If releaseOnly parameter is not set, new values are sent to the item
while moving the slider. Events are sent at a certain frequency, this
frequency is defined by the sendFrequency parameter if set or every 200
ms by default. Event is not sent when the value is is unchanged (when
stopping the move but keeping the mouse pressed).

The brightness slider of the colorpicker widget is also updated to send
regular new color commands when moving the slider.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-04-21 16:29:19 +02:00
Mark Herwege 736d12c703
Save stateDescriptionPattern from channel type for UoM Items & Save UoM metadata when adding from model (#2485)
When creating a new Number with Dimension item from a channel link, the
stateDescriptionPattern does not propose the state description pattern
from the channel type as the default.

This commit introduces this:

It only saves this state description pattern from the channel type to
metadata of the item if it is not the default state description pattern
for a Number type.

Subsequent edits of the item will present a disabled state description pattern input.
If no state description field is set, a blank field will be presented.
Reasons are:
- A state description can contain more than a pattern.
  Saving only the pattern would override the rest of the stateDescription.
- An Item can be linked to multiple channels with (possibly conflicting) stateDescription.
  The only solution would be for the user the set it on the item and override the channel stateDescriptions.

See https://github.com/openhab/openhab-addons/pull/16531#discussion_r1530394678.

This PR also now saves the unit (and state description pattern) when creating equipment or point from a thing.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-04-21 15:00:18 +02:00
Florian Hotze e5d930b057
Metadata: Add `link_to_more` as well-known namespace (#2543)
Closes #2382.
Refs https://github.com/openhab/openhab-android/issues/3140.

Adds Android app's link_to_more metadata to the well-known namespaces,
therefore also adds an editing page for it.

---------

Also-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-21 14:56:42 +02:00
lolodomo 9e48ad8693
[BasicUI] Fix update of buttons (switch element) (#2538)
Fix #2537

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-04-21 11:40:15 +02:00
Florian Hotze 2de1521cf9
Script edit: Fix script creation fails due to exception (#2542)
Regression from #2508.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-20 23:40:10 +02:00
Florian Hotze 83147c23ac
Persistence edit: Add support for selecting all Items (#2541)
Closes #2516.

Adds a new toggle to the configuration popup of persistence edit to
select all Items (the equivalent to the `*` wildcard in file-based config).
If all Items are selected, the group Item and normal Item pickers will be disabled.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-20 23:29:39 +02:00
Florian Hotze aadeb38d3d
SSE Item State Tracking: Avoid requesting __ob__ and __v_isRef (#2540)
Fixes #2530.
Regression from #2489.

I wasn't able to identify the root cause, but this seems to solve the problem.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-20 22:52:11 +02:00
dependabot[bot] b614f97156
Bump tar from 6.1.13 to 6.2.1 in /bundles/org.openhab.ui.basic (#2531)
Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.13 to 6.2.1.

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-20 21:21:07 +02:00
Florian Hotze bb66514642
Things list: Always show the inbox (#2539)
This allows to access the inbox if it only contains ignored entries
without having to manually enter the page route.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-20 21:15:56 +02:00
Mark Herwege 1232bf5606
Allow future periods in sitemap configuration (#2529)
Chart widget sitemap configuration has been extended with support for
future periods in https://github.com/openhab/openhab-core/pull/4172.
This adds configuration in the UI.

See #2518.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-04-12 12:45:29 +00:00
openhab-bot c546534602
New Crowdin updates (#2527) 2024-04-12 12:38:03 +00:00
openhab-bot ac6b3a4eef
New Crowdin updates (#2528) 2024-04-12 12:37:18 +00:00
Florian Hotze 4a0054a1f0
Thing details: Fix code tab not editable (#2526)
Fixes #2523.

Regression from one of the previous PRs to the Thing details page.

This is a timing issue similar to #2375, where the code editor is
initialized as read-only because the Thing is not loaded yet.
After initialisation, the editor can not be set to read-write.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-07 11:51:24 +02:00
lolodomo aaf3edcd09
[BasicUI] Adjust user-defined colors to theme for better contrast (#2521)
Closes #1780

Colors are those defined by user through the labelcolor, valuecolor and
iconcolor parameters. The aim is to provide a good contrast n both
themes. For example white in light theme just leads to something not
visible. So black is used instead.

This behaviour is already implemented in the Android app with the same
adjustments.

Colors adjusted in light theme: yellow, pink, white, lime, aqua, silver
and gold.
Colors adjusted in dark theme: maroon, purple, green, navy, blue, black
and gold.

These color adjustments are controlled by a new Basic UI setting,
enabled by default. By disabling it, no adjustment is performed and the
old behaviour is restored.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-04-07 11:17:45 +02:00
lolodomo 1db2d0bea4
[BasicUI] Add predefined periods in future for chart (#2524)
Related to #2518

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-04-07 10:54:10 +02:00
lolodomo 93e6e97bc4
[BasicUI] All buttons forced on one line for a Player item (#2492)
Follow-up #2341
Partial revert to make two exceptions and restore old behaviour (buttons
on a unique line) for:
* Control buttons of a Player item
* Buttons in the settings page

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-04-07 10:43:27 +02:00
Florian Hotze 0449e5111b
Things list: Fix broken list index after Thing removal (#2515)
After a Thing has been removed, the list index showed several wrong
entries derived from Thing labels.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-30 22:09:07 +01:00
Florian Hotze c9f2a4effd
Downgrade vue-fragment as the upgrade broke oh-repeater in some circumstances (#2514)
When we upgrade to Vue 3, we can remove this dependency as Vue 3 has
this functionality integrated, see
https://api.vueframework.com/guide/migration/fragments.html.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-30 22:00:58 +01:00
Florian Hotze 57025c3832
Chart calendar axis: Don't override user-defined dayLabel and monthName settins (#2513)
This e.g. allows to set dayLabel.nameMap
(https://echarts.apache.org/en/option.html#calendar.dayLabel.nameMap).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-30 19:58:02 +01:00
Florian Hotze 673ef9b1ca
Things (inbox) list: Improve condition for reversed checkbox style (#2512)
Follow-up for #2472.

Improve the condition to only show the reversed order where really
required.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-30 12:58:02 +01:00
Florian Hotze 2539d6dcf3
Analyzer: Fix analyzer not initially visible on iOS 17.4 (#2511)
When the analyzer was opened on iOS/iPadOS 17.4 devices, the screen stayed blank until the controls were opened.

ECharts logged the following warning to the console:

[ECharts] Can't get DOM width or height.Please check dom.clientWidth and dom.clientHeight.
They should not be 0.For example, you may need to call this in the callback of window.onload.

Reported on the community:
https://community.openhab.org/t/openhab-4-1-release-discussion/152252/188?u=florian-h05.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-29 17:24:03 +01:00
Florian Hotze 4d5a4a4a81
Downgrade pkce-challenge to fix authentication for insecure (HTTP) contexts (#2510)
Regression from #2488.

Version 4.x of pkce-challenge uses the Web Crypto API, which is only
available in secure contexts (https) in most browsers.
This broke the login when accessing the UI over an insecure (plain HTTP)
connection.
See https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-29 14:52:40 +01:00
openhab-bot 01203e1c61
New Crowdin updates (#2494) 2024-03-29 11:11:32 +01:00
dependabot[bot] 85d3e477fd
Bump express from 4.18.2 to 4.19.2 in /bundles/org.openhab.ui/web (#2507)
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-29 11:10:52 +01:00
Florian Hotze 5507555908
Charts config: Add gauge and pie chart types (#2509)
Those are imported in
974e28e9ba/bundles/org.openhab.ui/web/src/components/widgets/system/oh-chart-component.vue (L47)
and should therefore work.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-27 10:01:12 +01:00
Florian Hotze 974e28e9ba
Script edit: Fix dirty handling (#2508)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-26 12:12:23 +01:00
Florian Hotze ea59ce14e2
Upgrade Framework7 to latest v5 version (#2506)
Framework7 v6 requires Vue 3, so we need to upgrade to Vue 3 as well
when upgrading to Framework7 v6.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-26 02:20:45 +01:00
Florian Hotze 72f53e6ff8
Rule edit: Fix rule module title and description regression (#2505)
Fixes regression from #2471.
See https://github.com/openhab/openhab-webui/pull/2471#discussion_r1538237708.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-26 02:08:33 +01:00
Florian Hotze abdffc62d2
Make marked and diacritic dependencies and not dev dependencies (#2504)
They are actual dependencies for Main UI's code, therefore they should
not be dev but main dependencies.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-25 16:35:04 +01:00
Florian Hotze 576142fe0a
Upgrade dev dependencies (#2503)
This upgrades most dev dependencies to their latest (compatible) version.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-25 16:23:34 +01:00
Florian Hotze aa7543ffb5
Things list: Fix location tab (#2501)
Regression from #2499.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-25 14:05:33 +01:00
stefan-hoehn e5749f6fd6
[blockly] Fix multilineedit rendering issue (#2496)
Fixes the the dreaded blockly multilineedit rendering issue.

More info can be found at: https://github.com/google/blockly-samples/issues/2235

The solution is to make sure that the hidden textarea style neither has a background of none or transparent.

---------

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-03-25 13:52:20 +01:00
Florian Hotze 577568d167
Sitemap edit: Fix attribute-details styling applies globally (#2500)
Fixes #2456.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-24 23:48:39 +01:00
Florian Hotze 6ed3683cd4
Things list: Only show "no location" optionally for sort-by location (#2499)
Closes #2486.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-24 23:15:38 +01:00
Florian Hotze 3a37d014dd
Rule edit: Always create script field for script action/condition (#2497)
Fixes #2461.
Depends on https://github.com/openhab/openhab-core/pull/4148.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-24 22:31:26 +01:00
Florian Hotze b876572de2
Fix deprecation warning in unit test (#2498)
See
https://v1.test-utils.vuejs.org/api/wrapper/isvueinstance.html#isvueinstance.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-24 22:30:20 +01:00
dependabot[bot] f2f9f58146
Bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /bundles/org.openhab.ui/web (#2493)
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-24 21:50:48 +01:00
jimtng 6b321a766a
Item edit: Validate name on load (#2495)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-24 21:32:56 +01:00
stefan-hoehn 32b8b88e47
[blockly] Fix missing event property causes JS error (#2476)
See https://community.openhab.org/t/blockly-proposal-to-change-contextual-info-blocks/154403/27.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-03-24 21:26:48 +01:00
jimtng 1bebae32ea
Link channel to Item: Include error message on name validation failure (#2487)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-21 19:43:54 +01:00
Mark Herwege 162cc1ada4
Fix webpack asset filename (#2484)
Resolves https://github.com/openhab/openhab-webui/issues/2483

The webpack [ext] template string already includes a leading . (see https://webpack.js.org/configuration/output/#template-strings).
This PR removes the the extra dot that was added.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-03-21 19:17:50 +01:00
Florian Hotze 8bb84162ad
Upgrade & Clean-up webpack loaders (#2490)
Updates webpack loaders and removes `vue-style-loader` as it is not used.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 19:16:30 +01:00
Florian Hotze 70b2df201b
Upgrade Vue from 2.6.12 to 2.7.16 (#2489)
Also upgrade unit test dependencies and unit test and and ESLint config 

See https://v2.vuejs.org/v2/guide/migration-vue-2-7 for Vue migration guide.
See https://github.com/vuejs/vue-test-utils/ and https://github.com/vuejs/vue-jest for unit tests.
See https://github.com/vuejs/eslint-plugin-vue/releases/tag/v9.0.0 for ESLint rule changes.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 18:59:22 +01:00
Florian Hotze 577d6ed842 Upgrade vuex
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze d5a510e8fe Upgrade yaml
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 77901b425a Upgrade vue-i18n & Silence translation fallback warnings
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 8e9acce538 Upgrade vue-grid-layout
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 5752856c7d Upgrade vue-fullscreen
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 29f3c1be00 Upgrade vue-fragment
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze e39d476655 Upgrade tern
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 12546605be Remove sprintf-js
This dependency was not used and hence can be removed.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 6e3d483f9d Upgrade qrcode
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 7d35ec8d92 Upgrade pkce-challenge
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze bcdab18cae Upgrade moo & nearley
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 9a4d454943 Upgrade lodash
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze e494e9ec68 Upgrade leaflet
Map and floor-plan pages were tested and are still working.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 1694973960 Upgrade jssip
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 14854e03b7 Upgrade dayjs
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze afaa80b182 Upgrade cronstrue
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 52cb6ff142 Upgrade jse-eval with plugins
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
dependabot[bot] 67163b0423
Bump follow-redirects from 1.15.5 to 1.15.6 in /bundles/org.openhab.ui/web (#2477)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-18 20:02:06 +01:00
Arne Seime f784419eb5
Only load ignored inbox items in inbox view (#2400)
Depends on https://github.com/openhab/openhab-core/pull/4108.

In most places, the inbox content is loaded only to show a count of items in inbox.
For any decent size systems the inbox may contain hundreds of entries that are ignored,
which equates to lots of unnecessary data being transferred and processed in the browser.

---------

Signed-off-by: Arne Seime <arne.seime@gmail.com>
2024-03-18 19:57:09 +01:00
openhab-bot 970afa0b58
New Crowdin updates (#2479) 2024-03-18 19:46:23 +01:00
lolodomo 1613dfd236
[BasicUI] Create header row only when needed (#2344)
For buttongrid/mapview/video/webview elements, avoids generating HTML
code for header row when it is hidden.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-03-17 20:34:21 +01:00
Florian Hotze 021c3d8a43
Upgrade echarts and vue-echarts & Add fallback for visualMap when using heatmap (#2450)
This upgrades `echarts` and `vue-echarts` to the latest versions.
`@vue/composition-api` was added as dependency because `vue-echarts`
needs it on Vue 2.

See
https://echarts.apache.org/handbook/en/basics/release-note/v5-upgrade-guide/
and https://github.com/ecomfe/vue-echarts#migration-to-v6 for upgrade
guides.

This also adds a fallback default for `visualMap` because it is required
to define a `visualMap` when using a heatmap, otherwise echarts fails to
render the chart.
Even though the docs and the chart-designer mentioned this until now, it
worked without defining a visualmap, which would not be the case anymore
(and therefore break charts - defining a visual map is easy though)
without providing a fallback.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-14 20:56:29 +01:00
Florian Hotze 1ceb5c6063
Thing edit: Fix changing ID shows wrong value & Always show UID (#2475)
Fixes #2469.

After changing the ID of a Thing (only possible when creating a new
Thing), the displayed value was reset to the pre-filled default when
moving to a different field. When saving the Thing, the entered value
was used. This was because Vue did not properly notice the change of the
ID.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-13 13:02:30 +01:00
Florian Hotze f5d9cb468a
Item edit: Fix state description not saved for existing Item (#2474)
Fixes #2468.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-13 13:02:06 +01:00
Florian Hotze 7db99cb431
Item edit: Check for type change & Fix dimension/unit change checks (#2473)
- When editing an Item, also check for Item type change and display a
warning when changing the Item type.
- The dimension/unit change checks were not comparing against the saved
Item, but instead against the last changes. Fix this.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-13 12:24:26 +01:00
Florian Hotze a1eca7d695
Thing inbox: Fix "show ignored" checkbox not checkable on small screens (#2472)
Fixes #2457.

The list index collided with the "show ignored" checkbox and caused it
to not be checkable on smaller screens (mobile phones).
As I have found no real fix for this issue (setting z-indizes does not
work due to the structure of the page), I created this workaround to
switch the checkbox and the label on smaller screens.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-13 10:41:56 +01:00
Florian Hotze 5ec8fc8656
Rule edit: Code clean-ups (#2471)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-13 01:35:08 +01:00
Florian Hotze c41aa384dd
Fix dirty warning shown on delete (#2470)
Fixes #2462.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-12 23:21:03 +01:00
stefan-hoehn 9f006fdff3
[blockly] Add undefined block (#2465)
Adds the undefined block as discussed at https://community.openhab.org/t/blockly-proposal-to-change-contextual-info-blocks/154403.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-03-08 18:55:24 +01:00
jimtng 67e8ed4d5d
Item details: Fix editing groups with uneditable members & Sort members (#2452)
Fixes #2427.
Also sort the list of group members alphabetically based on label or name.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-07 00:23:24 +01:00
openhab-bot 00079e3c0a
New Crowdin updates (#2439) 2024-03-07 00:18:03 +01:00
jimtng a2559de97f
Item edit: Align group's aggregation function (#2454)
This was left behind in the recent class name change.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-07 00:17:34 +01:00
jimtng 0f804357c5
Channel edit: Fix regression causing editable channels to be locked (#2455)
Regression from #2403.

Channel doesn't have its own `editable` property.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-07 00:15:06 +01:00
jimtng e6d86ae14f
Item list & details: Hide group type if not set (#2453)
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-07 00:10:25 +01:00
jimtng 4af22ff777
Items List: Remove Add item from textual (#2448)
Make the + Icon in the items list go straight into adding a new item.
This makes the most common operation quicker.

Adding from textual definition can still be done through Developer Tool,
as it's not a common task.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-04 20:46:38 +01:00
Florian Hotze e288d0b07a
Improve Item name validation (#2451)
Check that an Item name does not start with a number.

Closes #2444.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-04 20:44:37 +01:00
Florian Hotze ccaa221460
Settings menu: Fix back-link (#2449)
Regression from #2432.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-04 19:45:19 +01:00
Florian Hotze 74620c3bce
Widget expressions: Improve `@` shorthand code (#2446)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-04 11:48:22 +01:00
Florian Hotze da80fbdcd4
Fix custom page icon size for openHAB icons (#2445)
Regression from #2340.

Reported on the community:
https://community.openhab.org/t/openhab-4-2-milestone-discussion/154316/2?u=florian-h05.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-04 11:48:08 +01:00
jimtng 0f343f3ca1
Script Editor: Fix script loading (#2442)
Regression from #2374

The problem is when I clicked on a file-based script in the UI, the
content of the script didn't load.

Before:
<img width="601" alt="image"
src="https://github.com/openhab/openhab-webui/assets/2554958/b3351f27-8ae6-4463-91ee-583fce0cf873">


After:
<img width="670" alt="image"
src="https://github.com/openhab/openhab-webui/assets/2554958/596629cb-459d-43c0-992e-7221e2a505dd">

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-03 13:03:44 +01:00
lolodomo e7faba6c9f
[BasicUI] Move most of app settings to per-device (browser) settings (#2243)
Closes #1832
Closes #1930
Closes #2342

A new page is available to show and update all per-device settings. This
page is accessible through the sitemap list page or the home page of any
sitemap.
Basic UI theme now matches the dark mode of Main UI. It can be updated
either in Main UI or in the new page of Baisc UI.
Web Audio can also be enabled either in Main UI or Basic UI.

The iconify setting is now enabled by default. The script to handle
iconify icons is now loaded in sitemap pages only if the iconify setting
is enabled.

New settings are also available to control the size of the chart and the
size of content (text, line) in the chart.

A new setting is also available to enable a bigger font size.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-03-03 10:22:17 +01:00
jimtng 61aa3d8fb5
Show lock icon in the item details members list (#2410)
Depends on https://github.com/openhab/openhab-core/pull/4118.

@ghys could you comment on the purpose of `ignoreEditable` here? It's
preventing the lock icon from showing up.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-03 10:15:44 +01:00
jimtng 90223e9d4a
Widget expressions: Add `#` as a shorthand for item.numericState (#2441)
Refs https://github.com/openhab/openhab-core/pull/4123.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-02 14:39:06 +01:00
Florian Hotze 64a1e0a47e
Add-on logo: Fix jdbc logos not loading & list-item logo distorted (#2440)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-01 17:35:27 +01:00
Florian Hotze 80e762e78b
Developer dock: Fix styling issue when lazy loading component (#2438)
Regression from #2294.

When the developer dock was opened the first time, the navbar was not
center aligned due to a styling issue because of the lazy loading. This
works-around this by setting (sub)title after component creation.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-01 14:56:19 +01:00
Mark Herwege 2f17183bd1
Provide meaningful list of units in item-form (#2312)
Closes https://github.com/openhab/openhab-core/issues/4082.

This PR adds:

1. A curated list of units to show as a drop-down list when creating a Number item with dimension.
2. The possibility to use a different default unit on item creation than the system default unit.
3. The ability to change unit and state description for items.
4. The ability to use the `unitHint` provided by channel types for "Link channel to Item" -> "Create a new Item".

By default, the system default unit (for the configured measurement system) will be shown when editing or creating an item.

`units.js` contains a number of frequently used units by dimension and measurement system.
These will be available in a autosuggest dropdown list.
It is still possible to not select from the list and use any other string as a unit.

All units for the dimension in `units.js` will be in the dropdown list, but they will be sorted by measurement system. If the measurement system is set to US, imperial units will appear higher in the list.
Units that have not explicitely been listed as SI or US will always appear higher.

When typing a unit that is not in the curated list, a longer list will be used for autocompletion that considers allowed prefixes to base units and constructs all combinations.

`units.js` also contains a field to set a different default unit on item creation than the system default unit.

With https://github.com/openhab/openhab-core/pull/4079, the REST API of channel types will provide a unit hint if defined in the binding channel types.
If such information is available, this PR adds support for this to be the the suggested unit.
If that information is unavailable, the UI will fall back to behavious described above.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-03-01 12:48:05 +01:00
Florian Hotze 148c463a1c
Add-on store: Minor logo styling tweaks (#2435)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-29 23:37:38 +01:00
Florian Hotze 5159566e02
Fix service worker (#2433)
Regression from #2267.

This fixes the service-worker and switches from injecting the manifest
into a pre-provided service-worker to generating the service-worker
during webpack builder.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-29 12:30:29 +01:00
Florian Hotze ea28f32140
Remove Cordova from Main UI (#2432)
This removes Cordova from Main UI.

Cordova was used to build Main UI as an iOS or Android app (a webview
with pre-packed assets), but the Cordova component of Main UI is
currently unmaintained due to requiring lots of maintenance.
Both the iOS and the Android app have an integrated webview (without
pre-packed assets though), so Cordova is unlikely to be required in the
future.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-29 11:26:12 +01:00
Florian Hotze d6097a6346
Sidebar help: Use custom renderer instead of CSS for reduced list indentation (#2430)
Follow-up for #2423.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-29 11:03:31 +01:00
Jimmy Tanagra 1d22ce7e51 [blockly] Update multi-select plugin to v0.1.12 (#2419)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-28 23:20:28 +01:00
Jimmy Tanagra 50c43afc3b [blockly] Add multi-select plugin (#2419)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-28 23:20:28 +01:00
Jimmy Tanagra d99d3bfc86 [blockly] Enable drag mode and move with wheel (#2419)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-28 23:20:28 +01:00
Jimmy Tanagra 4ee3e54e20 [blockly] Remove cross-tab-copy-paste plugin (#2419)
It conflicts with the multi-select plugin and the same functionality is provided by the multi-select plugin

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-28 23:20:28 +01:00
stefan-hoehn 5997c28655
[blockly] Add HTTP request block (#2411)
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-02-28 23:04:26 +01:00
Florian Hotze 9096d6de70
Item picker: Disable picker & hide chevron if not yet ready (#2428)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-28 18:41:51 +01:00
Florian Hotze 76e631632f
oh-player-controls: Hide default tooltip (#2426)
Previously, when hovering over a `oh-player-control` component, a
tooltip, which shouldn't be there, was shown.
This was caused by the config title being set as the divs title.
It is now fixed by manually setting title to an empy string.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-28 18:01:55 +01:00
Florian Hotze 4b8c1796c0
Location card: Swap status & measurement badges to avoid layout shift (#2425)
The status badges are displayed based on the actual state of that status
category. This causes the measurement badges, which are always shown to
be either first or second line.

This swaps those, so that measurement badges don't move around anymore.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-28 17:46:13 +01:00
openhab-bot 2255bb79ca
New Crowdin updates (#2357) 2024-02-28 17:31:19 +01:00
jimtng ab96ced901
Help sidebar: Add blockly help page (#2424)
Resolves #2416.
Depends on https://github.com/openhab/openhab-docs/pull/2260.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-28 17:30:20 +01:00
jimtng 22fe3f00c3
Rule module popup: Add dirty checking (#2412)
This PR adds dirty checking in the rule module popup.

Rule module popup comes up when you're editing a rule's module, e.g.
trigger, action, condition. Previously when you opened the rule module
and made changes, then clicked back, you wouldn't get a warning and the
changes will simply be lost.

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-28 17:14:49 +01:00
dependabot[bot] 1111f806d2
Bump es5-ext from 0.10.53 to 0.10.63 in /bundles/org.openhab.ui.basic (#2418)
Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.53 to 0.10.63.

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-28 17:11:46 +01:00
jimtng cc62a8f45e
Settings menu: Fix search bar to include system and addons settings (#2409)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-28 13:57:37 +01:00
jimtng 5c1aa898f3
Add-on store: Title and searchbar focus tweaks (#2406)
- Display specific title for each tab, but avoid becoming too long on smaller screens.
- Don't autofocus on the search bar on mobile because it opens up the on-screen keyboard and covers up half the screen.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-28 13:51:53 +01:00
jimtng 4cef66d46e
Material theme: Fix lock icon is visible on editable items (#2403)
Fixes regressions from one of the previous PRs.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-28 13:38:55 +01:00
Florian Hotze 11c6a7b271
Help sidebar: Reduce list indentation (#2423)
Fixes https://github.com/openhab/openhab-docs/issues/2243.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-28 13:16:13 +01:00
Florian Hotze 6e17810a67
Fix UID copy for not editable channels and transformations (#2422)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-28 13:08:17 +01:00
Jeremy bc7b1e4485
Update alexa networking integration (#2421)
Related to https://github.com/openhab/openhab-alexa/pull/660.

Signed-off-by: jsetton <jeremy.setton@gmail.com>
2024-02-28 13:07:49 +01:00
jimtng 565844f8c8
Blockly Editor: combine renderer selection and show item label icons (#2415)
The current icons are too crowded for mobile devices. This PR combines
the renderer choice and the show labels into one icon.

Before
<img width="409" alt="image"
src="https://github.com/openhab/openhab-webui/assets/2554958/8c294ca4-8fce-4379-9635-fd4e053fc77c">

After
<img width="434" alt="image"
src="https://github.com/openhab/openhab-webui/assets/2554958/d04b59ef-50bf-4783-aab1-99493a8c9cf3">

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-26 17:21:15 +01:00
jimtng e2738b5d6b
Overview tab: Fix javascript error (#2414)
Fixes this error:
```
app.30bb9074a7a632ce30a5.js:2 TypeError: Cannot read properties of undefined (reading 'length')
    at i.overviewPage (app.30bb9074a7a632ce30a5.js:2:1827039)
    …
```

Also refactor the code for better readability.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-26 15:59:12 +01:00
jimtng 3b694d2680
[blockly] Add renderer switching (#2315)
This adds a little button on the bottom of blockly workspace to allow
switching the renderer on the fly.
The choice is saved in `localStorage`.

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-25 10:19:42 +01:00
jimtng 8b2e548c88
[blockly] Upgrade Blockly from v9.2.0 to v10.4.2 (#2310)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-24 17:34:23 +01:00
Florian Hotze 97ae723a42
Item edit: Fix dirty warning for not-editable Items (#2408)
Follow-up for one of the previous PRs.

Fix Item dirty warning for:
- Item not editable, but warning still displayed
- editable group Item

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-24 17:29:45 +01:00
Florian Hotze e32d5a7509
Add-on store: Fix toolbar style & material design logo (#2407)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-24 16:18:26 +01:00
Florian Hotze 69f487611f
Add support for SVG add-on logos (#2402)
Currently, Main UI attempts to load all add-on logos as PNG (the add-on
logo url is generated using the add-on name and expecting a PNG).

This PR adds support for SVG add-on logos, which means: 
The UI will now attempt to load a SVG logo, 
if that fails, it will attempt to load a PNG, 
and if that fails, fall back to the add-on‘s default logo (which is
dependent on the add-on type).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-24 15:04:05 +01:00
jimtng 6272434ee7
Only align smart-select on wider screens (#2405)
On smaller screens, it's better to stick with standard styling

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-24 13:53:20 +01:00
Yannick Schaus 9cacb7c510
Add-on store: rename Blockly libraries to Block libraries (#2404)
Signed-off-by: Yannick Schaus <github@schaus.net>
2024-02-24 09:46:32 +01:00
Florian Hotze def6effa21
Script & Item edit: Add/Fix dirty handling (#2374)
- Add dirty handling for script-edit.
- Fix dirty handling of item-edit always saying dirty due to wrong
initialization order.
- Code improvements to other dirty handlings.
- Styling improvement to script-general-settings.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-23 17:48:55 +01:00
dependabot[bot] 57ed2da295
Bump ip from 2.0.0 to 2.0.1 in /bundles/org.openhab.ui.basic (#2383)
Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-23 12:12:37 +01:00
Florian Hotze a1f509133a
Change the default navbar style from orange to light for light theme (#2288)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-23 12:11:22 +01:00
Florian Hotze 843ee90c25
Persistence edit: Fix dirty for new persistence & Improve const handling (#2399)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-23 11:51:27 +01:00
jimtng 6927c7f9a8
Fix link to persistence doc (#2398)
Regression from #2339.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-23 11:19:56 +01:00
jimtng e2292461f9
Update links to addons store (#2396)
To match changes in #2383.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-23 10:21:00 +01:00
jimtng 6b7e1c479a
Add-on Store: Add sub menu items & various improvements (#2381)
Resolves #2047.

- Installed addons are grouped by category in the main Add-on Store section.
- Search in the main "Add-on Store" menu will search all types of addons.
- Search in the corresponding section will only search for add-ons for that category.

The subsections are implemented as routable tabs, so switching around the different sections is fast.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-23 01:14:42 +01:00
jimtng bfa2d4a44e
Add-on list: Top align the install buttons (#2385)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-22 22:01:33 +01:00
jimtng 3893abde19
Model Treeview: Remember the expanded state (#2387)
Applies to both the model page and the model picker popup.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-22 21:55:45 +01:00
Mark Herwege 9704404968
Sitemap editor: Add slider releaseOnly parameter support (#2390)
Closes #2345.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-02-22 21:52:25 +01:00
jimtng 94ccd311c3
Fix semantics picker alignment class (#2389)
Missed these in #2362.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-22 21:44:46 +01:00
Mark Herwege 3a93123fc5
Persistence edit: Change empty-state-placeholder icon (#2391)
Change the icon shown when no persistence is configured to be the same as the icon on the settings page.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-02-22 21:38:17 +01:00
jimtng ff034d5ed2
Update links to the add-ons store (#2380)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-20 18:49:07 +01:00
jimtng b30b7e2e18
Developer sidebar icon: Check for admin role (#2378)
Fix https://github.com/openhab/openhab-webui/pull/2369#issuecomment-1951462800.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-19 17:51:03 +01:00
jimtng c703f4b23e
Rule edit: Generate suggested trigger title only when none is available (#2377)
This lets the helper library provide a more accurate label for custom triggers.

Related: https://github.com/openhab/openhab-jruby/pull/254.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-18 19:28:33 +01:00
Florian Hotze 260389bd4d
Item edit: Fix code tab not working properly (#2375)
This was due to bad ready handling, where the code editor was
initialized with not editable because the Item was not loaded yet.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-18 17:23:47 +01:00
jimtng a5869f3996
Label and style all UID elements consistently (#2336)
Resolve #2335.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-18 15:59:35 +01:00
jimtng 3f024771dd
Rule & Script editor: Various improvements (#2362)
- Remove/hide non-functional title/description input fields in the initial Add Trigger/Action/Condition for the rule editor. 
- When editing a rule module, set the popup title to reflect the type of module, i.e. "Edit Trigger", or "Edit Condition"
- Changed the link on the top right corner from `Done` to `Save`
- Removed the pencil icon for consistency.
   Previously, Cron and Scripts have a pencil icon which goes to the Edit module popup vs clicking directly on the line goes directly to Cron Builder, or Script Editor.
   Now with the pencil icon gone, cron will go into the Edit module popup, which can lead to the cron builder from there, and Scripts go directly to script editor.
   Changing the script title/description is possible from
within the script editor's bottom area as shown below.

Script Editor:
- Change the title of Script Editor, from "Edit Script" to better clarify what type of script is being edited.
- Add the ability to change the script's title and description after they're created.

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-18 13:24:00 +01:00
jimtng af6174b9dc
Add a global component developer-dock-icon (#2369)
Also add the icon to widget-list and script-edit pages.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-18 11:56:31 +01:00
Florian Hotze 26673dc9f6
Help sidebar: Fix wrong section in developer tools (#2373)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-17 21:17:45 +01:00
jimtng 6b8293548d
Developer sidebar: Add clipboard icons (#2372)
Add clipboard icons to the search results and the pinned entities to copy their IDs.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-17 21:02:03 +01:00
jimtng f95709c3c8
Fix rule module editor popup for blockly (#2367)
Currently for Blockly Script Action or Condition, clicking on "Edit module" the pencil icon would open up rule-module-popup,
which allows user to edit the raw javascript directly without regard to the blockly's block code.

This PR changed it by replacing the configuration sheet with a button that leads to the blockly editor.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-17 20:26:15 +01:00
Florian Hotze add0b91a6b
Persistence edit: Make page title dynamic & Fix delete back navigation (#2371)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-17 20:11:19 +01:00
Florian Hotze 644a1fc7b6
Add-on config page: Fix dirty handling (#2370)
Fix regressions & leftovers from #2314.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-17 18:44:34 +01:00
Florian Hotze 2c0182940b
Help sidebar docs: Fix external anchors & Script editor RegEx (#2368)
- Fixes an issue reported in
https://github.com/openhab/openhab-webui/pull/2322#issuecomment-1948875309
where external anchor hrefs did not work.
- Fixes an issue where the script editor docs were shown on the
`/settings/scripts/` page.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-17 12:16:37 +01:00
Jeremy 344779acfa
Fix alexa thermostat attribute parameters (#2364)
Breakage introduced by #2194

Signed-off-by: jsetton <jeremy.setton@gmail.com>
2024-02-16 22:10:26 +01:00
jimtng 02317ea716
Add back the 'When' prefix for file-based script trigger titles (#2360)
Fix regression from #2352.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-16 11:27:20 +01:00
Florian Hotze 18db55db26
Model page & Model Item picker: Don't remember "Show non-semantic" checkbox (#2358)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-16 10:39:06 +01:00
Florian Hotze 72f5637d01
Model page: Remember checkbox settings (#2355)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-15 20:43:35 +01:00
Florian Hotze e3fae0b051
Thing create: Fix bridge can't be selected (#2354)
Regression from #2329.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-15 19:21:10 +01:00
jimtng 95c33a34b6
item-form.vue: Various (layout) improvements & Refactor tag-input.vue (#2326)
- Make type, dimension, unit, semantic class and semantic property all lined up with name, label, category.
- Slightly shift category icon to the right to line it up with the rest.
- Move the group section directly underneath the Item type.
- Make the item form fields update their states after switching back from the Code editor.
- Show the parent groups similar to how tags are displayed.
- Minor bug fixes.

- Refactor tag-input.vue:
  - Make tags always extended.
  - Show zero when there are no tags.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-15 19:15:18 +01:00
Florian Hotze 80a172eab3
Home edit: Fix model card settings drop-down not accessible (#2304)
Fixes issue mentioned in
https://github.com/openhab/openhab-webui/pull/2144#issuecomment-1784114001.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-15 15:57:07 +01:00
jimtng 735bf987ff
Accept double click to pick an Item in model picker popup (#2348)
Allow double clicking to select an item here, without having to click "Pick" at the top right corner.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-15 14:26:52 +01:00
jimtng e2d2ca6a20
Remove padding in list grouping toolbar (#2347)
Minor cosmetic change.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-14 19:38:34 +01:00
jimtng b30030fdda
Remember checkbox settings in model picker popup (#2349)
Remember these checkboxes so they don't need to be re-checked every time.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-14 19:36:40 +01:00
jimtng 85f21bbec6
Rule edit: Fix undefined currentSection error in trigger-module-wizard (#2350)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-14 19:19:56 +01:00
jimtng 762b4b2a87
Rule edit: Remove redundant module title prefix (#2352)
See https://github.com/openhab/openhab-core/pull/4090.

- When/If removed
- Added prefix "item", "thing", similar to "channel"
- play sound "xxx.mp3"
- thing changed -> thing status changed

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-14 19:09:53 +01:00
jimtng b88fa5dc43
[blockly] Fix console warnings when switching to Math (#2309)
Fix this to avoid a whole bunch of these warnings were logged when
switching to math category

```
blocks-math.js:302  CodeGenerator init was not called before blockToCode was called.
blocks-math.js:303  CodeGenerator init was not called before blockToCode was called.
```

This is a quick and dirty solution without doing a bigger refactoring

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-13 22:12:45 +01:00
jimtng b10244dd1a
[blockly] Fix incorrect field names (#2307)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-13 22:10:41 +01:00
jimtng 979bfb1832
[blockly] Fix persistence block ZDT disconnection (#2306)
Fix so oh_get_persistvalue block does not unnecessarily disconnect the
ZDT input every time a different methodname is selected.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-13 22:06:39 +01:00
jimtng 76aebaf08e
Fix item-add save (#2346)
Regression from #2339 causing a new item unable to be created / saved.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-13 10:23:49 +01:00
lolodomo 24a7bf05b8
[BasicUI] Show buttons on several lines when not enough place (#2341)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-02-11 18:34:34 +01:00
JustinGeorgi 946b499f6d
Allow custom page icons (#2340)
This adds the ability to set custom icons for pages. The custom icons
can be any icons available to the the oh-icon component. They are
visible in the side bar and in the page settings list.

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2024-02-11 11:59:37 +01:00
JustinGeorgi 7c78241eb6
Fix sidebar search scene and script integration (#2338)
Fixes a few minor error with scripts and scene in the developer toolbar
search function:
1) Scenes and scripts could be pinned but not unpinned
2) Scenes and scripts were not enumerated with the other types for
determining existence of search results

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2024-02-11 11:53:39 +01:00
Florian Hotze ee5adb92fa
Sidebar help: Add script editor docs (#2331)
Depends on https://github.com/openhab/openhab-docs/pull/2231.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-10 17:30:57 +01:00
Florian Hotze 75bac51626
Fixes & Improvements to persistence edit, channel details & doc links logic (#2339)
- Improve doc link logic and use Vuex store for the openHAB website url.
- Channel info: Fix clear buttons displayed even if not editable.
- Persistence edit: Fix styling issues.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-10 17:30:38 +01:00
Florian Hotze 6ed621e92f
Settings page: Improve loading behaviour (#2332)
Fixes #2323.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-10 00:21:18 +01:00
jimtng 98271e57ca
Item edit: Fix semantic class cleared when property set to None (#2325)
On the Item Editor:

Current behaviour, when we have:
Semantic Class: Control
Property: Light

When changing Property to None, it would clear Semantic Class "Control"
too.

The Fix is not to clear the Semantic Class.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-09 23:17:44 +01:00
jimtng 6f167a51fe
Model picker popup: Add "Show name" and "Show tags" options (#2320)
This makes it easier to find items e.g. when building rules

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-09 23:10:49 +01:00
Florian Hotze 0cbda05ee7
Item & Rule pages: Minor fixes & Improvements (#2330)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-09 22:42:36 +01:00
Florian Hotze 866d9e559e
Thing page: Fix dirty checks & Fix not-editable handling (#2329)
Fixes dirty checks: When the code tab was opened, the page always wanted
to be saved before leave, even though nothing was modified.

Fixes not-editable handling: Channels were configurable even though the
Thing was not editable and the save keyboard shortcut attemted a save.
In both cases, the according API requests failed, because the Thing was
not editable.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-09 22:04:00 +01:00
Florian Hotze 22a4b99482
Item details: Fix group member selection allows to select unmanaged Items (#2328)
This lead to an error being thrown because openHAB core does not allow
to modify group membership of unmanaged Items and returns a 405.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-09 19:33:31 +01:00
Florian Hotze fff3d0ec72
Config sheet: Show advanced params if not default or not empty (#2313)
Advanced parameters should be shown to the user if they have:

- a default value defined and the value is not the default value
- no default value defined and they have a value set

This is more transparent to the user and improves the UX, because the
user does not need to enable "show advanced" just to check whether he
has set up or modified advanced parameters.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-09 19:21:17 +01:00
jimtng 5e5261beb1
[blockly] Set output type of oh_check_undefined_value to boolean (#2311)
On the default renderer, it isn't obvious that this is wrong, but on
Zelos where generic output (rounded) vs Boolean output (angled) have
different looks, it's glaringly obvious.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-08 09:55:42 +01:00
jimtng 026582bb72
Disable Item editor fields for unmanaged items (#2319)
Currently the UI would allow editing an uneditable item, despite giving
errors when trying to save it. This PR marks the relevant fields as
read-only or disabled, preventing them from being edited in the first
place.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-08 00:02:01 +01:00
jimtng e18a057ffd
[blockly] Add tooltips to the show block/code buttons (#2317)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-07 18:20:57 +01:00
jimtng de4ed8b21c
[blockly] Fix typos in transformation block tooltip (#2308)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-07 18:20:32 +01:00
jimtng aa79ab2265
[blockly] Fix warning when show code button is clicked twice (#2316)
Avoid an error popup when clicking the show code button when already
in code preview mode.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-07 18:11:15 +01:00
jimtng b49ab25d19
Add commenting/uncommenting with Ctrl-/ and Cmd-/ (#2322)
Resolve #1336.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-07 18:04:00 +01:00
jimtng 05395107c8
Fix code editor's Ruby detection (#2321)
This fixes the syntax highlighting for Ruby because it's now recognised
correctly.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-07 17:58:42 +01:00
jimtng 362d9f3d3d
Rule/script: Fix fields not editable in create mode or for Blockly (#2318)
Regression from #2276 which caused a new rule unable to be created
because the rule name/description couldn't be entered (fields are
disabled)

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-07 12:42:33 +01:00
Florian Hotze 1d5d217abb
Addon config page: Use dirty mixin & Add Ctrl-S shortcut (#2314)
Check for unsaved changes before leave and add the Ctrl-S shortcut for
save.

This makes it consistent with the service config page.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-06 21:05:38 +01:00
Florian Hotze 93dce567dc
Fix UoM metadata not stored when Item created from link (#2302)
Fixes #2299.

Also enhances the Item name validation when creating a new Item from the
Items list.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-05 21:15:09 +01:00
openhab-bot 262dc22e8f
New Crowdin updates (#2286) 2024-02-05 18:20:02 +01:00
openhab-bot f5d2b13c12
New Crowdin updates (#2287) 2024-02-05 17:39:42 +01:00
Florian Hotze f4c02a73a3
`oh-block`: Allow setting style properties (#2305)
Also evaluate widget expressions in the block title.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-05 13:44:20 +01:00
Florian Hotze eacf1d7595
Hide runtime errors and warnings from webpack dev server client overlay (#2303)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-04 16:27:33 +01:00
Florian Hotze 1e1ef59ea5
Widget expressions: (Partly) Fix handling of Item name being `undefined` (#2301)
When using the `@` and `@@` shortcuts for Item displayState and state in
widget expressions, properly handle cases where the Item name is
`undefined`.
Unfortunately I did not find a way to improve that for `items[itemName]`
expressions.

Requesting the Item state from the server when the Item name is
undefined leads to warnings in the log (which might cause some confusion
for the users):
```
[WARN ] [se.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: undefined
```

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-02 22:43:12 +01:00
Florian Hotze 287009e119
Fix regressions caused by wrong YAML library usage (#2300)
Regression from #2267.

In #2267 the YAML library was upgraded to a new version, but the usage
of the library was not adjusted to breaking changes.
This PR fixes all issues discouvered in the browser console.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-02 22:26:10 +01:00
GiviMAD 1c03c60f84
Upgrade from webpack v4 to v5 (#2267)
Upgrade webpack and related build dependencies from v4 to v5.
Also upgrade the NodeJS and npm versions used by the Main UI build as well as babel.

The changes follow the recommendations of the webpack migration guide at https://webpack.js.org/migrate/5/ or are required changes for updated webpack plugins.
New default values causing problems have been overwritten, e.g. devServer.compress: false because compression broke the SSE event streams.
The ModuleConcatenationPlugin is not created manually in production mode anymore, as this setting broke the production build, and it is not neccassary to create that, as this plugin is automatically enabled in production mode.
See https://webpack.js.org/plugins/module-concatenation-plugin/.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2024-01-31 00:32:56 +01:00
Jeremy 424e646297
Update alexa range value attribute parameters (#2296)
Related to https://github.com/openhab/openhab-alexa/pull/650.
Related to https://github.com/openhab/openhab-alexa/pull/651.

Signed-off-by: jsetton <jeremy.setton@gmail.com>
2024-01-30 09:39:33 +01:00
Florian Hotze 6ea38c34cc
Lazy load the developer dock (#2294)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-01-30 00:11:00 +01:00
Florian Hotze 660b8f1578
Fix `oh-stepper` sends command on Item state update due to rounding (#2096)
Fixes #1186: Widget sends command on external update due to rounding.

This is done by replacing the generic change listener with listeners for
plusclick, minusclick and input for input element events.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-01-29 20:37:19 +01:00
Florian Hotze 89766f32bb
Transformation edit: Fix copy UID doesn't work (#2295)
Fixes #2292.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-01-28 23:14:10 +01:00
Florian Hotze a13d34a956
Rule/Script edit: Fix not editable not properly handled & Always show tags (#2276)
Fixes an issue where the configuration of a script action of a
file-based rule (e.g. those created using JSRule or Rule Builder of
openhab-js) was shown as editable, even though the rule is not editable
because it is provisioned from file.

Always show the tag input, even if there are no rule tags. This is more
consistent and avoids confusion, as you can now clearly see that a rule
has no tags.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-01-28 13:42:38 +01:00
lolodomo 1966ba3a53
[BasicUI] Replace non printable characters (#2284)
Fix #2250

Non printable characters are replaced by the unicode replacement
character.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-01-27 20:58:23 +01:00
Florian Hotze 4864f43326
Home page: Hide tab bar if all model tabs are hidden (#2291)
If all model tabs are hidden, the tab bar has only one entry and
therefore there is no need to display it.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-01-27 17:35:39 +01:00
Florian Hotze 8b6b262304
Help sidebar: Move docs to docs repo & Integrate them into the UI (#2253)
Follow-up for #2088.
Depends on https://github.com/openhab/openhab-docs/pull/2199.

Also add the help sidebar button to the settings and list pages where it
is missing.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-01-27 12:01:12 +01:00
Florian Hotze f30941e49c
Help Feature FAQ: Remove persistence FAQs (#2290) 2024-01-27 11:49:53 +01:00
Florian Hotze f493e970fe
Settings page: Fix add-on settings header displayed when no add-ons installed (#2289)
Fixes #2266.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-01-27 01:20:50 +01:00
openhab-bot 63613c1881
New Crowdin updates (#2237) 2024-01-26 16:43:19 +01:00
lolodomo 32a7393c65
[BasicUI] Close EventSource when leaving (#2282)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-01-21 21:35:50 +01:00
lolodomo 3a31e85fba
[BasicUI] Fix SSE reconnection to the current page (#2280)
After an error in the SSE connection, the event source is now
reconnected to the right sitemap page.

Fix one of both problems explained in #1757

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-01-20 22:28:38 +01:00
Yannick Schaus c89614d0af
Update descriptions in the settings menu (#2273)
Signed-off-by: Yannick Schaus <github@schaus.net>
2024-01-18 01:25:04 +01:00
Florian Hotze 64c1e3576a
Thing edit: Hide clear button for location if not editable or not ready (#2277)
Fixes #2272.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-01-17 22:30:05 +01:00
Wouter Born ef523642a9
Cleanup Java code (#2263)
This cleanup includes:

* Fix deprecations
* Fix JavaDocs
* Remove redundant toString calls
* Remove redundant semicolons
* Simplify boolean expressions
* Use diamond operator
* Use enhanced for loops
* Use instanceof pattern matching
* Use isEmpty instead of 0 comparisons
* Use lambdas
* Use static inner classes
* Use StandardCharsets

Also adds the SA_LOCAL_SELF_COMPARISON suppression similar as used in
other repositories for https://github.com/spotbugs/spotbugs/issues/1992.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-17 19:10:16 +01:00
Florian Hotze f912de509c
oh-colorpicker: Replace defaultColor option with an actual default color (#2270)
Remove the defaultColor option.
Instead use RGB(0,0,0) black as default color if the Item state holds no
valid color, so that the color picker is accessible.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-01-14 14:50:56 +01:00
dependabot[bot] 4d4aea4a69
Bump follow-redirects from 1.14.8 to 1.15.4 in /bundles/org.openhab.ui/web (#2264)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.8 to 1.15.4.

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-14 12:56:18 +01:00
jimtng a7cf1a0a1d
[BasicUI] Fix Buttongrid alignment on desktop (#2260)
Fixes #2259

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-01-13 16:58:51 +01:00
lolodomo 5a09f71eae
[BaiscUI] Adjust the SVG icon in buttons to the current theme (#2257)
Only concerns SVG icons delivered by the openHAB icon servlet and having
"currentColor" as fill color.

Convertion to inline SVG is applied only if the "inline SVG" setting is
enabled.

Fix #2249

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-01-07 11:33:57 +01:00
Wouter Born 225e61c97c
Improve network-interface context support (#2246)
This allows for selecting multiple network interface names in
configuration parameters.

Related to:

* https://github.com/openhab/openhab-core/pull/3981
* https://github.com/openhab/openhab-addons/pull/16145

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-06 11:36:57 +01:00
Wouter Born afdfa01b07
Update license headers to 2024 (#2254)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 21:17:55 +01:00
lolodomo b6aeaa5760
[BasicUI] Enhance the description of the "Inline SVG" setting (#2247)
In order to explain the default value.

Related to #2240

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-01-02 19:56:06 +01:00
Mark Herwege 898b519c77
[BasicUI] icon.png minimal fix (#2232)
See comment
https://github.com/openhab/openhab-webui/pull/2231#issuecomment-1867570889

This is the minimal fix to the issue.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-01-02 19:26:18 +01:00
lolodomo b175d1b6bd
[BasicUI] Fix image element being link to a sub page (#2238)
Fix #2233

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-01-01 16:05:14 +01:00
Florian Hotze bf2f257afe
Settings pages: Fix x-overflow and large spaces on phone screens & Change icon for persistence config (#2248)
Follow-up for #2229.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-30 15:47:23 +01:00
Mark Herwege 2fe6ae9b3b
Add a new settings menu for persistence (#2229)
Persistence policies can be configured from the UI. However, it is
difficult to find, and one needs to know where to look. Apart from a
documentation issue, I think persistence is core enough to merrit its
own entry in the settings, so it becomes more prominent.

See for example here:
https://community.openhab.org/t/after-reboot-string-values-are-empty/152064/16

This adds a persistence entry below transformations to the settings menu.

The new persistence config page allows to set the default persistence,
and links to defining the policies for each installed persistence add-on.
There also is a "add" list entry to install more persistence add-ons.
If none is installed, it will explain persistence and link to the docs and the add-on store.

The default persistence settings has been removed from the system
settings, and the link to the persistence policy config from the add-on
settings page has been converted to a button.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-30 00:48:18 +01:00
Florian Hotze 0f35e0ef55
Fix Quickstart-Button shown for non-admin users (#2245)
Follow-up for #2209.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-30 00:32:14 +01:00
dependabot[bot] 3e5018b973
Bump minimatch from 3.0.4 to 3.0.8 in /bundles/org.openhab.ui.basic (#1779)
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to
3.0.8.

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-29 23:19:21 +01:00
dependabot[bot] 25afea1c1f
Bump semver from 5.7.1 to 5.7.2 in /bundles/org.openhab.ui.basic (#1959)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-29 22:54:33 +01:00
dependabot[bot] 480f7ad239
Bump word-wrap from 1.2.3 to 1.2.5 in /bundles/org.openhab.ui.basic (#2236)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3
to 1.2.5.

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-27 19:28:17 +01:00
lolodomo 09df379308
[BasicUI] Fix closing h4 tag in sitemap list page (#2234)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-12-26 17:38:09 +01:00
Kai Kreuzer 4eda3ac170 Apply spotless after release
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-12-22 23:33:18 +01:00
openhab-bot f4cf9535f3 [unleash-maven-plugin] Preparation for next development cycle. 2023-12-22 18:16:31 +00:00
Mark Herwege cdfe37a72b
[BasicUI] Fix icon none (#2231)
As described in
https://community.openhab.org/t/openhab-4-1-milestone-discussion/149502/222,
none.png is not found for BasicUI.

This PR replaces it with non.svg, see discussion on forum.

@lolodomo @florian-h05 I was behind my screen when I saw the issue. I
didn't test, but did the replacement based on info provided on the
forum.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-22 11:34:06 +01:00
openhab-bot a908b02820
New Crowdin updates (#2230) 2023-12-20 18:19:39 +01:00
openhab-bot 4593101773
New Crowdin updates (#2225) 2023-12-19 19:39:59 +01:00
Mark Herwege f94187652e
No suggestion for installed add-ons (#2226)
Suggestions are being shown in the add-on store for add-ons that are already installed.
This PR removes suggestions for installed add-ons.

See request here https://github.com/openhab/openhab-core/issues/3868#issuecomment-1859950504.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-19 18:49:11 +01:00
GiviMAD d52296a0e1
Add panel for voiceSystem metadata (#2222)
Refs https://github.com/openhab/openhab-core/pull/3925,
https://github.com/openhab/openhab-core/pull/3897 and
https://github.com/openhab/openhab-core/pull/3853.

---------

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-12-17 12:20:17 +01:00
openhab-bot 20a313f266
New Crowdin updates (#2201) 2023-12-17 10:58:39 +01:00
Florian Hotze ab080dc8d2
Model page: Add expand/collapse model button (#2224)
Brings #2191 to the model page:
Provides a button to expand or collapse the model tree.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-16 16:09:08 +01:00
Florian Hotze c8a58fb744
Update component docs (#2223)
Follow-up for #2190 and #2215.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-15 22:06:01 +01:00
Yannick Schaus a5cce9a4c9
Fix unwanted model card back navigation (#2221)
Fixes #2196.
Replaces #2211.

The double back navigation was caused by:

31f4c7065e/src/core/utils/history.js (L56-L61)

and `router.updateCurrentUrl()`, unlike the name implies, doesn't update
`router.url` for some reason (maybe a bug?).

-----

Signed-off-by: Yannick Schaus <github@schaus.net>
2023-12-15 21:54:32 +01:00
Florian Hotze 813fb72480
Update openhab-js tern defs (#2220)
This updates the tern defs used for autocompletion to the current
library version included in the addon (4.7.0).

Reference https://github.com/openhab/openhab-js/compare/v4.0.0...v4.7.0.

Last update of those was in #1710.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-14 21:35:31 +01:00
Mark Herwege da639e2f7d
Limit add-on settings menu list to bundles (#2217)
When installing rule templates or UI components or blockly libraries
from the marketplace, they get an entry in the add-on settings menu.
There is nothing that can be configured in these types of add-ons.
Therefore limit the list to bundles and features.

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-14 08:58:13 +01:00
Florian Hotze f4773a7c86
Sitemap editor: Move collapse chevron for toolbar to the left (#2218)
Follow-up for #2193.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-13 23:55:15 +01:00
Mark Herwege 123a8d3fd7
Sitemap Editor: Buttongrid support (#2193)
This PR adds the Buttongrid element to the sitemap editor.
There is also some cleanup for configuration on small screens.
See https://github.com/openhab/openhab-core/pull/3810 and
https://github.com/openhab/openhab-android/issues/3494

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-13 20:28:41 +01:00
Florian Hotze 03fdd31616
oh-input: Update component docs & Minor fixes (#2215)
- Update component docs (follow-up for #2214).
- Avoid sending "Invalid date" to server and do not accept "Invalid
date" as a valid state.
- Fix some errors thrown while configuring component or providing
invalid input.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-13 00:25:45 +01:00
Mark Herwege d4e4fb678e
Add more suggestions in add-on store (#2213)
Some persistence services can be detected by suggestion finders. They
are not made visible in the add-on store so far. This PR fixes this.

See
https://github.com/openhab/openhab-core/issues/3868#issuecomment-1848899824

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-13 00:01:08 +01:00
Mark Herwege be188e344c
Support time in oh-input widget (#2214)
Time only was not supported so far in the oh-input widget.

This was requested in the community forum:
https://community.openhab.org/t/using-a-user-input/151884/9

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-12 23:49:38 +01:00
lolodomo 4e73cbf968
[BasicUI] Implement Buttongrid widget (#2195)
Support grids containing from 1 to 12 columns.
Only the first 8 columns are rendered on tablet.
Only the first 4 columns are rendered on phone.

Related to openhab/openhab-core#3441

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-12-12 22:19:01 +01:00
JustinGeorgi 8c12108337
Fix auto-opening developer dock (#2209)
Closes #2206 

This will replace the auto-opening developer dock with a button on the
empty overview page to open the in-app quick start tutorial. Button will
only appear on pages wide enough to support the developer dock.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2023-12-11 09:27:54 +01:00
stefan-hoehn 8cc9e4b573
[blockly] Add block to get hue, saturation and brightness from Color Item (#2210)
Small extension to retrieve Hue, Saturation or Brightness from a color
Item.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-12-10 22:50:34 +01:00
Florian Hotze 7ca7e843e1
Help sidebar & Overview page: Respect release type for doc links & Add persistence FAQs (#2212)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-10 22:43:24 +01:00
Florian Hotze 4fd7c8c611
Developer sidebar: Add search for persistence configs & Style enhancements (#2208)
This adds support to the developer sidebar search to search persistence
configs by:
- serviceId
- label
- Items included in them

It also fixes a styling issue, where tools where to close to the search
bar and search results were far away from the search bar.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-09 16:40:38 +01:00
Florian Hotze 0c199ec102
Rule edit: Only save rule if it has changed when opening script editor (#2203)
Fixes #2027.

When a script inside a rule was opened, the UI always saved the rule
before navigating to the script editor. With this fix, the rule is only
saved if there is a change to save. If the rule hasn't been changed, no
save request is performed.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-07 22:38:45 +01:00
Florian Hotze 93a3e184a3
Items list: Fix searchbar broken after Items list update & Fix search query not stored (#2184)
Fixes #1334.
Fixes #1702.

After editing or removing an Item, the searchbar of the Items list was
sometimes not working anymore. Console then showed this error:
```
TypeError: undefined is not an object (evaluating
'n.virtualList.params')
```
  
It seems that this was caused because the replaceAllItems operation was
applied on the virtual list without re-rendering the searchbar
afterward.

The search query was forgotten when the Items list reloaded or the 
Items list page was re-entered from an Item detail page.
This is also fixed by using `$f7.data` to store the query.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-07 22:28:27 +01:00
Florian Hotze 10da2fea05
Rule/scene/script list: Hide scene/script tag from filter (#2202)
Follow-up for #2122.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-07 22:23:17 +01:00
Florian Hotze ba7f12615b
Rule/script/scene edit: Update tag input & Refactoring (#2083)
- Refactor rule & scene settings into rule-general-settings Vue
component and use this component on rule-edit, scene-edit pages and
inside script-general-settings component.
- Replace semantic tag picker & custom tag input with accordion tag
input (inspired by #2078) and show number of tags.
- Refactor shared code from rules & scenes into mixin
(`rule-edit-mixin.js`).
- Fix Scene tag is not hidden from tag input.
- Show number of tags on page settings page, follow up for #2078.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-07 22:06:16 +01:00
Jeremy 5a9c0c90c7
Fix alexa item group type parameter support (#2194)
Signed-off-by: jsetton <jeremy.setton@gmail.com>
2023-12-06 00:14:01 +01:00
Florian Hotze 1c15a11b73
Item edit: Fix wording of Item name alert (#2200)
Addresses
https://github.com/openhab/openhab-webui/pull/2126#pullrequestreview-1765483229.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-05 22:24:12 +01:00
Florian Hotze 617f70b103
Set unit metadata & state description pattern when creating UoM Item (#2126)
Related to https://github.com/openhab/openhab-core/pull/3481.
Closes #2108.

- Ensures that the internal unit is set when an Item is created, so that
in case the system unit changes (i.e. measurement system changes)
persisted data does not get corrupted.
By default, the unit metadata is set to the system default unit, however
the user can easily change that on Item creation.
  
The unit can also be changed later as it is just normal metadata,
however this can corrupt persisted data.
- Adds the ability to set state description pattern when creating a UoM
Item.
- Shows the group type for groups, e.g. `Group (Number:Temperature)`
instead of just the Item type.

This applies to both the Items and the model page.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-05 17:06:28 +01:00
lolodomo 18e93f5b1c
[BasicUI] Fix dark theme for selection popups (#2187)
Fix #2142

Add a border to the popup.
Also update the separator color (make it more visible) in dark theme.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-11-30 21:48:14 +01:00
Florian Hotze 4be00c2673
Update browserslist-db & Remove unused uglifyjs-webpack-plugin (#2156)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-11-29 11:13:40 +01:00