Commit Graph

391 Commits (2440db9d1d56277f34e7fd85463f75fe1588efd6)

Author SHA1 Message Date
Wouter Born 9ea63a0085
Use Jenkins Build Status badge (#627)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-12 15:23:37 +01:00
Yannick Schaus 9f0e43b4a4
Add a "pin" icon to remove the panel breakpoint (#613)
Signed-off-by: Yannick Schaus <github@schaus.net>
Signed-off-by: hubsif hubsif@gmx.de
2020-12-11 15:57:23 +01:00
Yannick Schaus 8586195565
Routable model picker, add to item picker & Blockly (#620)
Make the model picker popup dialog routable (i.e. responds to
browser-native navigation).

Add an icon to item picker to open the model picker instead
of the standard smart select flat list.

Add a new item field & block to Blockly to easily pick an item
from the model with the dialog. Add "shadow" blocks to openHAB
blocks (can be replaced by the user).

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-12-11 15:56:04 +01:00
Yannick Schaus d075dc99dc
URL encode state sent to icon servlet (#615)
Fixes #547.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-12-10 23:29:42 +01:00
eugen 3e95c345a7
Add support for QR code context in configuration (#614)
Also-by: Yannick Schaus <github@schaus.net>
Signed-off-by: Eugen Freiter <freiter@gmx.de>
2020-12-10 23:29:05 +01:00
Yannick Schaus fd40175c7c
Fix locale resolving bug, english messages (#612)
Remove vue-i18n reference to other messages (too confusing).

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-12-09 15:07:34 +01:00
openhab-bot 32eaac362c Update Crowdin configuration file 2020-12-08 22:33:01 +01:00
openhab-bot d776fc799c Update Crowdin configuration file 2020-12-08 21:54:55 +01:00
openhab-bot 1db413659e Update Crowdin configuration file 2020-12-08 21:48:19 +01:00
openhab-bot fca842034d Update Crowdin configuration file 2020-12-08 21:47:43 +01:00
openhab-bot 99b3f8db0f Update Crowdin configuration file 2020-12-08 21:45:32 +01:00
openhab-bot 84a712d697 Update Crowdin configuration file 2020-12-08 21:44:20 +01:00
openhab-bot 88b45ad91b Update Crowdin configuration file 2020-12-08 21:42:57 +01:00
openhab-bot adfe1f6c17 Update Crowdin configuration file 2020-12-08 21:30:41 +01:00
openhab-bot 81417adc2e Update Crowdin configuration file 2020-12-08 21:25:17 +01:00
Yannick Schaus 86db1283f9
i18n infrastructure + first end-user facing pages translations (#602)
Related to #394.

Add vue-i18n.
The localized messages are in `@/assets/i18n/{domain}/{locale}.json`,
and are localized by component.
They should be compatible with Crowdin.
They are also referenced in single-file components with this trick:
```
import { loadLocaleMessages } from '@/js/i18n'

export default {
  ...
  i18n: {
    messages: loadLocaleMessages(require.context('@/assets/i18n/{domain}'))
  }
```
That way they should be code splitted away from the entry point bundle
when their related component is, and they are scoped to that component.

The `common` domain with a few common and home page related messages
are loaded on initialization.

English and French messages are provided, as well as German (to be
proofed!) for the `common` domain.

A footer message is added to the settings & developer tools menu if
the locale has common messages to inform the user that these parts are
not translated yet.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-12-08 20:35:56 +01:00
Yannick Schaus f441a2615e
Material Icons Upgrade (#604)
Uses https://github.com/jossef/material-design-icons-iconfont as a drop-in
replacement of the font.

Use https://jossef.github.io/material-design-icons-iconfont/ to
browse the fonts.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-12-08 17:44:30 +01:00
Yannick Schaus 6f81c0a6c6
Add Items from Thing: Expert Mode (#603)
This adds a new "expert mode" to the
"Create Equipment from Thing"/"Add Equipment to Model"/
"Create Points from Thing"/"Add Points to Model"

Instead of clicking through the channels and
filling out items, a textual definition will be
generated and put it the "Add Items from
Textual Definition" page. That way, the expert
user can add their items by editing text with the
well-known syntax.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-12-08 17:40:25 +01:00
Tobias Bräutigam e26eac6656
CometVisu fixes (#590)
* use plain text type as the content is already serialized, also cleanup
the 404 page to avoid querying the rest api without being authorized

closes #509

Signed-off-by: Tobias Bräutigam <tbraeutigam@gmail.com>

* fix tile and remove wrong path from 404 page

Signed-off-by: Tobias Bräutigam <tbraeutigam@gmail.com>
2020-12-07 18:22:20 +01:00
Yannick Schaus 4508a88c2c
Add options to oh-map-page & fix initial positioning (#599)
Fixes #588.

Allows to select a tile provider from http://leaflet-extras.github.io/leaflet-providers/preview/
Close #589.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-12-07 14:44:58 +01:00
Yannick Schaus e7908dc9a3
Fix invert not applied on f7-icons in badges (#596)
Reported in https://community.openhab.org/t/openhab-3-0-milestone-4-discussion/109174/125

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-12-07 14:44:30 +01:00
Yannick Schaus 0ad5b1a843
Fix group settings not appearing when creating a group (#595)
Fix https://github.com/openhab/openhab-core/issues/1863

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-12-07 14:44:07 +01:00
Yannick Schaus 5a102830de
Don't include empty equipment when only Points are added (#593)
Fixes #583.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-12-07 14:42:36 +01:00
Wouter Born 9d1e435655
Use renamed OpenHABBundleServlet class (#594)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-07 10:34:19 +01:00
lolodomo 1bab2f7a3d
Semantics - illuminance property removed (#591)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2020-12-03 08:41:58 +01:00
Yannick Schaus 38a06d2e00
Add fragment option to oh-repeater (#582)
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-30 20:14:05 +01:00
Yannick Schaus cc4f6a6a8d
Widgets: add oh-repeater, dayjs to expression context (#581)
This adds a new oh-repeater to the system library, allowing
to iterate over arbitrary arrays, ranges, or items in a certain
group or having certain tags, with support for filtering and
mapping. The children components in the default slot will be
repeated for each iteration and the current element, along with
the index and source array, will be provided as variables to the
descendants.

Add dayjs to the expression context for powerful date manipulation
and formatting. The default locale will be dynamically loaded
from the current openHAB locale.
The following Day.js plugins are loaded:
- relativeTime
- calendar
- localizedFormat
- isoWeek
- isToday
- isYesterday
- isTomorrow
Other can be added on demand.

Try to find a f7-component relative to the oh-component and merge
their parameters during hinting.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-30 12:23:31 +01:00
Yannick Schaus f06ddeda63
Model cards: consider the more specialized equipment class (#578)
Fix #567.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-30 12:23:10 +01:00
Yannick Schaus ab3ba9e715
Fix #576 - apply default tags from channel or channel type (#577)
Still apply "Point" if none of the default tags is a Point.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-30 12:22:55 +01:00
Wouter Born 43b7f52798
Update LastNPE EEAs to 2.2.1 (#517)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-11-30 12:21:30 +01:00
Yannick Schaus 6a61115429
Fix multiple issues (#566)
Fix #563 - wrong expression completion objects + improve item name completion
Fix #559 - bug with model display when items don't have any metadata (non-semantic)
Fix #553 - delete parameters when unset in config sheet unless in special circumstances
Fix #549 - detect identical channel/channel type labels and adjust item name suggestions accordingly
Fix #543 - proritize channel description to channel type description in channel list
Fix #524 - add Call item type
Fix #490 - Add anyFormat=true to fetch icons - should fix #490
Fix #438 - Rename remaining instances of "equipments" in code
Fix problem with cell "on" parameter - reported in: https://community.openhab.org/t/wiki-building-pages-in-the-oh3-ui-documentation-draft-2-3/104392/92

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-28 22:19:27 +01:00
Kai Kreuzer d5e3b38a53
Remove Travis as a build system (#552)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-28 22:10:35 +01:00
Yannick Schaus 36924525ad
Introduce Mobile App interface (#565)
This introduces a few functions allowing apps embedding the web UI
in a WebView to interact with them and adjust part of its rendering.

More precisely, the UI will look for an `OHApp` object
(defined in `window`, for instance with `addJavascriptInterface`
for Android apps):
https://developer.android.com/guide/webapps/webview#BindingJavaScript

The `OHApp` object can define the following functions:

- `string preferTheme()`: if present, will be called during the
  initialization of the app, will force the theme - unless the user
  has made a choice on the About page. These values are allowed:
  `auto`, `ios`, `md` (Material Design/Android), `aurora` (desktop);
- `string preferDarkMode()`: if present, will be called during the
  initialization of the app, will force the color scheme - unless the
  user has made a choice on the About page. These values are
  allowed: `auto`, `light`, `dark`;
- `void pinToHome()`: if present, this will show an icon on the home
  page which will call this function when tapped;
- `void exitToApp()`: if present, this will show an icon on the home
  page which will call this function when tapped. It **replaces** the
  "Other Apps" icon showing the right-side panel.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-28 22:07:09 +01:00
Yannick Schaus a8fd16f8c9
Home page model cards rewrite (#562)
Refactored the experimental-grade code with some mixins,
better separated code.

Implements #555:
Allow the home page cards to be customized - reordered, grouped,
and edited, with config & slots and a dedicated editor.

Implements #556:
Add glance badges to the location cards (other types tbd.)
See #556 for the specifications on how to organize your model
to get the badges.

Styling fixes and cleanups.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-28 19:44:09 +01:00
lolodomo 69eede2135
[MainUI] Ontology update (#537)
Must follow the merge of openhab/openhab-core#1814

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2020-11-26 16:58:08 +01:00
Kai Kreuzer 0ebb8a4586
Removed HomeBuilder from the repo (#507)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-23 20:33:41 +01:00
lolodomo e26cbf4334
[basicui] Fix handling of options without label (#550)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2020-11-23 19:30:54 +01:00
Yannick Schaus e7a763b700
Add widgetOrder metadata, fixes (#544)
Add a new widgetOrder metadata namespace editor to configure a
*default* index-based widget order. (The cards on the home page
will also feature another, more visual way to influence the order
when they'll be rewritten.)

Expose visible/visibleTo on default widget metadata configuration
pages.
Known bug: counters on home page cards are not accurate when some
items are hidden with visible/visibleTo.

Add a mixin to sort items; use it on cards, model treeview, group
popup, add from model in layout pages.

Close #489.

Fix #533 - wrong call to render properties in location cards.

Fix #498 - make cards routable (has glitches).
(but will be superseded with the cards rewrite).

Fix #542 - allow to unset the options set by the default widget
routines. Fix action name ("analyze" -> "analyzer").

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-20 23:36:39 +01:00
Yannick Schaus c3b7f47569
Item metadata: add expire editor, change default widget logic (#540)
Disallow standalone widgets to be selected for list items (close #536).

Allow slight alterations to the default widgets suggested by the system
without reconfiguring it completely: if the metadata value is blank,
assume the default system-suggested widget is to be used and merge the
config found in the metadata.
Closes #534 (since now only the iconUseState option has to be set to
enable dynamic icons for Number items and similar).

Change the metadata namespace selection menu to only display the metadata
which is set in the metadata menu, and use an action sheet to add more.
This also paves the way for user-defined namespaces.

Move the metadata order out of the item edition card in the Model page,
into its own section.

Add metadata editor for the expire namespace
(https://github.com/openhab/openhab-core/issues/1620).

Reorder the sections of the item details page in a more logical manner
(semantic classification below the tags that define it).

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-19 21:02:06 +01:00
Yannick Schaus cd66d064a7
[skip ci] More orga spelling fixes & adjustments (#531)
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-18 01:33:49 +01:00
Yannick Schaus dae0086a0b
[skip ci] [orga] Further improvements to the issue templates & README (#530)
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-17 22:59:35 +01:00
Yannick Schaus 668bb82734
[skip ci] [orga] Fix spelling errors in issue menu
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-17 17:29:59 +01:00
Yannick Schaus 338e819196
[skip ci] [orga] Adjustments in README & templates (#528)
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-17 17:26:57 +01:00
Yannick Schaus ce79d887f5
[Orga] Add README, move directives & template issues (#527)
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-17 17:17:13 +01:00
Yannick Schaus cb02d57473
Fix multiple text parameter dereferencing (#526)
Fix #525.

Also should fix https://community.openhab.org/t/chatid-field-is-not-visible-in-the-telegram-bot-thing/108207.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-17 15:19:30 +01:00
Yannick Schaus 65808f4a76
Improve bulk operations, consistent delete UX (#522)
- Add bulk operations to the things list, allowing to remove,
disable or enable things
- Add bulk operations to the rules/scripts lists, ability to disable
or enable rules & scripts
- Add ability to delete a rule, script or item from its details
page
- Add ability to start checking objects for a bulk operation
("select mode") with Ctrl+click on desktops. Ctrl+click exits the
select mode automatically when the last checked object is deselected.

Closes #512.
Closes #506.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-17 11:45:25 +01:00
Yannick Schaus e0b96630f2
Fix several issues (#521)
Fix #520 - don't evaluate null values, move labels to computed properties
Fix #515 - don't overwrite labels, icons in default representations if set in config
Fix #514 - don't inherit layout page no-gap to rows/cols
Fix #513 - fix icon properties in oh-link, oh-button
Close #508 - display error if incorrect format for rules/scripts UIDs (no hard check)
Fix #505 - incorrect bottom margin in layout editor on Firefox
Close #500 - display current value in oh-slider-item
Close #488 - default to analyze action for dimensionless Number items in some circumstances
Fix #487 - dynamic icons for default list items (only certain item types)
Allow oh-button & oh-link contents to be customized w/ default slot
Allow oh-icon to receive dynamic updates
Fix wrong API Explorer icon in sidebar

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-17 09:53:19 +01:00
Yannick Schaus d445d9b7d0
Developer Sidebar (#437)
Allow administrators to open a sidebar with productivity tools that doesn't
get away when navigating around.

The developer sidebar is available from the developer tools menu
or anywhere with the Shift+Alt+D keyboard shortcut, if these two
conditions are met:

1. the user has an administrator role;
2. the width of the screen is >= 1280px.

Fix list index not updating correctly in rules/scripts lists
Fix links sometimes not appearing in item details

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-13 10:45:42 +01:00
Wouter Born 3b31d23976
[infrastructure] add external null-annotations (#470)
Add EEAs and fix null analysis errors.

Related to:

* openhab/openhab-core#888
* openhab/openhab-core#1775
* openhab/openhab-addons#8848

Signed-off-by: Wouter Born <github@maindrain.net>
2020-11-04 15:23:34 +01:00
Yannick Schaus 5963900848
Allow viewing non-editable scripts (#494)
Fixes #486.

Blockly: add oh_log block, change oh_sendcommand
to oh_event and allow to post updates.

Read-only script editor with lock icon & tooltip
if the script not editable (text-provisioned or Blockly).

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-02 12:29:34 +01:00