mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Frontend: Improve sidebar reliability on touch devices
This commit is contained in:
parent
7a7ede22ea
commit
5316762a64
@ -1,2 +1,2 @@
|
||||
""" DO NOT MODIFY. Auto-generated by build_frontend script """
|
||||
VERSION = "9e4807d493dcb52e24dcd5163e6a2d4b"
|
||||
VERSION = "fe75bfc72100af74c19fa02c000f6f63"
|
||||
|
@ -6258,7 +6258,7 @@ function(t,e){"use strict";function r(t,e){if(Array.isArray(t))return t;if(Symbo
|
||||
function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}function o(t,e){var r=e.pane,n=e.filter,i=void 0===n?null:n;return c.toImmutable({pane:r,filter:i})}function a(t){return _.getInitialState()}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(/*! nuclear-js */1),f=r(/*! ../action-types */27),l=n(f),h=function(t){function e(){i(this,e),null!=t&&t.apply(this,arguments)}return u(e,t),s(e,[{key:"getInitialState",value:function(){return c.toImmutable({pane:"states",filter:null})}},{key:"initialize",value:function(){this.on(l["default"].NAVIGATE,o),this.on(l["default"].LOG_OUT,a)}}]),e}(c.Store),_=new h;e["default"]=_,t.exports=e["default"]},/*!********************************************!*\
|
||||
!*** ./src/modules/navigation/url-sync.js ***!
|
||||
\********************************************/
|
||||
function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(){if("/"===location.pathname){var t=c["default"].evaluate(f.activePane),e=c["default"].evaluate(f.activeFilter),r=_["default"](t,e);history.replaceState({pane:t,filter:e},d,r)}else{var n=v["default"](location.pathname.substr(1)),t=n.pane,e=n.filter;l.navigate(t,e)}}function u(t){var e=t.state,r=e.pane,n=e.filter;l.navigate(r,n)}function o(){m&&(i(),y=c["default"].observe(f.activePage,function(t){var e=v["default"](t);(e.pane!==history.state.pane||e.filter!=history.state.filter)&&history.pushState(e,d,"/"+t)}),window.addEventListener("popstate",u))}function a(){m&&(y&&y(),window.removeEventListener("popstate",u))}Object.defineProperty(e,"__esModule",{value:!0}),e.startSync=o,e.stopSync=a;var s=r(/*! ../../flux */2),c=n(s),f=r(/*! ./getters */29),l=r(/*! ./actions */28),h=r(/*! ./pane-filter-to-page */30),_=n(h),p=r(/*! ./page-to-pane-filter */73),v=n(p),d="Home Assistant",y=void 0,m=history.pushState&&!0},/*!*********************************************!*\
|
||||
function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(){var t=void 0,e=void 0,r=void 0;if("/"===location.pathname)t=c["default"].evaluate(f.activePane),e=c["default"].evaluate(f.activeFilter),r=_["default"](t,e);else{var n=v["default"](location.pathname.substr(1));t=n.pane,e=n.filter,r=location.pathname,l.navigate(t,e)}history.replaceState({pane:t,filter:e},d,r)}function u(t){var e=t.state,r=e.pane,n=e.filter;l.navigate(r,n)}function o(){m&&(i(),y=c["default"].observe(f.activePage,function(t){var e=v["default"](t);(e.pane!==history.state.pane||e.filter!=history.state.filter)&&history.pushState(e,d,"/"+t)}),window.addEventListener("popstate",u))}function a(){m&&(y&&y(),window.removeEventListener("popstate",u))}Object.defineProperty(e,"__esModule",{value:!0}),e.startSync=o,e.stopSync=a;var s=r(/*! ../../flux */2),c=n(s),f=r(/*! ./getters */29),l=r(/*! ./actions */28),h=r(/*! ./pane-filter-to-page */30),_=n(h),p=r(/*! ./page-to-pane-filter */73),v=n(p),d="Home Assistant",y=void 0,m=history.pushState&&!0},/*!*********************************************!*\
|
||||
!*** ./src/modules/notification/actions.js ***!
|
||||
\*********************************************/
|
||||
function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){o["default"].dispatch(s["default"].NOTIFICATION_CREATED,{message:t})}Object.defineProperty(e,"__esModule",{value:!0}),e.createNotification=i;var u=r(/*! ../../flux */2),o=n(u),a=r(/*! ./action-types */31),s=n(a)},/*!*********************************************!*\
|
||||
@ -17693,20 +17693,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
'loginButton.click': 'validatePassword',
|
||||
},
|
||||
|
||||
// attached: function() {
|
||||
// this.focusPassword();
|
||||
// },
|
||||
|
||||
isValidatingChanged: function(newVal) {
|
||||
if (!newVal) {
|
||||
setTimeout(this.focusPassword.bind(this), 0);
|
||||
this.debounce('focus-password', function() {
|
||||
this.$.passwordInput.focus();
|
||||
}.bind(this), 1);
|
||||
}
|
||||
},
|
||||
|
||||
focusPassword: function() {
|
||||
this.$.passwordInput.focus();
|
||||
},
|
||||
|
||||
passwordKeyDown: function(ev) {
|
||||
// validate on enter
|
||||
if(ev.keyCode === 13) {
|
||||
@ -20381,6 +20375,62 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
<dom-module id="ha-voice-command-progress" assetpath="components/">
|
||||
<style>
|
||||
:host {
|
||||
display: block;
|
||||
}
|
||||
|
||||
iron-icon {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.interimTranscript {
|
||||
color: darkgrey;
|
||||
}
|
||||
|
||||
.listening paper-spinner {
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<iron-icon icon="av:hearing"></iron-icon>
|
||||
<span>{{finalTranscript}}</span>
|
||||
<span class="interimTranscript">[[interimTranscript]]</span>
|
||||
<paper-spinner active$="[[isTransmitting]]" alt="Sending voice command to Home Assistant"></paper-spinner>
|
||||
</template>
|
||||
|
||||
</dom-module>
|
||||
|
||||
<script>
|
||||
(function(){
|
||||
var voiceGetters = window.hass.voiceGetters;
|
||||
|
||||
Polymer({
|
||||
is: 'ha-voice-command-progress',
|
||||
|
||||
behaviors: [nuclearObserver],
|
||||
|
||||
properties: {
|
||||
isTransmitting: {
|
||||
type: Boolean,
|
||||
bindNuclear: voiceGetters.isTransmitting,
|
||||
},
|
||||
|
||||
interimTranscript: {
|
||||
type: String,
|
||||
bindNuclear: voiceGetters.extraInterimTranscript,
|
||||
},
|
||||
|
||||
finalTranscript: {
|
||||
type: String,
|
||||
bindNuclear: voiceGetters.finalTranscript,
|
||||
},
|
||||
},
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
<dom-module id="partial-states" assetpath="layouts/">
|
||||
<style>
|
||||
.content-wrapper {
|
||||
@ -20424,9 +20474,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
|
||||
<div class="content-wrapper">
|
||||
<div class="listening" hidden$="[[!showListenInterface]]" on-click="handleListenClick">
|
||||
<iron-icon icon="av:hearing"></iron-icon> <span>{{finalTranscript}}</span>
|
||||
<span class="interimTranscript">[[interimTranscript]]</span>
|
||||
<paper-spinner active$="[[isTransmitting]]" alt="Sending voice command to Home Assistant"></paper-spinner>
|
||||
<ha-voice-command-progress></ha-voice-command-progress>
|
||||
</div>
|
||||
|
||||
<state-cards states="[[states]]">
|
||||
@ -20500,21 +20548,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
bindNuclear: voiceGetters.isListening,
|
||||
},
|
||||
|
||||
isTransmitting: {
|
||||
type: Boolean,
|
||||
bindNuclear: voiceGetters.isTransmitting,
|
||||
},
|
||||
|
||||
interimTranscript: {
|
||||
type: String,
|
||||
bindNuclear: voiceGetters.extraInterimTranscript,
|
||||
},
|
||||
|
||||
finalTranscript: {
|
||||
type: String,
|
||||
bindNuclear: voiceGetters.finalTranscript,
|
||||
},
|
||||
|
||||
showListenInterface: {
|
||||
type: Boolean,
|
||||
bindNuclear: [
|
||||
@ -25098,8 +25131,7 @@ paper-ripple {
|
||||
<paper-icon-button hidden=""></paper-icon-button>
|
||||
<div class="title">Home Assistant</div>
|
||||
</paper-toolbar>
|
||||
|
||||
<paper-menu id="menu" on-iron-select="menuSelect" selectable="[data-panel]" attr-for-selected="data-panel" selected="[[selected]]">
|
||||
<paper-menu id="menu" selected="{{menuSelected}}" selectable="[data-panel]" attr-for-selected="data-panel">
|
||||
<paper-icon-item data-panel="states">
|
||||
<iron-icon item-icon="" icon="apps"></iron-icon> States
|
||||
</paper-icon-item>
|
||||
@ -25164,9 +25196,15 @@ paper-ripple {
|
||||
behaviors: [nuclearObserver],
|
||||
|
||||
properties: {
|
||||
menuSelected: {
|
||||
type: String,
|
||||
observer: 'menuSelectedChanged',
|
||||
},
|
||||
|
||||
selected: {
|
||||
type: String,
|
||||
bindNuclear: navigationGetters.activePage,
|
||||
observer: 'selectedChanged',
|
||||
},
|
||||
|
||||
possibleFilters: {
|
||||
@ -25189,8 +25227,16 @@ paper-ripple {
|
||||
},
|
||||
},
|
||||
|
||||
menuSelect: function(ev, detail, sender) {
|
||||
this.selectPanel(ev.target.selected);
|
||||
menuSelectedChanged: function(newVal) {
|
||||
if (this.selected !== newVal) {
|
||||
this.selectPanel(newVal);
|
||||
}
|
||||
},
|
||||
|
||||
selectedChanged: function(newVal) {
|
||||
if (this.menuSelected !== newVal) {
|
||||
this.menuSelected = newVal;
|
||||
}
|
||||
},
|
||||
|
||||
handleDevClick: function(ev, detail, sender) {
|
||||
@ -25367,7 +25413,6 @@ paper-ripple {
|
||||
<script>
|
||||
(function() {
|
||||
var uiActions = window.hass.uiActions;
|
||||
var authGetters = window.hass.authGetters;
|
||||
var syncGetters = window.hass.syncGetters;
|
||||
var preferences = window.hass.localStoragePreferences;
|
||||
|
||||
|
@ -53,10 +53,8 @@
|
||||
<paper-icon-button hidden></paper-icon-button>
|
||||
<div class="title">Home Assistant</div>
|
||||
</paper-toolbar>
|
||||
|
||||
<paper-menu id='menu' on-iron-select='menuSelect'
|
||||
selectable='[data-panel]' attr-for-selected='data-panel'
|
||||
selected='[[selected]]'>
|
||||
<paper-menu id='menu' selected='{{menuSelected}}'
|
||||
selectable='[data-panel]' attr-for-selected='data-panel'>
|
||||
<paper-icon-item data-panel='states'>
|
||||
<iron-icon item-icon icon='apps'></iron-icon> States
|
||||
</paper-icon-item>
|
||||
@ -127,9 +125,15 @@
|
||||
behaviors: [nuclearObserver],
|
||||
|
||||
properties: {
|
||||
menuSelected: {
|
||||
type: String,
|
||||
observer: 'menuSelectedChanged',
|
||||
},
|
||||
|
||||
selected: {
|
||||
type: String,
|
||||
bindNuclear: navigationGetters.activePage,
|
||||
observer: 'selectedChanged',
|
||||
},
|
||||
|
||||
possibleFilters: {
|
||||
@ -152,8 +156,16 @@
|
||||
},
|
||||
},
|
||||
|
||||
menuSelect: function(ev, detail, sender) {
|
||||
this.selectPanel(ev.target.selected);
|
||||
menuSelectedChanged: function(newVal) {
|
||||
if (this.selected !== newVal) {
|
||||
this.selectPanel(newVal);
|
||||
}
|
||||
},
|
||||
|
||||
selectedChanged: function(newVal) {
|
||||
if (this.menuSelected !== newVal) {
|
||||
this.menuSelected = newVal;
|
||||
}
|
||||
},
|
||||
|
||||
handleDevClick: function(ev, detail, sender) {
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit f8fb1d0440ac0d7aebbed3b43dd100462487c228
|
||||
Subproject commit 14f2bb779eb165bce236dcdc69d83e08ab73da1c
|
@ -37,7 +37,6 @@
|
||||
<script>
|
||||
(function() {
|
||||
var uiActions = window.hass.uiActions;
|
||||
var authGetters = window.hass.authGetters;
|
||||
var syncGetters = window.hass.syncGetters;
|
||||
var preferences = window.hass.localStoragePreferences;
|
||||
|
||||
|
@ -116,20 +116,14 @@
|
||||
'loginButton.click': 'validatePassword',
|
||||
},
|
||||
|
||||
// attached: function() {
|
||||
// this.focusPassword();
|
||||
// },
|
||||
|
||||
isValidatingChanged: function(newVal) {
|
||||
if (!newVal) {
|
||||
setTimeout(this.focusPassword.bind(this), 0);
|
||||
this.debounce('focus-password', function() {
|
||||
this.$.passwordInput.focus();
|
||||
}.bind(this), 1);
|
||||
}
|
||||
},
|
||||
|
||||
focusPassword: function() {
|
||||
this.$.passwordInput.focus();
|
||||
},
|
||||
|
||||
passwordKeyDown: function(ev) {
|
||||
// validate on enter
|
||||
if(ev.keyCode === 13) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user