homebridge-config-ui-x
Version:
A web based management, configuration and control platform for Homebridge.
2 lines (1 loc) • 3.01 kB
JavaScript
import{a as C}from"./chunk-M5NPMQ5Y.js";import{$c as k,Ea as l,Mb as f,Nb as g,Ra as m,X as p,Yc as v,Zc as h,aa as i,dc as u,dd as y,ec as x,ha as c,mb as a,nb as o,ob as d}from"./chunk-LTGI3NYM.js";import{g as w,h as s}from"./chunk-B4AJQJMI.js";var P=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275cmp=m({type:e,selectors:[["app-spinner"]],decls:8,vars:3,consts:[["role","status","aria-live","polite","aria-busy","true",1,"app-spinner-container"],[1,"visually-hidden"],["aria-hidden","true",1,"animate_loader"],["xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink","width","200px","height","200px","viewBox","0 0 100 100","preserveAspectRatio","xMidYMid","focusable","false","aria-hidden","true",1,"spinner-svg"],["cx","50","cy","50","r","32","stroke-width","8","stroke-dasharray","50.26548245743669 50.26548245743669","fill","none","stroke-linecap","round",1,"spinner_outer"],["cx","50","cy","50","r","23","stroke-width","8","stroke","#f8b26a","stroke-dasharray","36.12831551628262 36.12831551628262","stroke-dashoffset","36.12831551628262","fill","none","stroke-linecap","round",1,"spinner_inner"]],template:function(t,r){t&1&&(a(0,"div",0)(1,"span",1),f(2),u(3,"translate"),o(),a(4,"div",2),c(),a(5,"svg",3),d(6,"circle",4)(7,"circle",5),o()()()),t&2&&(l(2),g(x(3,1,"common.a11y.loading")))},dependencies:[h],styles:[".app-spinner-container[_ngcontent-%COMP%]{position:absolute;inset:0 0 0 60px;display:flex;align-items:center;justify-content:center;z-index:1000}@media(max-width:767px){.app-spinner-container[_ngcontent-%COMP%]{left:0;top:65px}}.animate_loader[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;inset:0;margin:auto;width:200px;overflow:visible}.spinner-svg[_ngcontent-%COMP%]{margin:auto;display:block}@keyframes _ngcontent-%COMP%_spinner-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_spinner-rotate-reverse{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}.spinner_outer[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_spinner-rotate 2.5s linear infinite;transform-origin:50px 50px}.spinner_inner[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_spinner-rotate-reverse 2.5s linear infinite;transform-origin:50px 50px}"],changeDetection:0})}return e})();var b=w(C(),1);var I=(()=>{class e{$api=i(y);$toastr=i(k);$translate=i(v);downloadBackup(){return s(this,null,function*(){let n=yield this.$api.get("/backup/download",{observe:"response",responseType:"blob"}),t=n.headers.get("File-Name")||"homebridge-backup.tar.gz",r=n.body.size;if(r>globalThis.backup.maxBackupSize){let _=this.$translate.instant("backup.backup_exceeds_max_size",{maxBackupSizeText:globalThis.backup.maxBackupSizeText,size:`${(r/1048576).toFixed(1)}MB`});this.$toastr.warning(_,this.$translate.instant("toast.title_warning"))}(0,b.saveAs)(n.body,t)})}static \u0275fac=function(t){return new(t||e)};static \u0275prov=p({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{P as a,I as b};