From bcd161e7746a0d96bb06d1767c93dd6b22eb5560 Mon Sep 17 00:00:00 2001 From: Yannick Schaus Date: Tue, 3 Mar 2020 13:12:10 +0100 Subject: [PATCH] Add some colors, improve navigation (#197) - 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 --- .../web/src/assets/i18n/en/empty-states.json | 7 ++- .../org.openhab.ui/web/src/components/app.vue | 62 ++++++++++++++----- .../config/controls/script-editor.vue | 1 + .../web/src/components/theme-switcher.vue | 6 +- .../components/widgets/modals/oh-sheet.vue | 2 +- .../src/components/widgets/widget-actions.js | 2 +- bundles/org.openhab.ui/web/src/css/app.styl | 55 +++++++++++++--- bundles/org.openhab.ui/web/src/js/routes.js | 13 ++++ .../org.openhab.ui/web/src/js/store/index.js | 6 +- .../org.openhab.ui/web/src/pages/about.vue | 57 +++++++++++++++++ .../web/src/pages/analyzer/analyzer.vue | 2 +- .../src/pages/developer/developer-tools.vue | 4 +- .../pages/developer/widgets/widget-edit.vue | 2 +- .../web/src/pages/page/layout-page.vue | 22 +++++-- .../items-add-from-textual-definition.vue | 5 +- .../settings/pages/layout/layout-edit.vue | 4 +- .../src/pages/settings/rules/rule-edit.vue | 2 +- .../web/src/pages/settings/settings-menu.vue | 6 ++ .../settings/things/add/choose-binding.vue | 7 ++- .../pages/settings/things/thing-details.vue | 2 +- .../things/zwave/zwave-network-popup.vue | 2 +- 21 files changed, 218 insertions(+), 51 deletions(-) diff --git a/bundles/org.openhab.ui/web/src/assets/i18n/en/empty-states.json b/bundles/org.openhab.ui/web/src/assets/i18n/en/empty-states.json index 7261e027d..a833d0bce 100644 --- a/bundles/org.openhab.ui/web/src/assets/i18n/en/empty-states.json +++ b/bundles/org.openhab.ui/web/src/assets/i18n/en/empty-states.json @@ -5,8 +5,8 @@ "things.title": "No things yet", "things.text": "Things are the devices and services connected to openHAB, they are provided by binding add-ons.

Installed bindings which support auto-discovery will add thing candidates to your Inbox. You can also start a scan for a certain binding or add your first thing manually with the button below.", - "things.nobindings.title": "No bindings installed", - "things.nobindings.text": "You need to install binding add-ons to be able to add things to your system.", + "things.nobindings.title": "No bindings", + "things.nobindings.text": "To add things to your system, you first need to install binding add-ons.", "model.title": "Start modelling your home", "model.text": "Build a model from your items to organize them and relate them to each other semantically.

Begin with a hierarchy of locations: buildings, outside areas, floors and rooms, as needed. Then, insert equipments and points from your things (or manually).", @@ -14,6 +14,9 @@ "items.title": "No items yet", "items.text": "Items represent the functional side of your home - you can link them to the channels defined by your things. Start with the Model view to create a clean initial structure.

You can also define items with configuration files, or with the button below.", + "items.add.title": "Define Items Above", + "items.add.text": "Use the openHAB item syntax to create new items or update them, as well as their metadata and links to channels. They will be stored in the internal database.", + "pages.title": "No pages yet", "pages.text": "Design pages to display information in various ways and interact with your items. You can create several kinds of pages: charts, sitemaps, floor plans...

Click the button below to create your first page.", diff --git a/bundles/org.openhab.ui/web/src/components/app.vue b/bundles/org.openhab.ui/web/src/components/app.vue index 98e7502b5..f05a9842b 100644 --- a/bundles/org.openhab.ui/web/src/components/app.vue +++ b/bundles/org.openhab.ui/web/src/components/app.vue @@ -12,12 +12,14 @@ - - + --> @@ -25,44 +27,54 @@ Administration - +
  • - +
  • - + @@ -135,14 +147,31 @@ height 50px .list margin-top 0 + .currentsection + background-color var(--f7-color-blue-tint) + color var(--f7-color-white) + --f7-list-chevron-icon-color var(--f7-color-white) + .icon + color var(--f7-color-white) !important + .theme-dark .panel-left .page background #232323 !important + .currentsection + background-color var(--f7-color-blue-shade) .logo background #111111 !important + .menu-sublinks color var(--f7-list-item-footer-text-color) + padding-left 0 + margin-bottom var(--f7-list-margin-vertical) + background-color red + // --f7-list-item-media-margin 24px + // --f7-list-item-padding-horizontal 32px + // --f7-list-chevron-icon-color var(--f7-color-blue-tint) !important + diff --git a/bundles/org.openhab.ui/web/src/pages/analyzer/analyzer.vue b/bundles/org.openhab.ui/web/src/pages/analyzer/analyzer.vue index dbb350c05..8071b19ad 100644 --- a/bundles/org.openhab.ui/web/src/pages/analyzer/analyzer.vue +++ b/bundles/org.openhab.ui/web/src/pages/analyzer/analyzer.vue @@ -1,5 +1,5 @@