Closes https://github.com/openhab/openhab-webui/issues/2675
HTML escape characters in input widgets were not properly supported,
leading to an escaped character sequence under certain conditions.
---------
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Improves the fixes from #2677, #2511, #2706 and #2710 to only apply to
iOS devices.
Avoids/Fixes regressions with other platforms such as
https://community.openhab.org/t/chart-scrollbar/157828.
Known issues:
- Charts display in popups on iPads are rendered to large.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Regression from #2714.
eval() seems to be required by ECharts: When opening a chart, an CSP
error is thrown that traces back to ECharts, but the chart still
renders.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This new CSP is much more restrictive compared to the old one:
- Don't allow any origin as default
- Don't allow eval() usage
- Don't allow data:, gap:, content: and blob: schemes by default
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This adds support for optionally asking the user for confirmation either
by dialog or by sheet before executing an action.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes#2583. Fixes#1591.
This moves model loading code to a new Vuex store module named model.
Model loading is now done by app.vue on init and when an Item change event is received through SSE.
home.vue and home-edit.vue now get the model from the Vuex store instead of loading it.
Add tab components for locations-tab, equipment-tab and properties-tab for easy usage in tabbed pages.
Add card components for oh-.location-card, oh-equipment-card and oh-property-card to standard widget list.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Thomas Wunschel <4302898+wuschi@users.noreply.github.com>
This fixes an issue, where the usage of the code tab of a page marked it
as dirty, even if no change to the page was made.
Please note that for the layout page desinger, the fix however does not
apply on the first time when the code tab of an existing page is opened.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Removes unused code from app.vue and other occurrences. This code would
be a security issue if used and generates security warnings.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
There was an error on code generation in particular when using vars and
string concat blocks (who sometime generate code instead of pure
strings) which is fixed now.
I also gave notifications its individual color to distinguish them
better from other groups.
Follow-up for #2672.
---------
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
Note that the new blocks can completely replace the old ones (though
they will not be automatically converted but it must be done manually).
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
Follow-up for #2511.
I think I finally discovered the root cause for charts not displaying
initially on iOS >= 17.4: The height of the chart was calculated to 0px.
By using 100dvh (dynamic viewport height) and subtracting safe areas
etc. instead of using 100%, I managed to fix this issue.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
add required authentication for some rest endpoints, add some sanity
checks to improve security.
Remove code that has been marked as deprecated.
---------
Signed-off-by: Tobias Bräutigam <tbraeutigam@gmail.com>
When not being in edit mode, oh-context did not render at all. Instead,
an error was thrown:
```
[Vue warn]: Cannot set reactive property on undefined, null, or primitive value: undefined
found in
---> <OhContext> at src/components/widgets/system/oh-context.vue
```
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This adds the option to specify a String Item, to which the call status
is sent.
This allows to track the usage of oh-sipclient from rules and scripts.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
When clicking repeatedly on the openHAB logo in the sidebar, the
overview page was opened over and over again because it now resides
under the `/overview` path. By adjusting the href to `/overview`, this
is fixed.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This adds the ability to route through tabbed page by their index,
i.e. 0 for the first tab and so on.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Closes#2644.
This removes the health check entry from the sidebar and the settings
menu and instead uses a floating action button (FAB) to allow access to
the health checks page if there are any actual issues.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
The links to unpin scenes and scripts in the dev toolbar were set to
'rules' instead of the correct specifics, and so, didn't work.
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
Closes https://github.com/openhab/openhab-webui/issues/2595.
This PR further extends the Blockly capabilities to include more of the persistence extensions.
Specifically enhanced the `oh_get_persistvalue` block:
- Add all `Between` methods of already existing methods
- Add `countSince`, `countUntil` and `countBetween`
- Add `countStateChangesSince`, `countStateChangesUntil` and `countStateChangesBetween`
- Add `getAllStatesSince`, `getAllStatesUntil`, `getAllStatesBetween` returning an Array of timestamp and state pairs
- Add a parameter for return type if relevant (`String`, `Number`, `Quantity`, `Timestamp`).
Added methods to the `oh_get_persistence_lastupdate` block:
- `lastChange`, `nextChange`
Created a new block `oh_delete_persistedvalues` to delete persisted values:
- `deleteAllStatesSince`, `deleteAllStatesUntil`, `deleteAllStatesBetween`
Created a new block `oh_persist` to persist values:
- `currentState`: persists a state at the current time
- `stateAt`: persists a state to a given time
- `stateList`: persists a TimeSeries
---------
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Refs on https://github.com/openhab/openhab-core/pull/4115.
This is the starting point for a UI that shows issues with the users installation,
the first function is broken links.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Arne Seime <arne.seime@gmail.com>
Adds two new features:
- Auto accept calls if they match a configured list of numbers (* for all, 'user', or 'user@host` in a comma delimited list).
- Auto dial a pre-configured number when the client finishes registering (or when the client connects if registration is disabled).
Both can be safely used together.
This allows for features like intercoms, as well as widgets that connect when popped up.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
Fixes#2621.
Fixes#2593.
This improves performance of the SSE event source event processing for
rule status changes by using a separate object for the rule statuses
(allows O(1) modification) instead of finding the rule in the rules
array (O(n) for linear search) and ignoring RUNNING status.
The RUNNING status can be ignored IMO because rules tend to run such a
short time that you don't see the state shown as RUNNING, so we can use
this "trick" to reduce the amount of processed events.
The rule-status-mixin was updated with short circuit evaluations for the
IDLE status, which is very likely the most processed status, and
therefore reducing the amount of comparisons done.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes#910.
This fixes a silent failure of the analyzer if no items are passed as
query params. In this case, the empty-state-placeholder will be used to
display a "Invalid configuration" banner.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This updates the tern defs used for autocompletion to the current
library version included in the add-on (5.2.0).
See https://github.com/openhab/openhab-js/compare/v5.0.0...v5.2.0 for changes.
Last update was in #2563.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
See description in
https://github.com/openhab/openhab-core/pull/4203#issuecomment-2095792756
If a mapping is used to map a value to NULL, it is currently not shown
in an oh_label_item.
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
This exposes the command item logic to native wrappers, like our IOS and
Android clients, so they can control navigation of the app when
receiving push notifications.
See https://github.com/openhab/openhab-android/issues/3193
---------
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
This change makes the SSE event tracking handle ThingUpdatedEvents and
reloads the Things list when such an event is received.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Closes#2613.
This adds support to format channel (type) descriptions using `html` tags similar to thing-type descriptions.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes#2574.
This is more a workaround than a real fix because it seems there is an issue in Framework7's CSS.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes https://github.com/openhab/openhab-core/issues/4266.
Error was introduced by #2582 and manifests itself
when no country was set in the setup wizard or the locale settings.
---------
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Closes#2437, Closes#2148
This PR adds a new component, the oh-context. Similar to the repeater,
this component is not rendered, but injects information into the widget
at it's tree location.
The component allows to inject these three things into the widget:
* functions - using the arrow function syntax, named functions can be
declared and reused in all subsequent expressions
* constants - constants can be defined as either single values, arrays,
or objects
* variables - variables can be defined with default values. These
variables are local in scope to the oh-context and it's descendants and
take precedence over other variables of the same name from higher
contexts.
* Variables are not divided into global vs local explicitly. But a
oh-context used as the root component of a widget will have its
variables in the context of all the other components on that widget and
thus they essentially have a global context within that widget.
* In contrast to the basic widget variables, oh-context variables do
have bi-directional passage between a main widget and a sub widget.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This adds a button and new sub page to the semantic model.
On that sub-page the user can select from a few different basic templates for
semantic locations which can then be automatically created and added to the model.
There are a few options for customization:
1) The user can select a custom prefix that will be applied to all the items to fit or establish a desired naming scheme.
2) The user can optionally deselect extra pieces of the model that are not appropriate to their needs.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
Closes#2050.
This implements filtering for connection type and country (related to
region/country setting) in the addon store.
By default, it will filter for all connection types and filter out
addons not supported for a specific country if info on countries is
available.
---------
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Makes the tabbed page config editable though the code tab: Resolves#1276. Resolves#2103.
Enables expression evaluation for tab title and icon: Resolves#2571.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Several Button elements are accepted at the same place in the grid only
when they all have visibility conditions.
In this case, the user must define proper conditions so that only one
button is visible at any time.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This PR **is really a game changer** for further Blockly Usage.
It adds typed variables which in turn allows Blockly to generate the right code.
This is what I was looking for a very long time and will also reduce
many of the issues that popped up here and there.
Fixes#2057.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
When a Switch widget leads to the rendering with buttons, the value
should not be by default also displayed at the left of the buttons
(redundant information), except if it is requested through a state
pattern defined on the widget.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Follow up #2535
The function reloadIcon is already called by the function setValue at
line 636 just before calling setValuePrivate.
The icon continues being refreshed while moving the slider except if
releaseOnly parameter is set.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
- Remove the suggestion loading delay when setting the network without a change as this is not required.
- While in the wait cycle, going back to the network selection and setting the network again (with or without change)
would lead to the progress bar alternating between short and long because 2 timer cycles
would be running in parallel. Fix this by cancelling the existing timer if there is a network change.
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Adds the possibility to provide any information to the timer's callback
block that can be used when the callback is eventually executed.
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
Fixes#2552.
Add missing blocks to work with a thing or a group of things:
- oh_getthing (one particular)
- oh_getthing_state (the state of the string - to be consistent with
items)
- oh_getthings (get all things - can be used to iterate over all things)
- oh_getthing_attribute (retrieve any attribute of a thing)
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
Add-on finders scan the network for devices supported by OH add-ons to suggest suitable add-ons.
These are presented in the setup-wizard (and add-ons store).
To limit network traffic, especially for IP broadcast and multicast scans,
finders could limit the traffic to one subnet.
This is especially relevant if the setup would be on servers with many
network interfaces or when using Docker.
This commit adds setting up a primary IP address to the setup,
which will also default the broadcast address accordingly to the primary address.
Querying add-on suggestions is delayed until after this step,
and some delay is built into the process to allow suggestions finders to scan the network.
See discussion in https://github.com/openhab/openhab-core/pull/4036.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
This updates the tern defs used for autocompletion to the current library version included in the addon (5.0.0)
and also cleans up the actions namespace (remove functionality that is included in superior APIs like `things`).
Reference https://github.com/openhab/openhab-js/compare/v4.7.0...v5.0.0.
Last update was in #2220.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes https://github.com/openhab/openhab-core/issues/4105.
The setup wizard did not respect the i18n config file's content, which
resulted in overwriting the existing i18n settings.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This makes the setup wizard load the region and the location from the
server.
Useful when the wizard is re-launched later.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
- Move the selection of additional add-ons into the addons-setup-wizard.vue component.
- Add description texts for suggested add-ons JS Scripting and Astro.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This improves the first installation experience by:
- Splitting out persistence to a separate step of the setup wizard (and no persistence will be offered in the main wizard addon selection anymore).
- Allows unselecting addons from the shown list without having to open the selection popup again.
- Including Mapdb as a proposal for a persistence service to install
- Including Astro binding in the recommended addons at initial install
This also creates the groundwork to implement more fine grained suggestions in the setup wizard
by allowing to have separate steps for types of addons or specific addons.
It is possible to set extra text for identified add-ons.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
This makes the lazy loading of the add-on logo optional (can be enabled
using a config property) in preparation to use the add-on logo component
inside the setup-wizard.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fields should use all space available. In a button grid definition the
row and column fields where not visible.
I can't say what caused this, but this PR should fix this.
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Same behaviour as in the Android app is now implemented for the "none"
icon. This icon means "no icon" and we don't want to request the icon
servlet. When this icon is associated to a sitemap element, the icon
servlet is no more requested. Instead, a simple empty SVG tag is
considered and inserted in the HTML page. There is also no dynamic
behaviour (with item state) applied for this icon.
Additionally, in case the loading of any OH icon fails, the IMG tag is
replaced by an empty SVG tag in the HTML page instead of updating the
IMG source with the none icon URL (triggering a potential new icon
servlet request).
Fixopenhab/openhab-core#3977
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
---------
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Follow-up fix for #2545.
When the initial period was different from `D`, the period initial
endTime calculation was wrong.
This lead to the initial period being calculated wrong: One day was
always into the future, the rest of the period to the past.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This adds a new option to charts which allows to extend the initial period to the future by default.
Until now, when a chart was opened its period always extended to the past.
This is especially useful with the new timeseries support for Items as it allows to display forecasts.
Also refactor the chart property definitions to use the helpers.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fix#2525
Also related to openhab/openhab-core#4084 and openhab/openhab-core#3430
Two behaviour modes are now supported.
- If releaseOnly parameter is set, the new value is sent to the item
only when the slider is released.
- If releaseOnly parameter is not set, new values are sent to the item
while moving the slider. Events are sent at a certain frequency, this
frequency is defined by the sendFrequency parameter if set or every 200
ms by default. Event is not sent when the value is is unchanged (when
stopping the move but keeping the mouse pressed).
The brightness slider of the colorpicker widget is also updated to send
regular new color commands when moving the slider.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
When creating a new Number with Dimension item from a channel link, the
stateDescriptionPattern does not propose the state description pattern
from the channel type as the default.
This commit introduces this:
It only saves this state description pattern from the channel type to
metadata of the item if it is not the default state description pattern
for a Number type.
Subsequent edits of the item will present a disabled state description pattern input.
If no state description field is set, a blank field will be presented.
Reasons are:
- A state description can contain more than a pattern.
Saving only the pattern would override the rest of the stateDescription.
- An Item can be linked to multiple channels with (possibly conflicting) stateDescription.
The only solution would be for the user the set it on the item and override the channel stateDescriptions.
See https://github.com/openhab/openhab-addons/pull/16531#discussion_r1530394678.
This PR also now saves the unit (and state description pattern) when creating equipment or point from a thing.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Closes#2382.
Refs https://github.com/openhab/openhab-android/issues/3140.
Adds Android app's link_to_more metadata to the well-known namespaces,
therefore also adds an editing page for it.
---------
Also-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
Closes#1832Closes#1930Closes#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>
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>
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>