1
0

federatedfilesharing-vue-settings-personal.js 11 KB

12
  1. (()=>{"use strict";var e,r,o,n={30157:(e,r,o)=>{var n=o(20144),a=o(77958),i=o(31352),l=(o(32316),o(64024)),s=o(79954),d=o(13299),c=o.n(d),u=o(10861),p=o.n(u),f=o(67185),h=o(1381),g=o(97859),m=o(70386);const b={name:"PersonalSettings",components:{NcButton:p(),NcSettingsSection:c(),Twitter:f.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 v=o(93379),C=o.n(v),y=o(7795),w=o.n(y),A=o(90569),x=o.n(A),k=o(3565),_=o.n(k),S=o(19216),T=o.n(S),I=o(44589),j=o.n(I),B=o(41832),U={};U.styleTagTransform=j(),U.setAttributes=_(),U.insert=x().bind(null,"head"),U.domAPI=w(),U.insertStyleElement=T(),C()(B.Z,U),B.Z&&B.Z.locals&&B.Z.locals;const N=(0,o(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;o.nc=btoa((0,a.IH)()),n.default.mixin({methods:{t:i.Iu}}),(new(n.default.extend(N))).$mount("#vue-personal-federated")},41832:(e,t,r)=>{r.d(t,{Z:()=>l});var o=r(87537),n=r.n(o),a=r(23645),i=r.n(a)()(n());i.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=i},88717:e=>{e.exports="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20height=%2716%27%20width=%2716%27%3e%3cpath%20d=%27M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z%27%20style=%27fill-opacity:1;fill:%23ffffff%27/%3e%3c/svg%3e"},79839:e=>{e.exports="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20height=%2716%27%20width=%2716%27%3e%3cpath%20d=%27M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z%27/%3e%3c/svg%3e"}},a={};function i(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}i.m=n,e=[],i.O=(t,r,o,n)=>{if(!r){var a=1/0;for(c=0;c<e.length;c++){r=e[c][0],o=e[c][1],n=e[c][2];for(var l=!0,s=0;s<r.length;s++)(!1&n||a>=n)&&Object.keys(i.O).every((e=>i.O[e](r[s])))?r.splice(s--,1):(l=!1,n<a&&(a=n));if(l){e.splice(c--,1);var d=o();void 0!==d&&(t=d)}}return t}n=n||0;for(var c=e.length;c>0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[r,o,n]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>e+"-"+e+".js?v=00434e4baa0d8e7b79f1",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o="nextcloud:",i.l=(e,t,n,a)=>{if(r[e])r[e].push(t);else{var l,s;if(void 0!==n)for(var d=document.getElementsByTagName("script"),c=0;c<d.length;c++){var u=d[c];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==o+n){l=u;break}}l||(s=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,i.nc&&l.setAttribute("nonce",i.nc),l.setAttribute("data-webpack",o+n),l.src=e),r[e]=[t];var p=(t,o)=>{l.onerror=l.onload=null,clearTimeout(f);var n=r[e];if(delete r[e],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach((e=>e(o))),t)return t(o)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),s&&document.head.appendChild(l)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=5855,(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");r.length&&(e=r[r.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{i.b=document.baseURI||self.location.href;var e={5855:0};i.f.j=(t,r)=>{var o=i.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise(((r,n)=>o=e[t]=[r,n]));r.push(o[2]=n);var a=i.p+i.u(t),l=new Error;i.l(a,(r=>{if(i.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+n+": "+a+")",l.name="ChunkLoadError",l.type=n,l.request=a,o[1](l)}}),"chunk-"+t,t)}},i.O.j=t=>0===e[t];var t=(t,r)=>{var o,n,a=r[0],l=r[1],s=r[2],d=0;if(a.some((t=>0!==e[t]))){for(o in l)i.o(l,o)&&(i.m[o]=l[o]);if(s)var c=s(i)}for(t&&t(r);d<a.length;d++)n=a[d],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(c)},r=self.webpackChunknextcloud=self.webpackChunknextcloud||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),i.nc=void 0;var l=i.O(void 0,[7874],(()=>i(30157)));l=i.O(l)})();
  2. //# sourceMappingURL=federatedfilesharing-vue-settings-personal.js.map?v=a9c7c33d26664c3e73b3