* Move the login hint in the sidebar
Displayed only when there are no pages - if there are, it means the admin
user already found the button.
Closes#254.
Change some label texts & empty overview icon.
Make the whole logo area clickable.
Display an indicator when there are no pages to display on the sidebar.
Signed-off-by: Yannick Schaus <github@schaus.net>
Move duplicated code in page editors and modals
to mixins.
Move the general page settings form to a common
component.
This also introduces two new common config parameters:
- `visibleTo` allows to restrict the visibility of
pages or widgets to certain users or roles. It
accepts an array with strings like:
`["user:user1", "role:administrator"]`
Multiple entries are "OR"ed - the component will be
displayed if any matches.
If the parameter is not present, the component
is visible by default (even to unauthenticated users).
This parameter is available to widgets which accept
expressions in their configuration (typically in
layout pages).
- `visible` allows to restrict the visibility of
a widget based on the result of the evaluation of an
expression. For example:
`visible: "=items.Item1.state == 'ON'"`
This allows to build dynamic pages e.g. by setting
this property on blocks, grid rows or columns, or
individual widgets which will appear or disappear
typically based on the state of an item.
This property is not evaluated for top-level pages or
widgets that don't support expressions (charts etc.).
Note that these only restrict the visibility and are not
to be considered as security measures.
Allow to specify `visibleTo` as a general page setting.
Contact-style pages list, allow to group by type
Add visibleTo indication and sidebar order badges
Add pages counter to settings menu
Remove highlight on segmented button controls
(rollershutter, player controls)
Minor lists layout fixes
Move widget config & code editors to components
Restore config sheets on plan & chart page editors
Signed-off-by: Yannick Schaus <github@schaus.net>
Depends on https://github.com/openhab/openhab-core/pull/1451.
Change the rules list to a "contacts" list with initials in
headers and a list index.
Add a lock icon to denote rules which cannot be edited with the
rule editor.
Strip all editing features in the rule editor when the rule is
not editable.
Move the module title/description suggestions to a mixin and add
the new group member triggers.
Fix bug, look & feel in tag editor.
Signed-off-by: Yannick Schaus <github@schaus.net>
- Fix router issues when page animations are disabled
- Change some texts and fix some issues on the about page.
- Remove debug leftover
Signed-off-by: Yannick Schaus <github@schaus.net>
- Remove unused language headers from HABotResource
- Remove redundant this references in HABotResource
Signed-off-by: Wouter Born <github@maindrain.net>
Leverage the chart component used in pages to
provide an interactive persistence analysis
for arbitrary items, including Numbers, Switches,
Contacts and others (and eventually save the
resulting chart as a page).
WIP: better tooltips (to complete in subsequent PRs
for other types of series).
Add trend lines to default quantifiable numbers cards.
Fix state trackers not properly closed:
The number of state tracker connections would increase when returning to
the thing details page from a link details page.
Also make sure there's only 1 state tracker SSE connection at a given
time - close them before opening a new one.
Decrease the level of most log messages to debug.
Add no-gap to oh-grid-row
Upgrade Framework7 to 5.7.2.
Remove old analyzer components
Add analyze to widget actions
Fix item parameter in multiple mode
No state preview for items being created in model
Better mobile flow when creating new items in tree view pages
Add analyze button for Dimmers
Signed-off-by: Yannick Schaus <github@schaus.net>
Move the UI tiles back to the right panel, and display
a placeholder in the home page's overview tab until a
layout page with an ID of "overview" has been created.
This is (normally?) temporary until a specially-designed
overview page has been implemented - discussion on
https://github.com/openhab/openhab-webui/issues/155).
Various styling fixes & clean up.
Move the onboarding cards to separate component
(not used for now).
Don't display the Back button in a page view if it's shown
on the sidebar.
Layout pages: switch the "add widget" action sheet from
grid to simple list with groups, headers and cancel button.
Signed-off-by: Yannick Schaus <github@schaus.net>
Remove the ability to close script editors with the ESC key
Save the code being edited when saving the rule (for instance
with Ctrl-S/Cmd-S)
Add Ctrl-R/Cmd-R keyboard shortcut to run the rule
Fix player controls & add oh-player-card as default for Player items
Don't display the title/track part of the player card until items
are set; otherwise only display the playback controls
Add the ability (unstable/not documented for now) to use standard
widgets in modals
Fix modal config not being considered in popover
Fix default slider control min/max bounds using stateDescription
auth: check the token validity when the app becomes visible again
and renew it if necessary
Remove test card widget
Fix rule module reordering
Signed-off-by: Yannick Schaus <github@schaus.net>
Add the ability to edit metadata from the items details page
and the semantic model page:
- Provide interactive forms for the alexa, ga, synonyms, widget,
listwidget, stateDescription, commandDescription namespaces
- Fallback to YAML view for other namespaces (or in a tab for
supported namespaces as an alternative).
Add "options" widget action to open an action sheet with a list
of command options.
Add default representation for items: look in the widget for
a preconfigured widget (custom or from the standard library),
or try to build a default live representation of the item's state
(WIP), considering its type, state/command descriptions and
other properties.
Change the "current state" part of the items details & link edit
pages with the default representation.
Add a convenient way to add or remove members to/from a group item.
Real-time state display to model and thing details pages
Add rollershutter system control and card to standard library
Add default state representation and metadata editing to
the items details pane in the model page
Misc fixes, improve mobile-friendliness of model page
Harmonize actions below cards, fix homepage hamburger menu
Signed-off-by: Yannick Schaus <github@schaus.net>
- Don't include the start time of the next period
- Don't include the first day of the next month in calendars
- Fix weekly aggregate series
- Fix rounding bug when abs(point) >= 1000
Signed-off-by: Yannick Schaus <github@schaus.net>
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>