Commit Graph

1572 Commits (f5a4bb338818e9bc5fb43f06fe379c77ba33aa8c)

Author SHA1 Message Date
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