iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 5.18 kB
JavaScript
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[6789],{2958:function(e,n,t){"use strict";t.r(n);t(30879);var r=t(50856),o=t(28426),i=(t(98762),t(22098),t(60010),t(11052)),a=t(1265);t(3426);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(['\n <style include="iron-flex ha-style">\n .content {\n padding-bottom: 24px;\n }\n\n ha-card {\n max-width: 600px;\n margin: 0 auto;\n margin-top: 24px;\n }\n h1 {\n @apply --paper-font-headline;\n margin: 0;\n }\n .error {\n color: var(--error-color);\n }\n .card-actions {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n .card-actions a {\n color: var(--primary-text-color);\n }\n [hidden] {\n display: none;\n }\n </style>\n <hass-subpage\n header="[[localize(\'ui.panel.config.cloud.forgot_password.title\')]]"\n >\n <div class="content">\n <ha-card\n header="[[localize(\'ui.panel.config.cloud.forgot_password.subtitle\')]]"\n >\n <div class="card-content">\n <p>\n [[localize(\'ui.panel.config.cloud.forgot_password.instructions\')]]\n </p>\n <div class="error" hidden$="[[!_error]]">[[_error]]</div>\n <paper-input\n autofocus=""\n id="email"\n label="[[localize(\'ui.panel.config.cloud.forgot_password.email\')]]"\n value="{{email}}"\n type="email"\n on-keydown="_keyDown"\n error-message="[[localize(\'ui.panel.config.cloud.forgot_password.email_error_msg\')]]"\n ></paper-input>\n </div>\n <div class="card-actions">\n <ha-progress-button\n on-click="_handleEmailPasswordReset"\n progress="[[_requestInProgress]]"\n >[[localize(\'ui.panel.config.cloud.forgot_password.send_reset_email\')]]</ha-progress-button\n >\n </div>\n </ha-card>\n </div>\n </hass-subpage>\n ']);return c=function(){return e},e}function l(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function u(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,n){return(f=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function p(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=y(e);if(n){var o=y(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return d(this,t)}}function d(e,n){return!n||"object"!==s(n)&&"function"!=typeof n?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):n}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&f(e,n)}(a,e);var n,t,o,i=p(a);function a(){return l(this,a),i.apply(this,arguments)}return n=a,o=[{key:"template",get:function(){return(0,r.d)(c())}},{key:"properties",get:function(){return{hass:Object,email:{type:String,notify:!0,observer:"_emailChanged"},_requestInProgress:{type:Boolean,value:!1},_error:{type:String,value:""}}}}],(t=[{key:"_emailChanged",value:function(){this._error="",this.$.email.invalid=!1}},{key:"_keyDown",value:function(e){13===e.keyCode&&(this._handleEmailPasswordReset(),e.preventDefault())}},{key:"_handleEmailPasswordReset",value:function(){var e=this;this.email&&this.email.includes("@")||(this.$.email.invalid=!0),this.$.email.invalid||(this._requestInProgress=!0,this.hass.callApi("post","cloud/forgot_password",{email:this.email}).then((function(){e._requestInProgress=!1,e.fire("cloud-done",{flashMessage:e.hass.localize("ui.panel.config.cloud.forgot_password.check_your_email")})}),(function(n){return e.setProperties({_requestInProgress:!1,_error:n&&n.body&&n.body.message?n.body.message:"Unknown error"})})))}}])&&u(n.prototype,t),o&&u(n,o),a}((0,a.Z)((0,i.I)(o.H3)));customElements.define("cloud-forgot-password",h)}}]);
//# sourceMappingURL=chunk.88b62dac9a01406982d5.js.map