@sync-in/server
Version:
The secure, open-source platform for file storage, sharing, collaboration, and sync
2 lines (1 loc) • 2.96 kB
JavaScript
import{j as q}from"./chunk-T42BV6TR.js";import"./chunk-E32J777S.js";import{k as W,l as F}from"./chunk-RTNEBRKJ.js";import"./chunk-JXZCNFW7.js";import"./chunk-HGODIZTV.js";import"./chunk-6WMXMIE4.js";import"./chunk-B6HQYQYG.js";import"./chunk-GWRAGN3M.js";import"./chunk-27Z3SYRL.js";import"./chunk-O3YLAEVE.js";import{b as L,e as P}from"./chunk-QHJT5H4M.js";import{Cd as T,Eb as d,Ed as E,Ia as h,Jd as R,Kd as U,Oa as n,Rb as f,Tb as w,Xb as v,Yb as k,Zb as _,ab as g,fd as S,he as D,ja as a,jd as M,kc as b,mc as y,od as C,pe as N,qg as I,rb as r,sb as i,tb as o,ub as l,yd as A}from"./chunk-D55YR5X7.js";import"./chunk-SDJNZULP.js";import"./chunk-2YQ4SX3A.js";import"./chunk-DM4NXKEP.js";import"./chunk-ZIJQRARU.js";import"./chunk-KAVP6UXH.js";var $=(()=>{let t=class t{constructor(){this.locale=a(E),this.logoUrl=W,this.linkProtected=F,this.icons={faKey:D,faSignInAlt:N},this.passwordMinLength=8,this.password="",this.activatedRoute=a(L),this.linksService=a(q),this.activatedRoute.params.subscribe(c=>this.uuid=c.uuid)}validPassword(){this.password&&this.password.length>=this.passwordMinLength&&this.linksService.linkAuthentication(this.uuid,this.password).subscribe(()=>this.password="")}};t.\u0275fac=function(s){return new(s||t)},t.\u0275cmp=g({type:t,selectors:[["app-public-link-auth"]],decls:17,vars:11,consts:[[1,"link-page"],[1,"header"],["routerLink",""],["alt","","height","40",3,"src"],[1,"d-flex","flex-column","align-items-center",2,"margin","1.2rem 1rem"],["alt","","height","96",1,"cursor-pointer",3,"click","src"],[1,"d-flex","flex-column","align-items-center","mt-2","ms-auto","me-auto"],[1,"input-group",2,"max-width","200px"],["autocomplete","off","type","password","required","",1,"form-control","border-0",3,"ngModelChange","keyup.enter","ngModel","placeholder"],["type","button",1,"btn","btn-default","btn-custom","border-0",3,"click","disabled"],[3,"icon"],[1,"error-text","no-select"],[1,"hr"],["l10nTranslate","",1,"solve"]],template:function(s,e){s&1&&(i(0,"div",0)(1,"div",1)(2,"a",2),l(3,"img",3),o()(),i(4,"div",4)(5,"img",5),d("click",function(){return e.validPassword()}),o()(),i(6,"div",6)(7,"div",7)(8,"input",8),b(9,"translate"),_("ngModelChange",function(u){return k(e.password,u)||(e.password=u),u}),d("keyup.enter",function(){return e.validPassword()}),o(),i(10,"button",9),d("click",function(){return e.validPassword()}),l(11,"fa-icon",10),o()()(),i(12,"div",11),l(13,"span",12),i(14,"div")(15,"span",13),w(16,"This access is protected by a password"),o()()()()),s&2&&(n(3),r("src",e.logoUrl,h),n(2),r("src",e.linkProtected,h),n(3),f("is-invalid",(e.password==null?null:e.password.length)<e.passwordMinLength),v("ngModel",e.password),r("placeholder",y(9,8,"Password",e.locale.language)),n(2),r("disabled",(e.password==null?null:e.password.length)<e.passwordMinLength),n(),r("icon",e.icons.faSignInAlt))},dependencies:[P,T,S,M,A,C,I,U,R],encapsulation:2});let p=t;return p})();export{$ as PublicLinkAuthComponent};