UNPKG

@sync-in/server

Version:

The secure, open-source platform for file storage, sharing, collaboration, and sync

2 lines (1 loc) 4.85 kB
import{a as j}from"./chunk-KPOQLDWF.js";import{j as z}from"./chunk-T42BV6TR.js";import"./chunk-E32J777S.js";import{k as B}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{Nb as R,ya as O,za as M}from"./chunk-O3YLAEVE.js";import{b as E,e as P}from"./chunk-QHJT5H4M.js";import{Bb as v,Bf as A,Eb as _,Ed as T,Gb as s,Ia as x,Jd as U,Kd as y,Kf as I,Oa as r,Tb as u,Ub as b,Wb as L,ab as w,ie as D,ja as h,kc as g,lb as p,mb as f,mc as S,oa as C,pa as k,qg as V,rb as m,sb as n,tb as a,ub as d}from"./chunk-D55YR5X7.js";import"./chunk-SDJNZULP.js";import"./chunk-2YQ4SX3A.js";import"./chunk-DM4NXKEP.js";import"./chunk-ZIJQRARU.js";import"./chunk-KAVP6UXH.js";function F(e,o){if(e&1){let i=v();n(0,"img",17),_("error",function(){C(i);let c=s();return k(c.fallBackMimeUrl())}),a()}if(e&2){let i=s();m("src",i.file.mimeUrl,x)}}function N(e,o){if(e&1&&d(0,"fa-icon",9),e&2){let i=s();m("icon",i.icons.SPACES)("fixedWidth",!1)}}function Y(e,o){if(e&1){let i=v();n(0,"button",21),_("click",function(){C(i);let c=s(2);return k(c.openLink())}),d(1,"fa-icon",20),a()}if(e&2){let i=s(2);r(),m("icon",i.fileCanBeModified&&i.file.isEditable?i.icons.faPen:i.icons.faEye)}}function W(e,o){if(e&1){let i=v();n(0,"div",11),p(1,Y,2,1,"button",18),n(2,"button",19),_("click",function(){C(i);let c=s();return k(c.downloadLink())}),d(3,"fa-icon",20),a()()}if(e&2){let i=s();r(),f(i.file!=null&&i.file.isViewable?1:-1),r(2),m("icon",i.icons.faDownload)}}function H(e,o){if(e&1&&(d(0,"img",22),n(1,"span",23),u(2),a()),e&2){let i=s();m("src",i.link.owner.avatar,x),r(2),b(i.link.owner.fullName)}}function q(e,o){e&1&&(n(0,"span",16),u(1,"You have been invited to join this space"),a())}function G(e,o){if(e&1&&(n(0,"span"),u(1),g(2,"translate"),g(3,"translate"),a()),e&2){let i=s();r(),L("",S(2,2,"share with you this",i.locale.language)," ",S(3,5,i.link.share.isDir?"directory":"file",i.locale.language))}}function J(e,o){e&1&&(n(0,"span",16),u(1,"You have been invited to join this share"),a())}var ce=(()=>{let o=class o{constructor(){this.locale=h(T),this.icons={SPACES:R.SPACES,faEye:D,faDownload:I,faPen:A},this.logoUrl=B,this.activatedRoute=h(E),this.linksService=h(z),this.activatedRoute.params.subscribe(t=>this.linkUUID=t.uuid),this.activatedRoute.data.subscribe(t=>this.setLink(t.link))}openLink(){this.linksService.linkAccessOrView(this.linkUUID,this.link,this.file)}downloadLink(){this.linksService.linkDownload(this.linkUUID)}followLink(){this.linksService.linkAccessOrView(this.linkUUID,this.link)}fallBackMimeUrl(){this.file.fallBackMimeUrl()}setLink(t){t.space||(this.file=new j({id:-1,name:t.share.name,path:"",isDir:t.share.isDir,size:t.share.size,mime:t.share.mime,mtime:t.share.mtime,root:{alias:t.share.alias}},M.SHARES,t.share.hasParent,t.fileEditors),this.fileCanBeModified=t.share.permissions.indexOf(O.MODIFY)>-1),this.link=t}};o.\u0275fac=function(c){return new(c||o)},o.\u0275cmp=w({type:o,selectors:[["app-public-link"]],decls:21,vars:6,consts:[[1,"link-page"],[1,"header"],["routerLink",""],["alt","","height","40",3,"src"],[1,"d-flex","flex-column","align-content-center"],[1,"d-flex","flex-column","align-items-center","mt-3","mb-1","mx-auto","cursor-pointer"],[1,"resource",3,"click"],[1,"mime"],["alt","","height","96",1,"no-select-pointer",3,"src"],[1,"circle-primary-icon",2,"width","96px","height","96px","font-size","48px",3,"icon","fixedWidth"],[1,"error-code"],[1,"mt-3","mb-2","fs-lg"],[1,"error-text","no-select"],[1,"hr"],[1,"d-flex","justify-content-center","align-items-center"],[1,"solve"],["l10nTranslate",""],["alt","","height","96",1,"no-select-pointer",3,"error","src"],["l10nTranslate","",1,"btn","btn-lg","btn-outline-light","me-2"],[1,"btn","btn-lg","btn-outline-light",3,"click"],[3,"icon"],["l10nTranslate","",1,"btn","btn-lg","btn-outline-light","me-2",3,"click"],["alt","","width","42","height","42",1,"avatar-base-img","me-3",3,"src"],[1,"oops","me-2"]],template:function(c,l){c&1&&(n(0,"div",0)(1,"div",1)(2,"a",2),d(3,"img",3),a()(),n(4,"div",4)(5,"div",5)(6,"div",6),_("click",function(){return l.followLink()}),n(7,"div",7),p(8,F,1,1,"img",8)(9,N,1,2,"fa-icon",9),a(),n(10,"span",10),u(11),a()(),p(12,W,4,2,"div",11),a()(),n(13,"div",12),d(14,"span",13),n(15,"div",14),p(16,H,3,2),n(17,"span",15),p(18,q,2,0,"span",16)(19,G,4,8,"span")(20,J,2,0,"span",16),a()()()()),c&2&&(r(3),m("src",l.logoUrl,x),r(5),f(l.file!=null&&l.file.mimeUrl?8:9),r(3),b((l.link.share==null?null:l.link.share.name)||(l.link.space==null?null:l.link.space.name)),r(),f((l.file==null?null:l.file.isDir)===!1?12:-1),r(4),f(l.link.owner?16:-1),r(2),f(l.link.space?18:l.link.owner?19:20))},dependencies:[P,V,y,U],encapsulation:2});let e=o;return e})();export{ce as PublicLinkComponent};