123 |
- /*! For license information please see 8753-8753.js.LICENSE.txt */
- "use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[8753],{77796:(e,t,r)=>{r.d(t,{K:()=>d});const a=["post","showcase","carousel"],d={type:{type:String,required:!0,validator:e=>"string"==typeof e&&a.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,r)=>{r.d(t,{O:()=>i});var a=r(53334),d=r(85471);const i=e=>{const t=(0,a.Z0)();return(0,d.EW)((()=>null!=e&&e.value?((e,t)=>{var r,a,d;return null!==(r=null!==(a=null!==(d=e[t])&&void 0!==d?d:e[t.split("_")[0]])&&void 0!==a?a:e.en)&&void 0!==r?r:null})(e.value,t):null))}},56336:(e,t,r)=>{r.d(t,{A:()=>o});var a=r(71354),d=r.n(a),i=r(76314),n=r.n(i)()(d());n.push([e.id,".app-discover-post[data-v-24eed252]{width:100%;background-color:var(--color-primary-element-light);border-radius:var(--border-radius-rounded);display:flex;flex-direction:row}.app-discover-post--reverse[data-v-24eed252]{flex-direction:row-reverse}.app-discover-post h3[data-v-24eed252],.app-discover-post h4[data-v-24eed252]{font-size:24px;font-weight:600;margin-block:0 1em}.app-discover-post__text[data-v-24eed252]{display:block;padding:var(--border-radius-rounded);width:100%}.app-discover-post__media[data-v-24eed252]{display:block;overflow:hidden;max-height:300px;max-width:450px;border-radius:var(--border-radius-rounded)}.app-discover-post__media--fullwidth[data-v-24eed252]{max-width:unset;max-height:unset}.app-discover-post__media--end[data-v-24eed252]{border-end-start-radius:0;border-start-start-radius:0}.app-discover-post__media--start[data-v-24eed252]{border-end-end-radius:0;border-start-end-radius:0}.app-discover-post__media img[data-v-24eed252],.app-discover-post__media-element[data-v-24eed252]{height:100%;width:100%;object-fit:cover;object-position:center}.app-discover-post__play-icon[data-v-24eed252]{position:absolute;top:-46px;right:-46px}.app-discover-post__play-icon-wrapper[data-v-24eed252]{position:relative;top:-50%;left:-50%}@media only screen and (max-width: 699px){.app-discover-post[data-v-24eed252]{flex-direction:column}.app-discover-post--reverse[data-v-24eed252]{flex-direction:column-reverse}.app-discover-post__media[data-v-24eed252]{min-width:100%}.app-discover-post__media--end[data-v-24eed252]{border-radius:var(--border-radius-rounded);border-start-end-radius:0;border-start-start-radius:0}.app-discover-post__media--start[data-v-24eed252]{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,UAAA,CACA,mDAAA,CACA,0CAAA,CAEA,YAAA,CACA,kBAAA,CACA,6CACC,0BAAA,CAGD,8EACC,cAAA,CACA,eAAA,CACA,kBAAA,CAGD,0CACC,aAAA,CACA,oCAAA,CACA,UAAA,CAGD,2CACC,aAAA,CACA,eAAA,CAEA,gBAAA,CACA,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,+CAOC,iBAAA,CACA,SAAA,CACA,WAAA,CARA,uDACC,iBAAA,CACA,QAAA,CACA,SAAA,CAUH,0CACC,oCACC,qBAAA,CAEA,6CACC,6BAAA,CAGD,2CACC,cAAA,CAEA,gDACC,0CAAA,CACA,yBAAA,CACA,2BAAA,CAGD,kDACC,0CAAA,CACA,uBAAA,CACA,yBAAA,CAAA",sourcesContent:["\n.app-discover-post {\n\twidth: 100%;\n\tbackground-color: var(--color-primary-element-light);\n\tborder-radius: var(--border-radius-rounded);\n\n\tdisplay: flex;\n\tflex-direction: row;\n\t&--reverse {\n\t\tflex-direction: row-reverse;\n\t}\n\n\th3, h4 {\n\t\tfont-size: 24px;\n\t\tfont-weight: 600;\n\t\tmargin-block: 0 1em;\n\t}\n\n\t&__text {\n\t\tdisplay: block;\n\t\tpadding: var(--border-radius-rounded);\n\t\twidth: 100%;\n\t}\n\n\t&__media {\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\n\t\tmax-height: 300px;\n\t\tmax-width: 450px;\n\t\tborder-radius: var(--border-radius-rounded);\n\n\t\t&--fullwidth {\n\t\t\tmax-width: unset;\n\t\t\tmax-height: unset;\n\t\t}\n\n\t\t&--end {\n\t\t\tborder-end-start-radius: 0;\n\t\t\tborder-start-start-radius: 0;\n\t\t}\n\n\t\t&--start {\n\t\t\tborder-end-end-radius: 0;\n\t\t\tborder-start-end-radius: 0;\n\t\t}\n\n\t\timg, &-element {\n\t\t\theight: 100%;\n\t\t\twidth: 100%;\n\t\t\tobject-fit: cover;\n\t\t\tobject-position: center;\n\t\t}\n\t}\n\n\t&__play-icon {\n\t\t&-wrapper {\n\t\t\tposition: relative;\n\t\t\ttop: -50%;\n\t\t\tleft: -50%;\n\t\t}\n\n\t\tposition: absolute;\n\t\ttop: -46px; // half of the icon height\n\t\tright: -46px; // half of the icon width\n\t}\n}\n\n// Ensure section works on mobile devices\n@media only screen and (max-width: 699px) {\n\t.app-discover-post {\n\t\tflex-direction: column;\n\n\t\t&--reverse {\n\t\t\tflex-direction: column-reverse;\n\t\t}\n\n\t\t&__media {\n\t\t\tmin-width: 100%;\n\n\t\t\t&--end {\n\t\t\t\tborder-radius: var(--border-radius-rounded);\n\t\t\t\tborder-start-end-radius: 0;\n\t\t\t\tborder-start-start-radius: 0;\n\t\t\t}\n\n\t\t\t&--start {\n\t\t\t\tborder-radius: var(--border-radius-rounded);\n\t\t\t\tborder-end-end-radius: 0;\n\t\t\t\tborder-end-start-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const o=n},8753:(e,t,r)=>{r.r(t),r.d(t,{default:()=>k});var a=r(9165),d=r(99498),i=r(97786),n=r(85471),o=r(77796),s=r(74640),A=r(6695);const l=(0,n.pM)({components:{NcIconSvgWrapper:A.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,s.O)((0,n.EW)((()=>e.headline))),r=(0,s.O)((0,n.EW)((()=>e.text))),o=(0,s.O)((0,n.EW)((()=>{var t;return null===(t=e.media)||void 0===t?void 0:t.content}))),A=(0,n.EW)((()=>null!==o.value?[o.value.src].flat():void 0)),l=(0,n.EW)((()=>{var e,t;return null!==(e=null===(t=o.value)||void 0===t?void 0:t.alt)&&void 0!==e?e:""})),p=(0,n.EW)((()=>{var e;return!0===(null==A||null===(e=A.value)||void 0===e?void 0:e[0].mime.startsWith("image/"))})),u=(0,n.EW)((()=>!t.value&&!r.value)),v=(0,n.EW)((()=>{var t,r;return null!==(t=null===(r=o.value)||void 0===r?void 0:r.link)&&void 0!==t?t:e.link})),c=(0,n.KR)(!1),C=(0,n.EW)((()=>{var e;return(null===(e=o.value)||void 0===e?void 0:e.link)&&c.value})),m=(0,n.KR)(),h=(0,i.ITo)(m,{threshold:.3});return(0,n.nT)((()=>{if(!p.value&&m.value){const e=m.value;h.value?(e.muted=!0,e.play()):(e.pause(),e.ended&&(e.currentTime=0,c.value=!1))}})),{mdiPlayCircleOutline:a.Nwy,translatedText:r,translatedHeadline:t,mediaElement:m,mediaSources:A,mediaAlt:l,mediaLink:v,hasPlaybackEnded:c,showPlayVideo:C,isFullWidth:u,isImage:p,generatePrivacyUrl:e=>e.startsWith("/")?e:(0,d.Jv)("/settings/api/apps/media?fileName={fileName}",{fileName:e})}}});var p=r(85072),u=r.n(p),v=r(97825),c=r.n(v),C=r(77659),m=r.n(C),h=r(55056),_=r.n(h),b=r(10540),g=r.n(b),f=r(41113),y=r.n(f),x=r(56336),w={};w.styleTagTransform=y(),w.setAttributes=_(),w.insert=m().bind(null,"head"),w.domAPI=c(),w.insertStyleElement=g(),u()(x.A,w),x.A&&x.A.locals&&x.A.locals;const k=(0,r(14486).A)(l,(function(){var e,t,r=this,a=r._self._c;return r._self._setupProxy,a("article",{staticClass:"app-discover-post",class:{"app-discover-post--reverse":r.media&&"start"===r.media.alignment},attrs:{id:r.domId}},[r.headline||r.text?a(r.link?"a":"div",{tag:"component",staticClass:"app-discover-post__text",attrs:{href:r.link,target:r.link?"_blank":void 0}},[a(r.inline?"h4":"h3",{tag:"component"},[r._v(r._s(r.translatedHeadline))]),r._v(" "),a("p",[r._v(r._s(r.translatedText))])],1):r._e(),r._v(" "),r.mediaSources?a(r.mediaLink?"a":"div",{tag:"component",staticClass:"app-discover-post__media",class:{"app-discover-post__media--fullwidth":r.isFullWidth,"app-discover-post__media--start":"start"===(null===(e=r.media)||void 0===e?void 0:e.alignment),"app-discover-post__media--end":"end"===(null===(t=r.media)||void 0===t?void 0:t.alignment)},attrs:{href:r.mediaLink,target:r.mediaLink?"_blank":void 0}},[a(r.isImage?"picture":"video",{ref:"mediaElement",tag:"component",staticClass:"app-discover-post__media-element",attrs:{muted:!r.isImage,playsinline:!r.isImage,preload:!r.isImage&&"auto"},on:{ended:function(e){r.hasPlaybackEnded=!0}}},[r._l(r.mediaSources,(function(e){return a("source",{key:e.src,attrs:{src:r.isImage?void 0:r.generatePrivacyUrl(e.src),srcset:r.isImage?r.generatePrivacyUrl(e.src):void 0,type:e.mime}})})),r._v(" "),r.isImage?a("img",{attrs:{src:r.generatePrivacyUrl(r.mediaSources[0].src),alt:r.mediaAlt}}):r._e()],2),r._v(" "),a("div",{staticClass:"app-discover-post__play-icon-wrapper"},[!r.isImage&&r.showPlayVideo?a("NcIconSvgWrapper",{staticClass:"app-discover-post__play-icon",attrs:{path:r.mdiPlayCircleOutline,size:92}}):r._e()],1)],1):r._e()],1)}),[],!1,null,"24eed252",null).exports}}]);
- //# sourceMappingURL=8753-8753.js.map?v=2e00db48edc4f0d3e738
|