Commit Graph

1638 Commits (main)

Author SHA1 Message Date
Cody Cutrer 56eea58aa0
HomeKit metadata: Mark Thermostat.CurrentHeatingCoolingMode as optional (#2721)
See https://github.com/openhab/openhab-addons/pull/17191

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-08-20 18:46:11 +02:00
Mark Herwege b0d9ad7532
[blockly] HTTP block enhancements (#2607)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-08-19 11:16:32 +02:00
Mark Herwege 19aac477ca
[BasicUI] input widget, support html escape characters in input (#2685)
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>
2024-08-16 08:36:29 +02:00
Florian Hotze 17c2119efb
Charts: Apply iOS-related fixes only to iOS devices (#2717)
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>
2024-08-15 20:11:42 +02:00
Florian Hotze 6f01001b05
Main UI: Allow use of eval() in CSP (#2716)
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>
2024-08-15 19:04:31 +02:00
Florian Hotze 654c89edb4
Main UI: Improve Content-Security-Policy (#2714)
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>
2024-08-15 13:15:31 +02:00
Florian Hotze 94b3e7c90f
Widget actions: Support optional confirmation dialog/sheet (#2715)
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>
2024-08-14 17:08:37 +02:00
Florian Hotze b3ec38aa2c
Revert "Bump braces and gulp in /bundles/org.openhab.ui.basic" (#2713)
Reverts #2606.
Fixes #2712.
2024-08-14 10:57:07 +02:00
Florian Hotze a13ffe311e
Widget actions: Add a HTTP action to perform HTTP requests (#2711)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-13 13:19:17 +02:00
Florian Hotze f745fa98b7
Charts: Improve forced re-render code to keep settings and loaded data (#2710)
Follow-up for #2706.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-13 10:35:44 +02:00
dependabot[bot] 2ee0876c77
Bump braces and gulp in /bundles/org.openhab.ui.basic (#2606)
Bumps [braces](https://github.com/micromatch/braces) to 3.0.3 and
updates ancestor dependency [gulp](https://github.com/gulpjs/gulp).
These dependencies need to be updated together.

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 16:45:55 +02:00
Florian Hotze c43354aabe
Upgrade dependencies with security vulnerabilities (#2709)
Run npm audit fix.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-12 16:26:50 +02:00
Florian Hotze 09da526815
Upgrade @jsep/template-plugin, dayjs, echarts, qrcode & yaml (#2708)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-12 16:12:12 +02:00
Florian Hotze 0eddb68ca7
Upgrade build dependencies & Apply new ESLint config (#2707)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-12 15:43:59 +02:00
Florian Hotze f7f04bf18c
Charts: Force re-render on device orientation change (#2706)
Fixes #2702.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-12 14:45:48 +02:00
Thomas Wunschel 94aa16aba8
Allow model cards and model tabs outside of homepage (#2584)
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>
2024-08-12 13:00:03 +02:00
Cody Cutrer 3afef194df
Update HomeKit metadata definitions (#2691)
Add missing accessories, configuration parameters, enums, etc.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-08-12 10:55:39 +02:00
Mark Herwege 175b639937
Sitemap editor: Remove sendFrequency parameter (#2705)
See
https://github.com/openhab/openhab-core/issues/4338#issuecomment-2283251553

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-08-12 10:55:12 +02:00
lolodomo be71ace313
[BasicUI] Remove reading of frequency parameter of colorpicker element (#2699)
Note that %frequency% does not exist in colorpicker snippet.

Related to openhab/openhab-core#4338

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-08-11 20:17:40 +02:00
jimtng 77d42c1500
[BasicUI] Fix frame title's left padding in condensed tablet layout (#2700)
Before:

<img width="328" alt="image"
src="https://github.com/user-attachments/assets/f8dcad17-a86f-4a19-8c99-7668d755f37d">

After:

<img width="378" alt="image"
src="https://github.com/user-attachments/assets/673397dc-af99-4d46-8a9c-845f44033882">

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-10 08:50:55 +02:00
jimtng 4d6ad05607
[BasicUI] Make button text not uppercased (#2697)
The buttons on iOS and Android apps don't uppercase the text, so this PR
makes BasicUI behave the same way.

Related discussion:

https://github.com/openhab/openhab-webui/pull/2388#issuecomment-2270883776

https://github.com/openhab/openhab-webui/pull/2388#issuecomment-2272304430

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-10 08:32:26 +02:00
jimtng 4dc1bda5c1
[BasicUI] Revert uppercasing exponent (#2698)
Core now accepts lowercased exponent since
https://github.com/openhab/openhab-core/pull/3834

@mherwege would you mind verifying this please?

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-08 19:00:29 +02:00
openhab-bot 19a1acf320
New Crowdin updates (#2692) 2024-08-08 18:22:59 +02:00
Tobias Bräutigam 5e53b21626
[cometvisu] add more path checks (#2696)
also deny external xml schema loading (avoid XXE attacks)

Signed-off-by: Tobias Bräutigam <tbraeutigam@gmail.com>
2024-08-08 10:51:19 +02:00
Florian Hotze 85cd64e147
Page designers: Fix dirty handling for code tab (#2695)
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>
2024-08-04 13:14:18 +02:00
jimtng e5418b4f92
Add a dirty indicator on the title bar (#2687)
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-04 12:00:31 +02:00
Florian Hotze cee0377aea
SSE state tracking: Reduce logging (#2694)
This might improve performance as console logging takes some performance.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-04 11:40:34 +02:00
Florian Hotze 0430db5138
Clean-up unused login/logout code in app.vue (#2693)
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>
2024-08-04 11:40:05 +02:00
Florian Hotze 6b2f264660
Link add: Support linking Number channel to Switch Item with profile (#2690)
Closes #1478.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-28 15:05:20 +02:00
Florian Hotze fa85c0752a
Link add: Fix create item fails for trigger channels (#2689)
Regression from #2312.
Fixes #2669.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-26 14:16:53 +02:00
stefan-hoehn 2de240e5d7
[blockly] Fix code generation for Thing object on Thing status block (#2688)
Fixes #2670.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-07-26 13:16:32 +02:00
stefan-hoehn 0c03554e25
[blockly] Fixes for notification block code generation (#2686)
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>
2024-07-25 23:18:46 +02:00
stefan-hoehn 4ce4d495fc
[blockly] Add new sophisticated notification blocks (#2672)
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>
2024-07-23 22:44:43 +02:00
lolodomo 24a3d275bc
[BasicUI] Fix description for iconify parameter (#2660)
Default is enabled, not disabled.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-07-22 14:51:17 +02:00
lolodomo 187f0b2580
[BasicUI] Add a translatable title to the settings page (#2661)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-07-22 14:49:35 +02:00
stefan-hoehn bc73c9e297
[blockly] Fix bracketing in context block (#2682)
Fixes what was mentioned in
https://community.openhab.org/t/issue-with-contextual-info-block-after-upgrading-to-4-2/157321.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-07-22 14:46:19 +02:00
Florian Hotze fce76c81fe
Fix 404s for overview page, semantic model tabs and add-on store (#2678)
Fixes #2665.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-18 11:47:11 +02:00
Florian Hotze 3d27333ba4
Charts: Fix issues with charts not displaying on iOS >= 17.4 (#2677)
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>
2024-07-18 11:31:50 +02:00
Tobias Bräutigam 2056367b55
[cometvisu] Security fixes & cleanup for cometvisu backend (#2671)
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>
2024-07-17 22:00:00 +02:00
Florian Hotze 97910353fd
Overview page: Fix `defineVars` is not working (#2673)
Fixes #2046.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-15 20:26:18 +02:00
Florian Hotze 0b2c42cfed
oh-sipclient: Regenerate component docs (#2666)
This regenerated the component docs after #2648.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-13 14:35:15 +02:00
jimtng b5e6c34eff
Canvas layout page: Hide empty background image element to remove white border (#2663)
See https://community.openhab.org/t/remove-border-from-fixed-canvas-layout/137541.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-07-13 13:43:52 +02:00
Florian Hotze 8a50e35514
oh-context: Fix rendering failure when not in edit mode (#2662)
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>
2024-07-11 02:51:20 +02:00
Florian Hotze 43abf2f52d
oh-sipclient: Add call status Item to report call status to server (#2648)
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>
2024-07-10 12:56:15 +02:00
Florian Hotze 553591d72c
item-mixin: Improve Item name validation RegEx (#2658)
`A-z` also matches `[ \ ] ^ _ `, which is not intended.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-09 12:01:56 +02:00
Florian Hotze 2d07d21ebb
Fix sidebar openHAB logo href to avoid repeated navigation to home page (#2657)
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>
2024-07-09 11:21:08 +02:00
Florian Hotze 146fda4bb7
Page editors: Encapsulate CSS to avoid polluting global CSS (#2656)
This fixes an issue where the last lines of the layout code editor were not visible.

Reported on the community: https://community.openhab.org/t/openhab-4-2-release-discussion/157076/12

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-08 23:41:54 +02:00
Florian Hotze 713cb2ba04
Fix code editor overflow in sitemap editor (#2655)
This was caused by a wrong class name in layout-edit.vue, that overwrote
a Framework7 CSS var used by the sitemap editor.

Reported on the community
https://community.openhab.org/t/openhab-4-2-release-discussion/157076/8.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-08 21:37:24 +02:00
Florian Hotze ccbda492f3
Make tabbed pages routable (#2647)
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>
2024-07-08 12:25:23 +02:00
Kai Kreuzer 99ad4ff997
Apply spotless after release (#2653)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2024-07-08 02:03:57 +02:00