3303-3303.js 7.9 KB

12
  1. "use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[3303],{77796:(e,t,a)=>{a.d(t,{K:()=>s});const r=["post","showcase","carousel"],s={type:{type:String,required:!0,validator:e=>"string"==typeof e&&r.includes(e)},id:{type:String,required:!0},date:{type:Number,required:!1,default:void 0},expiryDate:{type:Number,required:!1,default:void 0},headline:{type:Object,required:!1,default:()=>null},link:{type:String,required:!1,default:()=>null}}},74640:(e,t,a)=>{a.d(t,{O:()=>i});var r=a(53334),s=a(85471);const i=e=>{const t=(0,r.Z0)();return(0,s.EW)((()=>e?.value?((e,t)=>e[t]??e[t.split("_")[0]]??e.en??null)(e.value,t):null))}},83186:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(71354),s=a.n(r),i=a(76314),d=a.n(i)()(s());d.push([e.id,".app-discover-post[data-v-9162c958]{max-height:300px;width:100%;background-color:var(--color-primary-element-light);border-radius:var(--border-radius-rounded);display:flex;flex-direction:row;justify-content:start}.app-discover-post--reverse[data-v-9162c958]{flex-direction:row-reverse}.app-discover-post h3[data-v-9162c958],.app-discover-post h4[data-v-9162c958]{font-size:24px;font-weight:600;margin-block:0 1em}.app-discover-post__text[data-v-9162c958]{display:block;width:100%;padding:var(--border-radius-rounded);overflow-y:scroll}.app-discover-post:has(.app-discover-post__media) .app-discover-post__text[data-v-9162c958]{padding-block-end:0}.app-discover-post__media[data-v-9162c958]{display:block;overflow:hidden;max-width:450px;border-radius:var(--border-radius-rounded)}.app-discover-post__media--fullwidth[data-v-9162c958]{max-width:unset;max-height:unset}.app-discover-post__media--end[data-v-9162c958]{border-end-start-radius:0;border-start-start-radius:0}.app-discover-post__media--start[data-v-9162c958]{border-end-end-radius:0;border-start-end-radius:0}.app-discover-post__media img[data-v-9162c958],.app-discover-post__media-element[data-v-9162c958]{height:100%;width:100%;object-fit:cover;object-position:center}.app-discover-post__play-icon[data-v-9162c958]{position:absolute;top:-46px;inset-inline-end:-46px}.app-discover-post__play-icon-wrapper[data-v-9162c958]{position:relative;top:-50%;inset-inline-start:-50%}.app-discover-post--small.app-discover-post[data-v-9162c958]{flex-direction:column;max-height:500px}.app-discover-post--small.app-discover-post--reverse[data-v-9162c958]{flex-direction:column-reverse}.app-discover-post--small .app-discover-post__text[data-v-9162c958]{flex:1 1 50%}.app-discover-post--small .app-discover-post__media[data-v-9162c958]{min-width:100%}.app-discover-post--small .app-discover-post__media--end[data-v-9162c958]{border-radius:var(--border-radius-rounded);border-start-end-radius:0;border-start-start-radius:0}.app-discover-post--small .app-discover-post__media--start[data-v-9162c958]{border-radius:var(--border-radius-rounded);border-end-end-radius:0;border-end-start-radius:0}","",{version:3,sources:["webpack://./apps/settings/src/components/AppStoreDiscover/PostType.vue"],names:[],mappings:"AACA,oCACC,gBAAA,CACA,UAAA,CACA,mDAAA,CACA,0CAAA,CAEA,YAAA,CACA,kBAAA,CACA,qBAAA,CAEA,6CACC,0BAAA,CAGD,8EACC,cAAA,CACA,eAAA,CACA,kBAAA,CAGD,0CACC,aAAA,CACA,UAAA,CACA,oCAAA,CACA,iBAAA,CAID,4FACC,mBAAA,CAGD,2CACC,aAAA,CACA,eAAA,CAEA,eAAA,CACA,0CAAA,CAEA,sDACC,eAAA,CACA,gBAAA,CAGD,gDACC,yBAAA,CACA,2BAAA,CAGD,kDACC,uBAAA,CACA,yBAAA,CAGD,kGACC,WAAA,CACA,UAAA,CACA,gBAAA,CACA,sBAAA,CAIF,+CACC,iBAAA,CACA,SAAA,CACA,sBAAA,CAEA,uDACC,iBAAA,CACA,QAAA,CACA,uBAAA,CAMF,6DACC,qBAAA,CACA,gBAAA,CAEA,sEACC,6BAAA,CAKD,oEACC,YAAA,CAGD,qEACC,cAAA,CAEA,0EACC,0CAAA,CACA,yBAAA,CACA,2BAAA,CAGD,4EACC,0CAAA,CACA,uBAAA,CACA,yBAAA",sourceRoot:""}]);const o=d},63303:(e,t,a)=>{a.r(t),a.d(t,{default:()=>S});var r=a(9165),s=a(63814),i=a(13073),d=a(85471),o=a(77796),A=a(74640),p=a(6695),n=a(32981),l=a(40173);const c=(0,n.C)("core","apps"),u=Object.fromEntries(c.map((e=>[e.app??e.id,e.href]))),v=(0,d.pM)({name:"AppLink",components:{RouterLink:l.Wk},props:{href:{type:String,required:!0}},data:()=>({routerProps:void 0,linkProps:void 0}),watch:{href:{immediate:!0,handler(){const e=this.href.match(/^app:\/\/([^/]+)(\/.+)?$/);if(this.routerProps=void 0,this.linkProps=void 0,null===e)return void(this.linkProps={href:this.href,target:"_blank",rel:"noreferrer noopener"});const t=e[1];e[2]?this.linkProps={href:(0,s.Jv)(`/apps/${t}${e[2]}`)}:t in u?this.linkProps={href:u[t]}:this.routerProps={to:{name:"apps-details",params:{category:this.$route.params?.category??"discover",id:t}}}}}}});var C=a(14486);const m=(0,C.A)(v,(function(){var e=this,t=e._self._c;return e._self._setupProxy,e.linkProps?t("a",e._b({},"a",e.linkProps,!1),[e._t("default")],2):e.routerProps?t("RouterLink",e._b({},"RouterLink",e.routerProps,!1),[e._t("default")],2):e._e()}),[],!1,null,null,null).exports,_=(0,d.pM)({components:{AppLink:m,NcIconSvgWrapper:p.A},props:{...o.K,text:{type:Object,required:!1,default:()=>null},media:{type:Object,required:!1,default:()=>null},inline:{type:Boolean,required:!1,default:!1},domId:{type:String,required:!1,default:null}},setup(e){const t=(0,A.O)((0,d.EW)((()=>e.headline))),a=(0,A.O)((0,d.EW)((()=>e.text))),o=(0,A.O)((0,d.EW)((()=>e.media?.content))),p=(0,d.EW)((()=>null!==o.value?[o.value.src].flat():void 0)),n=(0,d.EW)((()=>o.value?.alt??"")),l=(0,d.EW)((()=>!0===p?.value?.[0].mime.startsWith("image/"))),c=(0,d.EW)((()=>!t.value&&!a.value)),u=(0,d.EW)((()=>o.value?.link??e.link)),v=(0,d.KR)(!1),C=(0,d.EW)((()=>o.value?.link&&v.value)),m=(0,d.KR)(),{width:_}=(0,i.Lhy)(m),h=(0,d.EW)((()=>_.value<600)),f=(0,d.KR)(),g=(0,i.ITo)(f,{threshold:.3});return(0,d.nT)((()=>{if(!l.value&&f.value){const e=f.value;g.value?(e.muted=!0,e.play()):(e.pause(),e.ended&&(e.currentTime=0,v.value=!1))}})),{mdiPlayCircleOutline:r.Nwy,container:m,translatedText:a,translatedHeadline:t,mediaElement:f,mediaSources:p,mediaAlt:n,mediaLink:u,hasPlaybackEnded:v,showPlayVideo:C,isFullWidth:c,isSmallWidth:h,isImage:l,generatePrivacyUrl:e=>e.startsWith("/")?e:(0,s.Jv)("/settings/api/apps/media?fileName={fileName}",{fileName:e})}}});var h=a(85072),f=a.n(h),g=a(97825),y=a.n(g),k=a(77659),b=a.n(k),x=a(55056),E=a.n(x),B=a(10540),P=a.n(B),w=a(41113),W=a.n(w),D=a(83186),I={};I.styleTagTransform=W(),I.setAttributes=E(),I.insert=b().bind(null,"head"),I.domAPI=y(),I.insertStyleElement=P(),f()(D.A,I),D.A&&D.A.locals&&D.A.locals;const S=(0,C.A)(_,(function(){var e=this,t=e._self._c;return e._self._setupProxy,t("article",{ref:"container",staticClass:"app-discover-post",class:{"app-discover-post--reverse":e.media&&"start"===e.media.alignment,"app-discover-post--small":e.isSmallWidth},attrs:{id:e.domId}},[e.headline||e.text?t(e.link?"AppLink":"div",{tag:"component",staticClass:"app-discover-post__text",attrs:{href:e.link}},[t(e.inline?"h4":"h3",{tag:"component"},[e._v("\n\t\t\t"+e._s(e.translatedHeadline)+"\n\t\t")]),e._v(" "),t("p",[e._v(e._s(e.translatedText))])],1):e._e(),e._v(" "),e.mediaSources?t(e.mediaLink?"AppLink":"div",{tag:"component",staticClass:"app-discover-post__media",class:{"app-discover-post__media--fullwidth":e.isFullWidth,"app-discover-post__media--start":"start"===e.media?.alignment,"app-discover-post__media--end":"end"===e.media?.alignment},attrs:{href:e.mediaLink}},[t(e.isImage?"picture":"video",{ref:"mediaElement",tag:"component",staticClass:"app-discover-post__media-element",attrs:{muted:!e.isImage,playsinline:!e.isImage,preload:!e.isImage&&"auto"},on:{ended:function(t){e.hasPlaybackEnded=!0}}},[e._l(e.mediaSources,(function(a){return t("source",{key:a.src,attrs:{src:e.isImage?void 0:e.generatePrivacyUrl(a.src),srcset:e.isImage?e.generatePrivacyUrl(a.src):void 0,type:a.mime}})})),e._v(" "),e.isImage?t("img",{attrs:{src:e.generatePrivacyUrl(e.mediaSources[0].src),alt:e.mediaAlt}}):e._e()],2),e._v(" "),t("div",{staticClass:"app-discover-post__play-icon-wrapper"},[!e.isImage&&e.showPlayVideo?t("NcIconSvgWrapper",{staticClass:"app-discover-post__play-icon",attrs:{path:e.mdiPlayCircleOutline,size:92}}):e._e()],1)],1):e._e()],1)}),[],!1,null,"9162c958",null).exports}}]);
  2. //# sourceMappingURL=3303-3303.js.map?v=8cf209f1ac18a557bf69