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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>