Commit Graph

1510 Commits (4b1ef3b4dc381762ab5757318ef612820b02d02d)

Author SHA1 Message Date
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
stefan-hoehn 700c47094c
Model Item picker: Add button to expand or collapse model (#2191)
Fixes #665.

Provides a button to expand or collapse the model tree while searching.

Note: I didn't implement an auto-open because I felt it would be rather disturbing.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-11-26 23:53:35 +01:00
openhab-bot 231d24b86f
New Crowdin updates (#2169) 2023-11-26 23:39:42 +01:00
Mark Herwege 6dfed0011e
Sitemap Editor: Extend chart period config for ISO8601 (#2186)
Adjust sitemap configuration in main UI for recent changes in sitemap
chart period configuration, see https://github.com/openhab/openhab-core/pull/3863.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-11-26 23:37:36 +01:00
stefan-hoehn 1c297f3175
Extend chart periods to 3Y, 5Y and 10Y (#2190)
Allow further settings 3Y, 5Y, 10Y for dynamic period of chart.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-11-26 23:27:41 +01:00
lolodomo 3e27463f45
[BasicUI] Fix updating of the chart period parameter in URL (#2162)
The period parameter syntax was extended.
Depends on openhab/openhab-core#3863

Also add few new default periods in the selection of chart period

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-11-26 21:28:16 +01:00
Florian Hotze 2f67839540
Persistence edit: Add forecast strategy (#2189)
Refs https://github.com/openhab/openhab-core/pull/3597.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-11-26 16:30:40 +01:00
Florian Hotze 95b48996c8
Fix developer sidebar conceals "Other Apps" panel (#2180)
Fixes #2177.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-11-26 01:00:27 +01:00
Mark Herwege 42193d1351
Addon suggestions (#2150)
Depends on https://github.com/openhab/openhab-core/pull/3806.

1. Have the setup wizard propose these addon suggestions (as a
complement to the hardcoded recommended addons).
2. List the addon suggestions on top in the addon store page.

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-11-26 00:43:50 +01:00
Florian Hotze d8e29f1386
Re-Apply: Fix SSE failure toast container not removed (#2182)
This re-applies the fix from #2075, which must have been lost while
rebasing #1987.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-11-22 15:23:52 +01:00
lolodomo 9981c87410
Adapt movecontrol icon to bright and dark themes (#2116)
Related to #1769

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-11-21 21:06:32 +01:00
lolodomo c7d0b25f05
Adapt network icon to bright and dark themes (#2117)
Use currentColor as color.

Related to #1769

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-11-21 19:04:44 +01:00
Florian Hotze 0c8e5acbdd
Developer sidebar: Support searching (in) sitemaps (#2138)
Extends the developer sidebar search to sitemaps, where uid, label and
slots are searched for the query.
Case is ignored.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-11-21 18:58:30 +01:00
Florian Hotze ea4387cddc
MainUI CONTRIBUTING.md: Mention Vue DevTools & Add FAQ section (#2179)
This is meant to mainly help first time contributors where to start, but
it should also be quite practical for existing contributors and save
them some time looking up stuff.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-11-20 10:24:01 +01:00
openhab-bot 66c789be02
New Crowdin updates (#1728) 2023-11-19 22:52:23 +01:00
osama-salah b089e9916f
[habpanel] Document scene activation using the selection widget (#1853)
Added a description of how to use the "Selection" widget for changing
scenes.
2023-11-19 22:49:23 +01:00
osama-salah 21909b9f8c
[habpanel] Documentation fixes (#1854)
Changed "Get widgets from the openHAB community"  to "Get more..." and at missing „Can be found“.
2023-11-19 22:43:43 +01:00
d51x fbcc07e6b4
Rules list: Add filtering by (multiple) tags (#2122)
Closes #2123.

This adds filtering by tags to the rules list, the filter is inside an
accordion.
In case you select multiple tags, the filter behaves like OR, which
means all rules which have at least one of the selected tags are
displayed.
In case you use the searchbar, the rules list will be narrowed down to
the rules which match the search query and have the selected tags.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
2023-11-19 17:56:10 +01:00
Florian Hotze f05316669d
Move JSON defs for help features to assets (#2178)
Follow-up for #2088.

I forgot that during review, let's do it now.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-11-19 12:47:51 +01:00
stefan-hoehn 483e5dc9ba
[blockly] Add event available (#2176)
Fixes #2081.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-11-19 11:43:42 +01:00
stefan-hoehn cdeee1b576
[blockly] Add parse number block (#2175)
Fixes #2139.

This adds a new toNumber block in the Math section that parses to float (I
think we don't need both parseFloat and parseInt).

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-11-19 11:41:25 +01:00
stefan-hoehn d438277655
[blockly] Add support for getting persistence previous state value as number (#2174)
Fixes #2173.

Adds the possibility to retrieve the numeric value directly from the previous state.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-11-19 11:28:10 +01:00
JustinGeorgi b4128cb0a4
Add intergrated Help Features (#2088)
Closes #2058.

This converts the developer sidebar into a multipurpose dock. 
It keeps the previous developer sidebar as the `Tools` panel and adds a
`Help` panel.

The new `Help` panel contains 4 different sections:
1) A context dependent section that will show basic help for the
administrative page currently viewed. These pages give basic
definitions, some simple tips and links to the relevant full
documentation.
2) An add-on section that lists all the currently installed add-ons and
provides direct links to their documentation pages.
3) A FAQ section for simple answers to common questions with internal
links to help guide the users, some external links to relevant
resources, and links to documentation pages providing more details about
the question.
4) A Quick-Start section that guides a new user with click-by-click
instructions for everything from binding installation to adding a widget
to a MainUI page with links to the detailed Getting Started Tutorial for
each step. This section is opened by default when an administrator opens
a new MainUI instance with no configured overview page (i.e., most
likely a new user).

All of the main setting list pages and the overview page now have a help
icon in the navbar that toggles the help dock.

FAQ and Quick-Start data are stored in separate JSON formatted files for
ease of addition and maintenance.

------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2023-11-17 23:05:54 +01:00
lolodomo dfbdcf23b3
Remove PNG icons from the classic icon set (#2084)
The docker environment is (unfortunately) kept. It can be used to
compress SVG files. Conversion from SVG into PNG format has been
commented in the script .convert.sh.

Closes #2071
Closes #1768

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-11-13 22:13:07 +01:00
d51x 18ad473c6e
Things: Add copy channel functionality (#2131)
Added ability to copy channels of Things.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
2023-11-09 10:25:11 +01:00
Gwendal Roulleau a2f9003d09
[webaudio] Allow stopping play (#2031)
Use of a dictionary to store audio sources currently playing and stop
them all when asked to.
Refs https://github.com/openhab/openhab-core/pull/3766.

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2023-11-08 10:38:44 +01:00
jimtng d8c69fbd27
[blockly] Cosmetic changes on cancel and reschedule timer blocks (#2163)
Make the blocks say "Cancel [private|shared] timer XXX" and "after xx
reschedule [private|shared] timer XXXX"
Also put the reschedule block right after cancel.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-11-08 10:15:26 +01:00
Thomas Wunschel f4bbba0df6
Fix error when actionAnalyzerItems value is a string (#2159)
Fixes #2158.

Only join `actionAnalyzerItems` values if the variable is an Array.

Signed-off-by: Thomas Wunschel <thomas.wunschel@twistsolutions.de>
2023-11-04 11:53:11 +01:00
openhab-bot f1e2c39b69
New Crowdin updates (#2124) 2023-11-04 11:51:36 +01:00
Stefan Roellin 4103c08515
Fix invalid chart period "3M" of sitemaps (#2160)
"3M" for three months is an invalid chart period for a sitemap. Replace
it with "4M" for four months, which is missing.

See https://next.openhab.org/docs/ui/sitemaps.html#element-type-chart

Signed-off-by: Stefan Roellin <stefan@roellin-baumann.ch>
2023-11-04 11:11:18 +01:00
Florian Hotze 060c14ec03
`oh-stepper`: Fix NaN shown for Item state with unit & Fix unable to control Item with NaN state (#2137)
Regression from #2090.

Reported on the community, see
https://community.openhab.org/t/openhab-4-1-0-m2-oh-stepper-not-working-properly/150372?u=florian-h05.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-11-02 21:38:38 +01:00
Florian Hotze 6d71b3d5d8
SSE event mixin: Replace RegEx lookbehind assertion with split by string (#2157)
Fixes #2153.
Regression from #2055.

MainUI was broken on older iOS versions, e.g. 15.8, because RegEx
lookbehind assertions were introduced with Safari 16.4.
This uses split by string instead and adds an ESLint rule to forbid
the usage of RegEx lookbehind assertions.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-30 17:42:06 +01:00
alexxys 8f06d97c5e
Create aux badge for humidity setpoints similar to temperature badge (#2154)
The temperature badge shows both the measured temperature and the
temperature setpoint in the form "measurement_value (setpoint_value)",
e.g. 20° (21°). 
This introduces the same format for
humidity badge by showing humidity setpoint in addition to humidity
measurement.

Signed-off-by: Alexander Antonov <alexxys@gmail.com>
2023-10-30 08:34:10 +01:00
Florian Hotze c9de04eaff
Fix color picker not displayed correctly (#2136)
Fixes #2134.
Regression from #1989.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-29 14:50:57 +01:00
Thomas Wunschel c2d071a9cf
Support configurable visibility of semantic model cards (#2144)
Closes #2143.

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

Signed-off-by: Thomas Wunschel <thomas.wunschel@twistsolutions.de>
2023-10-29 14:39:48 +01:00
dependabot[bot] 4f331b5702
Bump browserify-sign from 4.2.1 to 4.2.2 in /bundles/org.openhab.ui/web (#2155)
Bumps [browserify-sign](https://github.com/crypto-browserify/browserify-sign) from 4.2.1 to 4.2.2.

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-29 14:03:25 +01:00
Florian Hotze aef0a6bf74
Fix missing footer element for Item Vue component (#2135)
Fixes #2133.
Regression from #2087.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-29 11:40:49 +01:00
Mark Herwege 922c4f3db7
Sitemap editor: Support AND conditions and icon rules (#2145)
Fixes #2149: Syntax validation errors when command mappings contain special characters like [ and ].

Sitemaps now support icon rules and AND conditions in icon, color and visibility rules.
Mappings now also support an icon.

This PR introduces support to configure this in the sitemap editor.
It also contains a fix for staticIcon support.

Depends on https://github.com/openhab/openhab-core/pull/3850.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-10-27 14:04:31 +02:00
lolodomo d34f93a275
[BasicUI] Add support for icons based on conditional rules (#2020)
Depends on openhab/openhab-core#3820 and #1998 

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-10-26 23:53:56 +02:00
d51x 0a8c9a7059
Add copy rule functionality (#2132)
This adds the ability to copy a UI rule.
The rule editor behaves as if the rule was a new one, but is pre-populated with the copied rule. 

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
2023-10-22 19:51:47 +02:00
dependabot[bot] bcae592a5f
Bump @babel/traverse from 7.6.2 to 7.23.2 in /bundles/org.openhab.ui/web (#2140)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.6.2 to 7.23.2.

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-22 19:05:48 +02:00
JustinGeorgi 335d149895
Fix oh-clock context in clock card (#2146)
This PR fixes an error in the context definition of the `oh-clock` used
in the `oh-clock` card that was causing the clock cards to fail to
render in the updated configuration definition.

See the forum discussion:
https://community.openhab.org/t/oh4-oh-clock-card-empty-since-oh4-1-m2/150518

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2023-10-22 18:23:52 +02:00
Florian Hotze bf377d38af
Unwrap command Item picker from f7-list-item (#2125)
Addresses
https://github.com/openhab/openhab-webui/pull/2055#discussion_r1350710682.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-09 23:30:28 +02:00
Florian Hotze e987624fcc
Item edit: Dynamically load UoM dimensions (#2120)
Fixes #1926.
Awaiting https://github.com/openhab/openhab-core/pull/3838.

Load the UoM dimensions for UoM Item types from the REST API instead of
hard-coding them into the UI.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-09 23:21:55 +02:00
openhab-bot 1409da92bf
New Crowdin updates (#1980) 2023-10-08 22:43:07 +02:00
d51x a1a33294fa
Things list: Add grouping by location & Display location in list entries (#2107)
Closes #2099.

Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
2023-10-08 21:23:00 +02:00
Dan Cunningham 27c140aaec
Adds an UI command Item (#2055)
This allows the local running instance of the UI to listen to an Item
for commands. Specifically it will understand the following commands.

- navigate
- popup
- popover
- sheet
- close (closes all popups/sheets/popover)
- back
- reload
- notification

Commands with arguments use a colon delimiter, mirroring widget actions
in the UI, for example:
- `navigate:/pages/page`
- `popup:widget:customWidget`
- `notification:Text:Title:Sub Title:Title Right:5000`

Users can select the item in the about menu, since other local
options are set there it seemed to be the best place.

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
2023-10-08 21:20:46 +02:00
stefan-hoehn e2ebc1de52
[blockly] Support Quantity in more math blocks (#2041)
Closes #2001.

Adds Quantity support for more math blocks:
- math_single had to be reimplemented
- math_minmax was added

Note that there is a special case on min/max if the inputs are not of
equal type an error will be shown to user.

In the special case of variables Blockly does its best to detect the
right code to be generated for the min/max block:
- both are variables -> then numerical input is expected
- one of inputs is a variable: then blockly uses the type of the other
non-var-block to base the generation on (either number or quantity
comparison)
- note that no type conversion of the inputs is done

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-10-08 21:16:12 +02:00
dependabot[bot] aaa5e7aaa0
Bump semver from 5.6.0 to 5.7.2 in /bundles/org.openhab.ui/web (#1960)
Bumps [semver](https://github.com/npm/node-semver) from 5.6.0 to 5.7.2.

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-08 19:53:06 +02:00
dependabot[bot] 696c9076e9
Bump word-wrap from 1.2.3 to 1.2.5 in /bundles/org.openhab.ui/web (#2115)
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-10-08 19:51:39 +02:00
Florian Hotze d4d7bea7fb
Fix `oh-stepper` not working if step is an integer (#2109)
Regression from #2090.

Fixes `Uncaught TypeError: Cannot read properties of undefined (reading
'length')` being thrown if the step property is an integer value, e.g. 1
or 1.0.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-08 09:50:04 +02:00
lolodomo 1c362ccf64
[BasicUI] Hide header row if label not explicitly set (#2112)
Applied to Chart/Image/Viodeo/Mapview/Webview elements.

Chart and Image elements are also now clickable.
Clicking allows toggling between header row shown and header row hidden.

Fix #2065

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-10-08 09:45:11 +02:00
lolodomo c76a8e37c8
[BasicUI] Prefer sitemap label to name in sitemap selection (#2110)
Sitemaps are now also sorted by label/name.
Dark theme is now properly handled.

In case several sitemaps have the same label, the sitemap name is
concatenated in parenthesis.

Fix #2101

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-10-06 10:07:00 +02:00
lolodomo 23550c65a9
[BasicUI] Prefer icon over text in buttons (switch element) (#2085)
Related to openhab/openhab-core#3441

Depends on openhab/openhab-core#3809

Icons will not be used if icons are not enabled (app setting).

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-10-03 19:28:54 +02:00
Mark Herwege 87e68aae61
[mainui] support staticIcon parameter in sitemap configuration (#1999)
Related to https://github.com/openhab/openhab-core/pull/3735

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-09-30 22:16:40 +02:00
Florian Hotze f32ef1f401
Fix `oh-` components cannot be configured in action modals (#2094)
Fixes #927.

When attempting to open an `oh-` Vue component, e.g.
`oh-colorpicker-card`, as action modal, it was not possible to configure
it, even though `actionModalConfig` was set.
This was because `oh-` componens take their configuration from the
computed `config` of the widget-mixin instead of the Vue component
`props`.
This PR fixes that by using the `actionModalConfig` for the computed
`config` of `oh-` components in action modals.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-30 21:59:56 +02:00
Florian Hotze 7893bd9b6c
Add error page for initial REST request failure & Abort further load (#1987)
Migitates and therefore closes #1205.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-30 21:56:02 +02:00
Wouter Born ec13c3d00c
Upgrade to Karaf 4.4.4 (#2098)
* Add specs features because Pax Web now depends on "asm".

Depends on https://github.com/openhab/openhab-core/pull/3814.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-09-30 10:47:42 +02:00
David Kesl c402d32563
Semantic model: Remove duplicate non-semantic tags in Item component (#2095)
Changes introduced into #2087 in combination with #2093 create duplicity
in showing non-semantic tags in the model page
(component/model/item-details.vue).
Non-semantic tags are displayed both in the Item and when edit mode is
enabled, in the accordion tag input in item-form.

Signed-off-by: David Kesl <david_git@keslovi.cz>
2023-09-27 10:08:44 +02:00
Viorel Cojocaru eee0277d89
Update RelativeCI agent action (#2063)
The RelativeCI action was using the CLI with an inline API key.

This PR replaces the RelativeCI CLI with the action agent running on workflow_run
event and in the context of the default branch (secrets are not leaked to forks). 

Signed-off-by: Viorel Cojocaru <vio@beanon.com>
2023-09-26 19:44:38 +02:00
David Kesl 044962251f
Semantic model: Add options to display and search Item names and tags (#2093)
Closes #2092.

- Adds possibility to display Item name and non-semantic tags in Semantic model tree view.
- Adds search for Items also based on Item name and tags depending on selected view options.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: David Kesl <david_git@keslovi.cz>
2023-09-26 16:57:51 +02:00
David Kesl 05c3417194
Items tag: added tags to list, unification of items tag edit (#2087)
Closes #2086

- Adds Non-semantic tags to Items list (e.g. /settings/items/)
consistently with similar list of Rules / Scripts / Pages.
- Extends `getItemTypeAndMetaLabel` with relatesTo part of Semantic
classification and moves it to a mixin.
- Fixes incorrect calculation of vue virtual box height on Items list.
- Replaces custom tag input with accordion tag input (inspired by
https://github.com/openhab/openhab-webui/pull/2078) and show number of
tags (inspired by https://github.com/openhab/openhab-webui/pull/2083).
- Moves the custom tag input to `item-form.vue`, so it is available also
in Model view, when creating Item from Thing etc.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: David Kesl <david_git@keslovi.cz>
2023-09-26 14:02:02 +02:00
JustinGeorgi 0cc4f27f3d
Fix decimal formatting for oh-stepper (#2090)
Fixes #2089.
Possibly regression from #1875.

Stepper formatValue was calculating displayed number of decimals from the value of the step property, not it's length.

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2023-09-25 22:38:39 +02:00
Mark Herwege 35c3ae05b9
Sitemap editor: Trim spaces from color value (#2091)
When generating the sitemap DSL from a UI configured sitemap with color
conditions, if the color in the condition has a leading space, it will
be included in the color string.
While this does not have an impact on the sitemap functionality (it
works), it is an issue if one would copy this sitemap to a sitemap file.
This PR strips the blanks from the color.

See #2082 and the example provided there.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-09-25 22:24:54 +02:00
jimtng 881a8b787e
[basicui] Number of Columns label (#2062)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-09-23 17:16:22 +02:00
David Kesl 6fd82e3351
Page edit: Add editing of tags (#2078)
Closes #2077.

This PR adds ability to add / change / remove Tags to Pages via MainUI.
It is using existing tag-input.vue component similar as UI for Items and
Rules.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: David Kesl <davidkesl76@gmail.com>
2023-09-22 10:40:30 +02:00
jimtng 671e791f06
Fix missing jar add-ons on settings page (#2079)
Fixes #2076.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-09-22 01:32:07 +02:00
Andrew Rowe 4876efd906
Change setup wizard icon to choose add-ons to install (#2073)
Signed-off-by: Andrew Rowe <exectechnology@gmail.com>
2023-09-21 20:20:33 +02:00
Florian Hotze cf3b218571
Fix SSE failure toast container not removed (#2075)
Fixes #2069.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-18 20:53:13 +02:00
Florian Hotze d2685e9a12
Add routes for home page tabs (#2074)
Adds routes for `/overview`, `/locations`, `/equipment` and
`/properties` so a home page reload keeps the tab and routing to
individual tabs is possible.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-18 20:51:53 +02:00
Florian Hotze 5068964ad8
Fixes/Improvements for sidebar highlighting, settings page & add-on store (#2053)
Follow-up for #1997.

- Addresses
https://github.com/openhab/openhab-webui/pull/1997/files#r1313446378:
Use filled icon for the add-on store.
- Fixes #2049: Fix sidebar highlighting for add-on settings and add-on
store pages.
- Fixes #2028: Fix tab is resetted to bindings when reloading the add-on
store (by using seperate routes for all tabs, therefore addresses
https://github.com/openhab/openhab-webui/pull/1997#issuecomment-1703221977).
- Closes #2048: Expand system settings by default on large screens where
three columns are used.
- Localize the "Show All" buttons.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Co-authored-by: Yannick Schaus <github@schaus.net>
2023-09-18 20:41:31 +02:00
stefan-hoehn b1a5ac82c0
[blockly] Allow `item xxx` to be used for `get xxx of item` (#2037)
The block can now take both “get item item xxx” or (new) “item xxx” directly.
I have also added some hint in the help tooltip that clarifies
how to work with the block when using it through variables because
Blockly has to make an assumption due to the fact that it cannot detect
what is provided in the variable.

See https://community.openhab.org/t/less-then-greater-then-comparison-return-value-seems-to-be-inverted/148910/9.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-09-17 14:54:46 +02:00
Jeremy c058b12f0c
Update Alexa color temperature supported item types (#2064)
Related to https://github.com/openhab/openhab-alexa/pull/613

Signed-off-by: jsetton <jeremy.setton@gmail.com>
2023-09-17 14:50:17 +02:00
Davek145 e1d90f706a
Add CO2 measurement badge to location card (#2068)
Closes #2067.

This PR introduces CO2 measument badge to the location card in MainUI.
It is same logic as other measuments badges, i.e. average from items
with Measurement and CO2 Semantic tags.

---------

Signed-off-by: David Kesl <davidkesl76@gmail.com>
2023-09-16 18:49:17 +02:00
Florian Hotze 2f7b1d7823
Profile page: Only show latest 10 sessions (#2061)
The openHAB demo's profile page takes ages to render because of the huge
sessions list. This should fix that problem.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-16 16:52:03 +02:00
Florian Hotze f2c008befb
Ensure semantic model pages are built after tags are loaded (#2066)
Fixes #2006.

With the attempt in #2029 failing due to #2054, this finally fixes an
issue where the semantic model pages (Equipment, Properties) were
missing translations.
This was due to a race condition, where the semantic model pages were
built before the tags were loaded.

This PR fixes this by watching for semantic model updates (i.e.
subscripting to the underlying Vuex mutation) and loading/building the
model pages after such an update.

Futher improvements:
- Initial loading of semantic tags is put in parallel with other API
requests performed on app init.
- Vuex semantics: A mutation is used for setting the semantic tags from
the action.
- Debug logging is added to both the semantic tag and the semantic model
page loading.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-16 16:31:53 +02:00
lolodomo 07aacc9ee5
[BasicUI] Handle the new parameter "staticIcon" (#1998)
When set on a sitemap element, Basic UI ignores the item state when
initially requesting the OH icon and do not request it again when the
item state is updated.

Depends on openhab/openhab-core#3735

Related to openhab/openhab-android#3404

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-09-09 13:30:57 +02:00
lolodomo 08a2d80db0
[BasicUI] Add a new header line for image, chart and video elements. (#2010)
Header line for video element contains icon and label.

Header line for image element contains icon, label and a button to
switch between no upscale and upscale of the image. Header line for
chart element contains icon, label and 4 buttons:
 - one button to show or hide the legend
 - one button to change the time range
 - one button to switch between no upscale and upscale of the chart
 - one button to refresh the chart

Fix handling of iconcolor and labelcolor parameters for mapview and
webview elements.

For image and chart elements, the header line is always present so that
user has an access to its buttons.
For video, mapview and webview elements, if the label is empty, the
header line is hidden.

For chart and image elements, there is now no upscale applied by default
(tablet/phone devices) but a button allows upscaling.

Closes #1939
Fixes #1367
Also related to #1930

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-09-09 12:31:03 +02:00
Jeremy 1ee7a2f972
Add alexa air quality monitor + remote device types (#2051)
Related to https://github.com/openhab/openhab-alexa/pull/601

Signed-off-by: jsetton <jeremy.setton@gmail.com>
2023-09-05 21:01:54 +02:00
Florian Hotze 6ba92932ee
oh-colorpicker: Fix command not sent when state null & style not accepted & cosmetic error on missing defaultColor (#1989)
Fixes #1713.

- Fix command not sent when current Item state is null.
- Fix style can not be set.
- Fix a (cosmetic) error thrown when defaultColor has no value.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-05 21:00:45 +02:00
Mark Herwege 5900864e1e
[mainui] Sitemap editor fix frequency and refresh parameters (#2033)
These parameters should be number instead of text.

See: https://github.com/openhab/openhab-webui/pull/1487#issuecomment-1332135771

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-09-05 20:53:11 +02:00
stefan-hoehn db103db550
fix uom block output type (#2036)
fixes #2008

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-09-05 20:49:51 +02:00
Mark Herwege 06f220fe53
[MainUI] Sitemap parser parse and discard comments (#2045)
Fixes https://github.com/openhab/openhab-webui/issues/2043

The sitemap parser was not able to cope with comments in the sitemap
text when pasted in from a sitemap file.
Comments will now be discarded (the REST API does not have fields for
comments), but the sitemap will still be parsed and saved.

Similarly, blanks where accepted in a number of places when defined in
text files, but not in the parser. This is now also corrected.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-09-05 20:48:09 +02:00
stefan-hoehn 25a09860ee
add blockly help buttons for missing sections and release dependant helpURL (#2035)
fixes #2014 
adds the help button for uom

---------

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-09-05 20:25:18 +02:00
Dan Cunningham 303ab55657
Reverts v-if/v-show change from #2029. (#2054)
Regression from #2029.

A few of my UI pages stopped loading properly. Specifically there seemed to be a condition where when the page would draw its widgets before other parts
of the page were loaded (or something similar, some race conditional).
This would result in widgets loading with the wrong state, colors, icons, etc that are dependent on item state.

I tracked it down to this
one very small change, reverting back to a `v-show` from `v-if` for the
main view ready state fixes this.

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
2023-09-04 19:16:38 +02:00
lolodomo 9799a326f2
[BasicUI] Input element: Fix visibility and label/icon color (#2022)
Fix #2021 

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-09-02 19:11:28 +02:00
Florian Hotze 4c7298cef3
Redesign settings page & Add doc links (#1997)
Closes #1935.

- Moves transformations to a new list for visual separaration, as it is
only second class configuration.
- Renames System Services to System Settings.
- Add Add-on Settings, which opens the same settings page as the add-on
store, i.e. provides log, service config and persistence config (if
persistence service). Add-ons that only provide log settings are
considered advanced and hidden by default.
- Consolidate the add-on store and the newly added add-on settings into
a single place (refactoring included).
- Add doc links to Things, Items, pages, rules, scenes & scripts list
pages.
- Make some system settings advanced.
- Use a third column for large screens.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-01 21:19:42 +02:00
Florian Hotze 5b515ce65c
Developer sidebar: Add search for transformations (#1985)
Transformations are searchable by uid and label, and as the uid contains
the type, also by type.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-01 20:58:20 +02:00
Florian Hotze 1dcbaeb48c
Fix missing labels for semantic cards (#2029)
Fixes #2006.
Probably fixes the issue described in
https://github.com/openhab/openhab-webui/pull/1986#issuecomment-1656746939.

Reported on the community:
https://community.openhab.org/t/openhab-4-0-release-discussion/147957/86.

Sometimes, the equipment and property cards did not use the
translations.
I found out, that in some cases the equipment and property pages (Main
UI in general) initialized before the translations loaded, this
hopefully solves it.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-01 20:48:59 +02:00
Wouter Born 30ab36c221
Upgrade Maven and plug-ins (#2044)
* Use Maven 3.9.4 with GitHub Actions CI
* Upgrade Maven plug-ins

Signed-off-by: Wouter Born <github@maindrain.net>
2023-08-30 13:28:01 +02:00
stefan-hoehn 9e9caba57c
[blockly] Fix timer remove regression (#2032)
Fixes #2002.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-08-29 09:40:14 +02:00
Wouter Born 312aa0e79f
Fix add-ons missing from About Details (#2034)
It is still using /bindings to get the data resulting in a 404 Not
Found. The other pages were updated in #1468.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-08-29 08:30:23 +02:00
Dooleweerdt 95995506b1
[blockly] Fix ZDT comparison between block on GraalJS (#2040)
Fixes #2038

Signed-off-by: Brian Dooleweerdt Rasmussen <brian.rasmussen80@gmail.com>
2023-08-26 23:11:19 +02:00
Florian Hotze a08c347b95
Delay toast on SSE communication failure by one second (#1993)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-08-19 19:57:00 +02:00
Florian Hotze 55b825c3de
Action module wizard: Update texts to mention scenes and scripts (#1994)
Closes #1921.
Depends on https://github.com/openhab/openhab-core/pull/3733.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-08-19 19:54:28 +02:00
Florian Hotze 66485118cd
oh-trend: Fix type of trendlineSampling parameter (#1995)
Fixes #1632.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-08-19 19:48:29 +02:00
Florian Hotze db174ed899
Fix missing root semantic classes (e.g. Equipment) (#2024)
Fixes #2003.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-08-19 19:47:08 +02:00
Florian Hotze db085040b6
Item details: Fix metadata error thrown when opened (#2030)
When the Item was a group Item and groupType was not defined, an error
was thrown. This fixes it.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-08-19 19:33:54 +02:00
Jeremy ee7c5ad15a
Alexa metadata: Add UoM support to use new Item unit symbol property (#2009)
Related to https://github.com/openhab/openhab-alexa/pull/598.

Signed-off-by: jsetton <jeremy.setton@gmail.com>
2023-08-19 14:05:52 +02:00
Yannick Schaus 3eff1fa404
Fix channel for Thing trigger cannot be chosen (#2026)
Fixes #1996.
Regression from #1661.

Supersedes https://github.com/openhab/openhab-core/pull/3761.

Signed-off-by: Yannick Schaus <github@schaus.net>
2023-08-18 17:36:14 +02:00
lolodomo 7f2dbb3400
[BasicUI] Upgrade to last version of Material icons (#2016)
Move from the outdated official NPM module (material-design-icons) to an
alternative NPM module (material-icons) providing most recent material
icons.

As a consequence, TTF format is no more provided, only WOFF and WOFF2
formats. All current browsers support WOFF format, so only very old
browsers could be impacted by the miss of the TTF format.

Also fix icon size in condensed mode (28x28).

Fixes #2011
Fixes #2015

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-08-16 10:16:45 +02:00