federatedfilesharing-vue-settings-personal.js 9.2 KB

12
  1. (()=>{"use strict";var e,o={30157:(e,o,r)=>{var n=r(20144),i=r(45994),a=r(31352),l=(r(36144),r(64024)),s=r(79954),d=r(13299),c=r.n(d),u=r(10861),f=r.n(u),p=r(67185),h=r(1381),g=r(97859),m=r(70386);const b={name:"PersonalSettings",components:{NcButton:f(),NcSettingsSection:c(),Twitter:p.Z,Facebook:h.Z,Web:g.default,Clipboard:m.Z},data:()=>({color:(0,s.j)("federatedfilesharing","color"),textColor:(0,s.j)("federatedfilesharing","textColor"),logoPath:(0,s.j)("federatedfilesharing","logoPath"),reference:(0,s.j)("federatedfilesharing","reference"),cloudId:(0,s.j)("federatedfilesharing","cloudId"),docUrlFederated:(0,s.j)("federatedfilesharing","docUrlFederated"),showHtml:!1,isCopied:!1}),computed:{messageWithURL(){return t("federatedfilesharing","Share with me through my #Nextcloud Federated Cloud ID, see {url}",{url:this.reference})},messageWithoutURL:()=>t("federatedfilesharing","Share with me through my #Nextcloud Federated Cloud ID"),shareDiasporaUrl(){return"https://share.diasporafoundation.org/?title=".concat(encodeURIComponent(this.messageWithoutURL),"&url=").concat(encodeURIComponent(this.reference))},shareTwitterUrl(){return"https://twitter.com/intent/tweet?text=".concat(encodeURIComponent(this.messageWithURL))},shareFacebookUrl(){return"https://www.facebook.com/sharer/sharer.php?u=".concat(encodeURIComponent(this.reference))},logoPathAbsolute(){return window.location.protocol+"//"+window.location.host+this.logoPath},backgroundStyle(){return"padding:10px;background-color:".concat(this.color,";color:").concat(this.textColor,";border-radius:3px;padding-left:4px;")},linkStyle(){return"background-image:url(".concat(this.logoPathAbsolute,");width:50px;height:30px;position:relative;top:8px;background-size:contain;display:inline-block;background-repeat:no-repeat; background-position: center center;")},htmlCode(){return'<a target="_blank" rel="noreferrer noopener" href="'.concat(this.reference,'" style="').concat(this.backgroundStyle,'">\n\t<span style="').concat(this.linkStyle,'"></span>\n\t').concat(t("federatedfilesharing","Share with me via Nextcloud"),"\n</a>")},copyLinkTooltip(){return this.isCopied?t("federatedfilesharing","Cloud ID copied to the clipboard"):t("federatedfilesharing","Copy to clipboard")}},methods:{async copyCloudId(){navigator.clipboard?(await navigator.clipboard.writeText(this.cloudId),this.isCopied=!0,(0,l.s$)(t("federatedfilesharing","Copied!")),this.$refs.clipboard.$el.focus()):(0,l.x2)(t("federatedfilesharing","Clipboard is not available"))},goTo(e){window.location.href=e}}};var y=r(93379),A=r.n(y),C=r(7795),v=r.n(C),x=r(90569),w=r.n(x),I=r(3565),k=r.n(I),_=r(19216),M=r.n(_),T=r(44589),D=r.n(T),S=r(41832),j={};j.styleTagTransform=D(),j.setAttributes=k(),j.insert=w().bind(null,"head"),j.domAPI=v(),j.insertStyleElement=M(),A()(S.Z,j),S.Z&&S.Z.locals&&S.Z.locals;const N=(0,r(51900).Z)(b,(function(){var e=this,t=e._self._c;return t("NcSettingsSection",{attrs:{title:e.t("federatedfilesharing","Federated Cloud"),description:e.t("federatedfilesharing","You can share with anyone who uses a Nextcloud server or other Open Cloud Mesh (OCM) compatible servers and services! Just put their Federated Cloud ID in the share dialog. It looks like person@cloud.example.com"),"doc-url":e.docUrlFederated}},[t("p",{staticClass:"cloud-id-text"},[e._v("\n\t\t"+e._s(e.t("federatedfilesharing","Your Federated Cloud ID:"))+"\n\t\t"),t("strong",{attrs:{id:"cloudid"}},[e._v(e._s(e.cloudId))]),e._v(" "),t("NcButton",{ref:"clipboard",staticClass:"clipboard",attrs:{title:e.copyLinkTooltip,"aria-label":e.copyLinkTooltip,type:"tertiary-no-background"},on:{click:function(t){return t.preventDefault(),e.copyCloudId.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Clipboard",{attrs:{size:20}})]},proxy:!0}])})],1),e._v(" "),t("p",{staticClass:"social-button"},[e._v("\n\t\t"+e._s(e.t("federatedfilesharing","Share it so your friends can share files with you:"))),t("br"),e._v(" "),t("NcButton",{on:{click:function(t){return e.goTo(e.shareFacebookUrl)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Facebook",{attrs:{size:20}})]},proxy:!0}])},[e._v("\n\t\t\t"+e._s(e.t("federatedfilesharing","Facebook"))+"\n\t\t\t")]),e._v(" "),t("NcButton",{on:{click:function(t){return e.goTo(e.shareTwitterUrl)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Twitter",{attrs:{size:20}})]},proxy:!0}])},[e._v("\n\t\t\t"+e._s(e.t("federatedfilesharing","Twitter"))+"\n\t\t\t")]),e._v(" "),t("NcButton",{on:{click:function(t){return e.goTo(e.shareDiasporaUrl)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("svg",{attrs:{width:"20",height:"20",viewBox:"-10 -5 1034 1034",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{attrs:{fill:"currentColor",d:"M502 197q-96 0-96.5 1.5t-1.5 137-1.5 138-2 2.5T266 432.5 132.5 390t-30 94T74 578l232 77q21 8 21 10t-79.5 117.5T168 899t79.5 56.5T328 1011t81-110 82-110 41 55l83 115q43 60 44 60t79.5-58 79-59-76-112.5-76-113.5T795 632.5t129.5-44-28-94T867 400t-128 42-128.5 43-2.5-7.5-1-38.5l-3-108q-4-133-5-133.5t-97-.5z"}})])]},proxy:!0}])},[e._v("\n\t\t\t"+e._s(e.t("federatedfilesharing","Diaspora"))+"\n\t\t\t")]),e._v(" "),t("NcButton",{on:{click:function(t){e.showHtml=!e.showHtml}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Web",{attrs:{size:20}})]},proxy:!0}])},[e._v("\n\t\t\t"+e._s(e.t("federatedfilesharing","Add to your website"))+"\n\t\t")])],1),e._v(" "),e.showHtml?[t("p",{staticStyle:{margin:"10px 0"}},[t("a",{style:e.backgroundStyle,attrs:{target:"_blank",rel:"noreferrer noopener",href:e.reference}},[t("span",{style:e.linkStyle}),e._v("\n\t\t\t\t"+e._s(e.t("federatedfilesharing","Share with me via Nextcloud"))+"\n\t\t\t")])]),e._v(" "),t("p",[e._v("\n\t\t\t"+e._s(e.t("federatedfilesharing","HTML Code:"))+"\n\t\t\t"),t("br"),e._v(" "),t("pre",[e._v(e._s(e.htmlCode))])])]:e._e()],2)}),[],!1,null,"5b277ff8",null).exports;r.nc=btoa((0,i.IH)()),n.default.mixin({methods:{t:a.Iu}}),(new(n.default.extend(N))).$mount("#vue-personal-federated")},41832:(e,t,o)=>{o.d(t,{Z:()=>l});var r=o(87537),n=o.n(r),i=o(23645),a=o.n(i)()(n());a.push([e.id,".social-button[data-v-5b277ff8]{margin-top:.5rem}.social-button button[data-v-5b277ff8]{display:inline-flex;margin-left:.5rem;margin-top:1rem}.cloud-id-text[data-v-5b277ff8]{display:flex;align-items:center}.cloud-id-text button[data-v-5b277ff8]{display:inline-flex}pre[data-v-5b277ff8]{margin-top:0;white-space:pre-wrap}#cloudid[data-v-5b277ff8]{margin-left:.25rem}","",{version:3,sources:["webpack://./apps/federatedfilesharing/src/components/PersonalSettings.vue"],names:[],mappings:"AACA,gCACC,gBAAA,CACA,uCACC,mBAAA,CACA,iBAAA,CACA,eAAA,CAGF,gCACC,YAAA,CACA,kBAAA,CACA,uCACC,mBAAA,CAGF,qBACC,YAAA,CACA,oBAAA,CAED,0BACC,kBAAA",sourcesContent:["\n.social-button {\n\tmargin-top: 0.5rem;\n\tbutton {\n\t\tdisplay: inline-flex;\n\t\tmargin-left: 0.5rem;\n\t\tmargin-top: 1rem;\n\t}\n}\n.cloud-id-text {\n\tdisplay: flex;\n\talign-items: center;\n\tbutton {\n\t\tdisplay: inline-flex;\n\t}\n}\npre {\n\tmargin-top: 0;\n\twhite-space: pre-wrap;\n}\n#cloudid {\n\tmargin-left: 0.25rem;\n}\n"],sourceRoot:""}]);const l=a},81490:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6Ii8+Cjwvc3ZnPgo="},90888:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6IiBzdHlsZT0iZmlsbC1vcGFjaXR5OjE7ZmlsbDojZmZmZmZmIi8+Cjwvc3ZnPgo="}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={id:e,loaded:!1,exports:{}};return o[e].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=o,e=[],n.O=(t,o,r,i)=>{if(!o){var a=1/0;for(c=0;c<e.length;c++){o=e[c][0],r=e[c][1],i=e[c][2];for(var l=!0,s=0;s<o.length;s++)(!1&i||a>=i)&&Object.keys(n.O).every((e=>n.O[e](o[s])))?o.splice(s--,1):(l=!1,i<a&&(a=i));if(l){e.splice(c--,1);var d=r();void 0!==d&&(t=d)}}return t}i=i||0;for(var c=e.length;c>0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[o,r,i]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.j=5855,(()=>{n.b=document.baseURI||self.location.href;var e={5855:0};n.O.j=t=>0===e[t];var t=(t,o)=>{var r,i,a=o[0],l=o[1],s=o[2],d=0;if(a.some((t=>0!==e[t]))){for(r in l)n.o(l,r)&&(n.m[r]=l[r]);if(s)var c=s(n)}for(t&&t(o);d<a.length;d++)i=a[d],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return n.O(c)},o=self.webpackChunknextcloud=self.webpackChunknextcloud||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})(),n.nc=void 0;var i=n.O(void 0,[7874],(()=>n(30157)));i=n.O(i)})();
  2. //# sourceMappingURL=federatedfilesharing-vue-settings-personal.js.map?v=832fb62aeec002995188