Commit Graph

1849 Commits (main)

Author SHA1 Message Date
jimtng d48aecff60
Developer sidebar: Add ability to search and pin widgets (#3110)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-22 16:06:23 +01:00
Mark Herwege f193ef9f1f
Persistence edit: Fix multiple selection (#3105)
Closes https://github.com/openhab/openhab-webui/issues/3104.

As the item picker keys where dependent on the length of the selection,
they got recreated each time something was selected. This made
multi-selection impossible.

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2025-03-21 18:55:24 +01:00
jimtng d3755905cd
Config sheet: Fix loading of multi-line default values (#3114)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-21 18:54:59 +01:00
jimtng 944b8f6201
Add-on card: Add tooltip to label (#3113)
This displays the title when the mouse hovers over.
Useful in case the title overflows and is hidden.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-21 18:51:49 +01:00
Holger Friedrich d714a1cd15
GH Action: Detection of new files (#3111)
This restores the behavior before tj-actions was removed. New untracked
files created during build will break the build.

Follow-up to #3106. Consistent to what we merged on core/distro.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2025-03-17 15:25:41 +01:00
Florian Hotze 935d18a1cd
CI Build: Add version comment for stCarlolas/setup-maven action (#3109)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-03-15 18:56:48 +01:00
Florian Hotze e8931b91ca
CI Build: Pin stCarolas/setup-maven action version to commit hash (#3108)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-03-15 17:09:45 +01:00
Holger Friedrich 8e47356342
Replace GH Action from tj-actions by custom code (#3106)
The GitHub Actions build workflow includes external Actions from 3rd
party repositories. The functionality of tj-actions/verify-changed-files
was used to detect modifications of files under source control during
the build process. The external action is removed and replaced by custom
code. This is less flexible, but does not require an external action in
the build toolchain.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2025-03-15 15:29:55 +01:00
jimtng ce53cc3e66
Developer tools: Add Copy DSL definition for Items and Things (#3085)
Resolve https://github.com/openhab/openhab-core/issues/4509.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-11 20:55:43 +01:00
jimtng 6c88932ef1
Item details & Items list: Add Copy DSL Definition button (#3084)
Add Copy DSL Definition for items, both in Item Details and Items List
using the definition provided by
https://github.com/openhab/openhab-core/pull/4569.

Resolves https://github.com/openhab/openhab-core/issues/4509.

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-11 20:50:08 +01:00
Florian Hotze 40a8de5052 Adjustments to the changes from #3086
Those were forgotten to submit during review.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-03-11 20:38:23 +01:00
jimtng a229c3d12b
Thing Details: Add Copy DSL Definition button (#3086)
Based on https://github.com/openhab/openhab-core/pull/4569.
Resolve https://github.com/openhab/openhab-core/issues/4509.

Also cleaned up / removed the previous attempt (from 5 years ago) to
create a textual definition. It was commented out and wasn't actually used.

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-11 20:35:48 +01:00
jimtng d6519450bb
Inbox: Add `Copy DSL Definition` (to clipboard) button & Add selection count (#3021)
Refs https://github.com/openhab/openhab-core/pull/4569.

This allows us to quickly create the Thing inside a .things file from the discovered Inbox items.
It works when clicking a single inbox entry, and also when multiple entries are selected.

It also adds a count for the number of the selected Things.

---------

Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-10 15:16:10 +01:00
jimtng ed9aa3117e
Widget config/code editing: Add live update, dirty checking, make popups movable (#3039)
- Make Widget Config and Widget Code Editor popups draggable by the
navbar, so they can be moved out of the way to view the widget being
edited
- Preview changes immediately on the widget
- The changes can be reverted if desired by clicking the "Reset" link in
the navbar.
- The changes are reverted if the popup is closed without saving.
- Implement dirty checking confirmation

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-10 15:15:46 +01:00
Florian Hotze 394c704cb7
Event WS client: Filter by topic instead of type (#2997)
Depends on https://github.com/openhab/openhab-core/pull/4550.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-03-10 15:13:50 +01:00
Florian Hotze b34a3905fa
Location card: Support Lightbulb & LightStripes equipment for lights status badge (#3101)
Closes #1144.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-03-10 14:32:52 +01:00
Florian Hotze 3fd72739e0
Script edit: Fix minor styling issue in script details (#3100)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-03-10 13:59:34 +01:00
jimtng 2a7d531b0f
Layout edit: Move page settings to bottom of screen in edit mode (#3056)
This frees up screen real estate to see more widgets.
In Edit mode, remove the page settings from the top of editor page.
In createMode, it is still shown at the top as before, but a note added where to find the settings later.

---------

Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-10 13:52:14 +01:00
jimtng 26ef1d9ccc
Things List: Add multiple search, select all & Inbox: Go to newly approved Thing(s) (#3020)
Things Filtering/Searching & Selection:

- The Thing count is updated to reflect the number of matches found when
performing search/filtering
- When filtering, the invisible Things (i.e. Things that do not meet the
filter criteria) will be deselected. Only Things within the filtered
result can be selected and acted upon (Remove, Disable, Enable). So if
you first selected all your things (e.g. 100 things) then perform
search/filtering which result in 5 things, then the total selected
Things will now be just 5, and when you hit Remove, only those 5 will be
removed.
- Add `Select All` / `Deselect All`. This also works in tandem with
search/filter. When the filtered result shows only 5 Things, Select All
will only select those 5 Things and not all the available Things on the
system.
- It is possible to search and display multiple Things by separating the
search terms with a comma.

## Preload Things List search

- This allows navigating to Things List page with a pre-defined search
terms, also to support the inbox approval feature

Inbox approval:

- `Add as Thing` and `Add as Thing (with Custom ID)` are merged into
just `Add as Thing`. The subsequent dialog will prompt for both the
Thing ID and the Label in one dialog, removing multiple steps.
- Thing UID / ID validation is performed within the Add a Thing dialog,
and the validation status displayed instantly under the Thing ID input
- It also checks against full UID conflicts against existing Things
- When multiple inbox items are selected and `Approve` is clicked, the
user will be redirected to the `Things List` page, with pre-set filter
to show all and only the approved Things.

---------

Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-10 13:36:36 +01:00
jimtng 8d04f95b82
Model Item details: `View/Hide Details` instead of `Edit` for uneditable Items (#3089)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-10 12:43:19 +01:00
jimtng 40635e0962
Use a more specific browser title for each page (#3058)
Resolves #3054.

- Refactor how the current url is checked inside app.vue.
- Fix a bug where `Settings` menu item in the sidebar isn't highlighted
  when viewing the Transformation and Persistence sections.
- Add a new `browserTitle` config for pages other than the `overview` page
- Hide "Sidebar & Visibility" and "Tags" input for the `overview page`.
  This frees up some screen real estate for editing widgets
- Every page has a custom browser page title:
  - Pages will use its `browserTitle` || `label` config
  - Overview page will just use `label` since it's not used elsewhere
- For other pages, use the section menu's text, so if/when this gets
  internationalized, the title will also change
- Settings -> System Settings will use `Settings - <navbar title> -
  openHAB` and so it's also automatically localized as the navbar title gets localized.
- Settings -> Addon settings will use `<navbartitle> - openHAB` because
  the navbar title always starts with "Configure....". Adding "Settings -" in front of it would seem redundant.
- Things/Items/Widgets/Add-on Store/Pages/Rules/Scripts/Scenes will show
  `[X] - [uid] - openHAB` e.g. `Things - mqtt:topic:xxx - openHAB`

---------

Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-10 12:29:03 +01:00
Mark Herwege 71d6e8b99c
Sitemap editor: Check for empty frames (#3090)
Check and warn for empty frames when saving a sitemap.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2025-03-10 12:24:10 +01:00
Florian Hotze aa14758cb7
i18n: Add support for loading locales from multiple scopes (#3099)
This allows to load locales from multiple sub dirs, e.g.:
```js
loadLocaleMessages(require.context('@/assets/i18n/about'), require.context('@/assets/i18n/empty-states'))
```

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-03-10 12:21:11 +01:00
jimtng 219693fdfa
Location picker: Set default to system location, otherwise set to worldwide zoom level (#3047)
Resolves #2999.

Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-10 12:00:26 +01:00
Florian Hotze a3deece99f
Script edit: Automatically update GraalJS mime type when opening script (#3098)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-03-10 11:32:48 +01:00
Florian Hotze 0c4c0aae5f
Minor enhancements to Main UI CI job (#3095)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-03-10 00:41:01 +01:00
jimtng 1cd53865c8
Add Alt-Shift-M shortcut key to toggle menu when unpinned (#3081)
It has always been a pain point when the menu is not pinned,
getting back to it is very difficult, involving several "back" clicks,
and sometimes it also gets lost and it became impossible without a full
browser refresh.

This adds a shortcut Alt-Shift-M (similar to Alt-Shift-D) to show the
menu whereever you are.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-08 00:54:12 +01:00
stefan-hoehn da66e4fd05
[blockly ]oh_taggeditems block: Fix multiple tags in vars & Add array support (#3082)
Fixes #3077.

- allows multiple tags variables
- adds array support
- more resilient by trimming away spaces in tags

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2025-03-08 00:51:32 +01:00
jimtng 4b77cd1c71
Script Editor: Fix editing RulesDSL scripts (#3087)
Regression from #3051

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-08 00:48:22 +01:00
stefan-hoehn 8561b88836
[blockly] Add block to set value to key of dictionary (#3078)
Closes #3075.
Provides a block that allows to update a dictionary that was assigned to
a (named) variable.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2025-03-08 00:46:42 +01:00
jimtng cceb4423e7
Downgrade vue-fragment to 1.5.1 (#3074)
Resolve #3072 
Regression from #3066

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-02-24 18:04:27 +01:00
Wouter Born de89b6fc27
Use Spotless sortpom plug-in (#3073)
This simplifies the sortpom configuration and also allows for checking
and reformatting them using the spotless:check and spotless:apply Maven
goals.

Similar to openhab/openhab-core#4618

Signed-off-by: Wouter Born <github@maindrain.net>
2025-02-23 19:05:22 +01:00
jsjames 8b7f4700dd
Script edit: Display conditions (#3042)
Added support so conditions will be displayed when script rules are viewed.

Signed-off-by: Jeff James <jeff@james-online.com>
2025-02-18 11:41:37 +01:00
Mike Major 5ad2b2bf79
oh-label-cell: Fix issue with setting badge colour (#3068)
Signed-off-by: Mike Major <mike_j_major@hotmail.com>
2025-02-18 11:15:32 +01:00
Mark Herwege 2e285d7e71
Sitemap editor: Fix icon parsing error (#3048)
Icons with both : and - in the name where not parsed correctly in sitemap code.
See https://community.openhab.org/t/basic-ui-text-color-depending-of-item-string-content/162110/10.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2025-02-17 23:32:35 +01:00
Florian Hotze 1c84a5bd70
Upgrade some Main UI dependencies (#3066)
- Upgrade dependencies with vulnerabilities through `npm audit fix`.
- Upgrade caniuse-lite/browserslist-db.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-02-16 17:57:28 +01:00
Florian Hotze a9839ed90b
Fix oh-image-card styling affects all cards (#3065)
Regression from #3046.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-02-16 15:31:36 +01:00
jimtng 20ec71f992
Page Settings: Add Copy and Remove Page buttons (#3057)
This offers a more convenient way to create a temporary copy when
editing/experimenting with a page.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-02-16 15:03:29 +01:00
jsjames 792ff7fab8
Script edit: Add support for new python add-on & Refactor automation-languages definition (#3051)
- Added support in script-edit.vue for new/imminent graal python
binding.
- Removed hard-coding of commentChar and pulled from restructured
annotation-language.js definition.
- Refactored the annotation-language.js definition implementation.

---------

Signed-off-by: Jeff James <jeff@james-online.com>
2025-02-16 11:21:32 +01:00
jimtng fe7e9394c9
Condition Module Wizard: Add Interval condition to Time Condition (#3049)
Refs https://github.com/openhab/openhab-core/pull/4583.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-02-16 10:45:26 +01:00
Chris Jackson 481ef4dfcc
[logviewer] Support history (#3030)
This is the UI side of the enhancements to a) receive historical logs
from the OH server, and b) improve performance by receiving arrays of
log entries rather than just single entries.

It does work with the existing log system since it will work with both
single log entries (as currently used) and arrays of logs. Due to the
change in format, the filter requests do log a parse error since it now
uses a DTO with a number of bits of data rather than just an array of
loggers, but this doesn't impact anything else. Therefore it is safe to
merge this before the core is merged (although it's probably best to
wait a little to ensure there's no major comments to the core side!).

This also fixes a minor bug where the number of filtered logs may be
incorrectly displayed.

With this and the core changes, I can display full zigbee debug - it's
about 2000 lines in 15 seconds (or put another way, the log buffer shows
about 15 seconds of data). The log remains responsive (I can change the
logging levels back). Possibly the log buffer can/should be increased
more than 2000 entries, but that's for another day...

Core PR coming soon...

Signed-off-by: Chris Jackson <chris@cd-jackson.com>
2025-02-15 16:29:08 +01:00
Florian Hotze 3ec39a0b53
Tabbed Page: Fix label too large (#3064)
Regression from #3044.

Noticed on my iPhone that the font size of the label was way too large.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-02-15 16:27:34 +01:00
jimtng ed2e1c3dcf
UID Input: Add `Fix UID` button to normalize UID input (#3060)
Resolve #3052.
Also add automatic item name generation as the label is typed (only when
name hasn't been entered).

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-02-15 14:02:49 +01:00
jimtng 6eb9f2271b
Item Detail: Fix search in developer sidebar (#3045)
Fix the following scenario:
- "search for usages of this item" for Item A is clicked
- Sidebar opens and sets `searchFor=itemA` preloads the search as
requested
- User then types new query in the sidebar, meanwhile the searchFor prop
remains unchanged
- Clicking on "search for usages of this item" for item A again, caused
no changes in `searchFor`, as a result, the watch for this prop didn't
fire

This PR fixes this situation by resetting the searchFor prop, therefore
causing the watch to perform the search again.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-02-15 13:44:45 +01:00
jimtng 91182e317d
Tabbed Page: Support Iconify and openHAB icons for tabs (#3044)
Resolves #2937.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-02-15 13:41:30 +01:00
openhab-bot d50dd4c527
New Crowdin updates (#2971) 2025-02-15 13:40:51 +01:00
openhab-bot c0cbf9eca2
New Crowdin updates (#3041) 2025-02-15 13:31:50 +01:00
jimtng 66df892538
Link Edit: Add dirty checking (#3040)
Resolves #2943.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-02-15 13:25:39 +01:00
jimtng 34679aa8b5
Fix oh-icon icon name type in widget def & docs (#3043)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-02-15 13:23:27 +01:00
jimtng c217b88adb
Interactive SVG Canvas: Fix embedding SVG errors (#3036)
Canvas Layout: Fix embedding SVG errors

- When imageUrl is not configured, don't show/log an error message
- When imageUrl is not an SVG file, or
- When there's an error fetching the SVG file, show a toast message
- When flashing the embedded svg
- Show a toast message when flashing, but no 'openhab' elements were
found

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-02-15 13:20:27 +01:00