Split heavy dependencies away from the entrypoint
by using dynamic imports at critical places along with
some cleanup.
Also replace crypto-based `uuidv4()` by `f7.utils.id()`.
This reduces the main app.js by more than 25%
(from >2 MB to around 1.4 MB).
Add npm script to launch the Webpack bundle
analyzer (`npm run webpack-analyzer`) after a
production build.
Signed-off-by: Yannick Schaus <github@schaus.net>
* Unlock administration pages after authorization
* Support PKCE (RFC 7636)
Depends on https://github.com/openhab/openhab-core/pull/1389.
Implements an OAuth2 authorization flow and token storage.
Hides the admin pages & links until the user is signed in
with an administrator role.
Signed-off-by: Yannick Schaus <github@schaus.net>
- Add colored indicator for current section in sidebar
- Filled (colored) navbars by default in Aurora theme
- Fix filled navbar on iOS
- Prevent f7 swipe back on iOS since Safari does it natively
- Improve routes to avoid switching sections, fix navigation
- Close on escape key hit for most popups
- Back link when navigating to a page from another page
- Edit link in page view (ultimately only when authorized...)
- Button to purge cache/service workers in about page
- Deindent block of code with shift-tab in CodeMirror
- Tweak colors in settings menu
- Hide the non-functional sitemaps from the sidebar (for now)
Signed-off-by: Yannick Schaus <github@schaus.net>
Widget infrastructure:
- Add Vuex & move state tracking to store
- Add actions mixin: navigate, open page/widget in modal,
send command, toggle item, open URL...
- Add support for including custom widgets in components
(pages and other widgets)
Config sheet & parameters:
- Add support for page/widget selection
- Add support for props configuration
Developer tools:
- Add menu
- Add widget editor
Code editor:
- Change CodeMirror theme in dark mode
Layout pages:
- Move context menus callbacks from events to context object
- Add Ctrl-R shortcut in design to toggle "run mode" (preview)
- Add ability to add custom widgets to layouts
Widgets:
- System library: add OhButton, OhLink, OhList, OhListItem,
OhPlayerControls, OhStepper, OhSwiper, OhSwiperSlide
- Standard library: improve OhLabelCard, add OhListCard,
OhPlayerCard, OhSliderCard, OhStepperCard, OhToggleCard
Misc:
- Allow Ctrl-S to save in rule editor, pages editors (sitemap,
layout), widget editor in create mode
- Add labels for keyboard shortcuts (in desktop mode only)
Signed-off-by: Yannick Schaus <github@schaus.net>
Mixins for widget components (expression parsing...)
& pages (state tracking with /rest/events/states)
Layout page designer with grid view & masonry + YAML
code editor.
Add layout pages to sidebar
A few basic widgets (to expand)
Widget sandbox in developer tools w/ YAML code view
Add YAML code view to rule editor
Don't save names and descriptions of rule module
if they match the suggestions
Signed-off-by: Yannick Schaus <github@schaus.net>
This adds a new Pages section as discussed in
https://github.com/openhab/openhab-webui/issues/155#issuecomment-586711180
with an editor for "managed" sitemaps stored
as UI components in the system:sitemap namespace.
A code view supporting the current sitemap DSL
is provided.
Sitemaps made with the UI don't support visibility
or color rules yet.
Signed-off-by: Yannick Schaus <github@schaus.net>
Move the Inbox concept, which is closely related to Things,
from the top-level to a level of indirection below the Things list.
Red badges and buttons are displayed to clearly highlight and
navigate to the Inbox when there is something in it.
Additionally, the number of inbox entries (auto-discovered things)
for a given binding is displayed in the "choose binding" page when
adding a thing.
Signed-off-by: Yannick Schaus <github@schaus.net>
Add information on how to start when there's nothing
to display on a page - a common UX pattern which helps
users figure out what they need to do.
https://uxdesign.cc/writing-empty-states-3e0279f39066https://material.io/design/communication/empty-states.html
Fix search in rules screens.
Adjust positions of lists across screens.
Detect when the rules engine is not installed and display
a message accordingly.
Signed-off-by: Yannick Schaus <github@schaus.net>
Shortcut to install new bindings when adding a thing
Inbox listens to SSE and refreshes automatically
Refresh constantly the discovery results when scanning
Fix search in manual thing type selection
Improve look & feel of add-on screens and sheet
Signed-off-by: Yannick Schaus <github@schaus.net>
After adding things after a series of pages, f7's router will sometimes
act up and display a backdrop on the main view and then freeze the UI,
only a page refresh would get it working back again.
These changes seem to help at least in these cases.
Signed-off-by: Yannick Schaus <github@schaus.net>
Fix a flaw in the channel list rendering
where a dynamically provided channel was
not appearing unless its type was extensible.
It was previously assumed that all
non-extensible channel types would appear
in the thing type's "channelGroups" or
"channels" property.
Some bindings have ChannelTypeProviders
which will define thing-specific channels
along with channel types which don't
appear on the thing type object. Example:
the "input" channel of the yamahareceiver
binding's zone thing.
The channel-list component now has a
mandatory "channelTypes" prop which must
be provided by the parent component. This
prop should contain an array of channel types
that can appear for the thing. It should be
retrieved using the /rest/channel-types API
call, eventually using the "prefixes" filter;
providing channel types prefixed by "system"
or the binding id should be enough.
This PR thus depends on:
https://github.com/openhab/openhab-core/pull/1340).
More filters were also added to relevant places.
In the "add equipment/points from thing"
screens, the prefix of the name suggestions
for the Point items will now be the name of the
parent Equipment if available (instead of the
normalized thing's label).
Signed-off-by: Yannick Schaus <github@schaus.net>
Actions are displayed as list buttons instead of FAB on large screens
Clear the selection in the tree by clicking in the blank area
Other minor fixes
Signed-off-by: Yannick Schaus <github@schaus.net>
* Cosmetic changes, handle static files in UIService
Restore the serving of static files through the UIService
(the Jetty handler doesn't seem to take precedence).
Add missing images for Basic UI and CometVisu,
cleanup temporary screenshot images.
Add description and author info for the Cordova app.
Rename "default UI" to "main UI".
Add version info in webapp initialization.
Adjust HABPanel dependencies.
Update README.md and CONTRIBUTING.md files.
Signed-off-by: Yannick Schaus <github@schaus.net>
This add the UI in its current state of development,
the intent is to test the integration in the distro
early. The other apps are listed on the home page by
calling the new REST endpoint introduced in
https://github.com/openhab/openhab-core/pull/1329
The onboarding wizard implementation is not complete
so it isn't possible to select a startup package with
the UI yet. The wizard steps will be discussed in a
separate issue; it should however be possible to install
addons as needed from the settings screen.
Signed-off-by: Yannick Schaus <github@schaus.net>
* Remove all dependencies to the dashboard UI
Migrate all dashboard tiles to the core tile functionality
(https://github.com/openhab/openhab-core/pull/1329)
Signed-off-by: Yannick Schaus <github@schaus.net>
For bnd 4.3.0 release notes, see:
https://github.com/bndtools/bnd/wiki/Changes-in-4.3.0
Also note:
The Bnd Maven plugins are now marked thread safe and can be used with -T.
It seems to work well so far as long as the features are build after the bundles so I've added the bundles BOM as dependency to the features POM.
We still need to make SAT thread safe (openhab/static-code-analysis#200).
When disabling SAT you can build using one thread per processor core by executing:
mvn clean install -DskipChecks -T 1C
This significantly speeds up Maven builds and puts all your processor cores to good use. :-)
Signed-off-by: Wouter Born <github@maindrain.net>