2 lines
1.3 KiB
JavaScript
2 lines
1.3 KiB
JavaScript
import{B as d,s as m}from"./SearchModal-CGHtjMJb.js";import{F as u}from"./v3-CDJmn87G.js";import{_ as p}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{r as _,o as r,c as a,d as f,b as t,a as h,t as i,F as g}from"./app-lWrE2aWG.js";const x={name:"FileBlock",components:{BaseIcon:d,FsLightbox:u},data(){return{toggler:!1,domainPath:null}},methods:{generateSlug:function(e){return m(e,{lower:!0,strict:!0,locale:"ru"})},textLimit(e,n){if(e.length>n){let s;return s=e.substring(0,n),s+"..."}return e}},mounted(){this.domainPath=window.location.origin},props:{block:{type:Object}}},b={class:"mb-4"},y=["href"],B={class:"flex border rounded-lg px-4 py-2 items-center justify-between duration-300 hover:bg-gray-100"},w={class:"flex items-center justify-between"},k={class:"min-w-[30px] min-h-[30px] bg-[#303030] flex justify-center items-center rounded-md mr-2"},v={class:"text-sm text-gray-400"};function F(e,n,s,L,j,c){const l=_("BaseIcon");return r(!0),a(g,null,f(s.block.data.file,o=>(r(),a("div",b,[t("a",{class:"",href:"/storage/"+o.path,download:"",type:"button"},[t("div",B,[t("div",w,[t("div",k,[h(l,{name:o.expansion,class:"w-5 h-5 flex-shrink-0"},null,8,["name"])]),t("div",null,i(c.textLimit(o.title,70)),1)]),t("span",v,i(o.size),1)])],8,y)]))),256)}const V=p(x,[["render",F]]);export{V as default};
|