This PR implements drag and drop in the sitemap tree, to make it easier
to graphically rearange sitemaps.
To achieve this, [Vue.Draggable](https://github.com/SortableJS/Vue.Draggable) (by itself
based on SortableJS) is included.
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Adds String type support to the interactive SVG canvas by allowing to
compare a string to a specific value that is perceived as state ON:
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
Regression from #2690.
Reported here:
https://community.openhab.org/t/enocean-impossible-to-link-a-rockerswitch-channel-with-an-item-in-main-ui-there-is-no-profile-available-for-the-selected-item/160987
When creating a Thing channel link to an item, the profile selection are
disabled. This presents two problems:
- It made linking a trigger channel to an item not possible, because a
profile must be selected, but they're disabled.
- Linking a non-trigger channel to a new item is possible, but selecting
a profile is not possible at link creation. The user has to create the
link without a profile first, then go back to edit the link in order to
assign a profile.
When editing a channel link, profile selection was possible for
unsupported profiles, e.g. when editing a link between a Switch Item and
a Number channel, one could edit the link to use the default or follow
profiles.
---------
Signed-off-by: Florian Hotze <dev@florianhotze.com>
This avoids confusion because `background` is not working anymore.
Use `style: background: ` instead.
---------
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Add @stefan-hoehn as Blockly CODEOWNER so he is automatically requested
for review in his role as Blockly maintainer.
Signed-off-by: Florian Hotze <dev@florianhotze.com>
This should fix the performance problems in the log viewer when the
number of items reaches the max buffer size.
---------
Signed-off-by: Yannick Schaus <github@schaus.net>
This updates the tern defs used for autocompletion to the current
library version included in the add-on (5.8.1).
See https://github.com/openhab/openhab-js/compare/v5.3.1...v5.8.1 for
changes.
Last update was in #2642.
Signed-off-by: Florian Hotze <dev@florianhotze.com>
This fixes safe-area issues all over the UI:
- Issues where the safe area was applied to elements where it should
not, e.g. the settings menus' entries.
- Issues where the safe area was missing, e.g. model cards, which were
hidden under the notch.
Due to webpack's CssMinimizerPlugin minimizing `0px` to `0` when
overriding the Framework7 safe area CSS vars, which then broke the
calculation, a new .css file has been introduced.
---------
Signed-off-by: Florian Hotze <dev@florianhotze.com>
- Fix navbar button color and arrangement on iOS devices.
- Remove tooltip for iPhones as it is hidden behing the notch, which
looks weird.
- Fix safe area issues with log table and badge in landscape on iPhone.
- Clean-up code a bit.
---------
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Closes#2883.
This adds a basic log viewer into the Main UI, and displays the logs
from openHAB log file using a websocket connection.
## Overview
This adds the log viewer to the Developer Tools -:
The main logger window is reasonably simple, and a little busy. Log
entries are styled with a background color:
red=error, yellow=warn, greed=info, grey text = trace, no change = debug.
The window scrolls horizontally - the time column
remains fixed, but the log level, class and message scroll left/right.
This allows the user to effectively remove these columns if they desire
by simply setting the horizontal scroll point accordingly.
Across the top in the navbar and the bottom toolbar are a bunch of status and configuration
data/buttons. These are:
* Play button: Continues receiving/processing logs if paused / stopped.
* Pause: Continues to receive logs from openHAB, but doesn't add them to
the display, so the display is static. When Play is pressed, the filter
is updated, so any recent entries will be added.
* Stop: Stops receiving data from the server. The websocket connection
is disconnected - this ensures there is no change to the local buffer.
* Filter input box - this filters the display to display only text in
either the logger name or message containing the filter text (case
insensitive).
* Time of the oldest and latest log entries held in the local buffer.
* Number of log entries currently displayed and in the buffer.
The color of the badge is green if all are displayed, orange if some are
filtered out, or red if the max size of the buffer (2000) is reached.
* Download: Downloads a CSV of the filtered log file for further
processing.
* Copy: Copies the log as HTML to the clipboard. This allows pasting of
the filtered log complete with highlighting.
* Delete: Clears the log buffer.
* Exclamation: Shows `ERROR` logs even if they would otherwise be
filtered out.
* Pen: Configures highlighting (more on this below).
* Cog: Configured logging (more on this below).
## Highlighting
The UI allows the user to add any number of text elements that will be
highlighted. The user can specify a colour, and enable and disable if
the highlighting is active or not. The list of highlights is saved
locally.
## Log Settings
The user can directly manipulate log levels. This allows the user to
simply change the log level for existing packages, or delete the log
entry (restoring it to default) or adding a new logger for a custom
package. If adding a custom package, this gets added as `WARN` level (it
uses the log level provided in the `ROOT` logger), which can then be
changed in the dropdown.
Also-by: Yannick Schaus <github@schaus.net>
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
- Should only affect switch with mappings, not player control
- Utilise the wasted space instead of wrapping the buttons into multiple
rows, if possible.
- Right align the buttons. This makes it look _much_ neater.
- Instead of limiting the width of the buttons, reserve a minimum width
for the label
- However if the label is shorter than 6 characters (including blank
labels), reduce the label's minimum width to just what's actually taken
up by the shorter label. This gives more space for the buttons with
shorter labels.
- When buttons wrap to multiple rows, make sure that each row contains
almost the same number of buttons, instead of having the first row
filling up the horizontal space, move the buttons down. By doing this,
there is more space for the label to occupy.
- Squeeze extra space for more buttons in "condensed layout" by reducing
padding, inter-button gaps, min-width, etc.
- The reduced padding in condensed layout also affects buttons in
buttongrid.
Before:
<img width="1130" alt="image"
src="https://github.com/user-attachments/assets/6bb010b7-d8e3-42bf-a3ae-0236e3ca3601">
After:
<img width="1127" alt="image"
src="https://github.com/user-attachments/assets/395b2440-532b-41f1-8369-c9963ebe84b7">
---------
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Allows to flash and handle state on whole SVG groups without a proxy by
using the group's path elements instead, e.g. this whole group can be used directly
---------
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
This fixes an issue where "-" was displayed as label in that case, which
was very annoying when using the label card only for displaying an icon.
Signed-off-by: Florian Hotze <dev@florianhotze.com>